Browse Source

Merge pull request #48 in CORE/base-third from ~ZED/base-third:feature/10.0 to feature/10.0

* commit '373e7b544b7196cf0553aa584ea8eb39c59849e6':
  DEC-1972 配置了log4j的时候定时任务启动抛错处理掉
10.0
superman 7 years ago
parent
commit
1ba39be6fb
  1. 32
      fine-quartz/src/com/fr/third/v2/org/quartz/core/QuartzScheduler.java

32
fine-quartz/src/com/fr/third/v2/org/quartz/core/QuartzScheduler.java

@ -109,38 +109,6 @@ public class QuartzScheduler implements RemotableQuartzScheduler {
private static String VERSION_MINOR = "UNKNOWN";
private static String VERSION_ITERATION = "UNKNOWN";
static {
Properties props = new Properties();
InputStream is = null;
try {
is = QuartzScheduler.class.getResourceAsStream("quartz-build.properties");
if(is != null) {
props.load(is);
String version = props.getProperty("version");
if (version != null) {
String[] versionComponents = version.split("\\.");
VERSION_MAJOR = versionComponents[0];
VERSION_MINOR = versionComponents[1];
if(versionComponents.length > 2)
VERSION_ITERATION = versionComponents[2];
else
VERSION_ITERATION = "0";
} else {
(LoggerFactory.getLogger(QuartzScheduler.class)).error(
"Can't parse Quartz version from quartz-build.properties");
}
}
} catch (Exception e) {
(LoggerFactory.getLogger(QuartzScheduler.class)).error(
"Error loading version info from quartz-build.properties.", e);
} finally {
if(is != null) {
try { is.close(); } catch(Exception ignore) {}
}
}
}
/*
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*

Loading…
Cancel
Save