[logback-dev] svn commit: r1944 - logback/trunk/logback-core/src/test/java/ch/qos/logback/core/testUtil
noreply.ceki at qos.ch
noreply.ceki at qos.ch
Tue Nov 4 20:14:36 CET 2008
Author: ceki
Date: Tue Nov 4 20:14:36 2008
New Revision: 1944
Modified:
logback/trunk/logback-core/src/test/java/ch/qos/logback/core/testUtil/Env.java
Log:
Since Orion (Ceki's computer) now defaults to JDK 1.6, and the MS SQL JDK Driver v4 does not
run on older JDKs we make JDK 1.6 a requirement for running the DBAppenderIntegration tests.
Modified: logback/trunk/logback-core/src/test/java/ch/qos/logback/core/testUtil/Env.java
==============================================================================
--- logback/trunk/logback-core/src/test/java/ch/qos/logback/core/testUtil/Env.java (original)
+++ logback/trunk/logback-core/src/test/java/ch/qos/logback/core/testUtil/Env.java Tue Nov 4 20:14:36 2008
@@ -14,8 +14,21 @@
static public boolean isWindows() {
return System.getProperty("os.name").indexOf("Windows") != -1;
}
-
+
static public boolean isLinux() {
return System.getProperty("os.name").indexOf("Linux") != -1;
}
+
+ static public boolean isJDK6OrHigher() {
+ String javaVersion = System.getProperty("java.version");
+ if (javaVersion == null) {
+ return false;
+ }
+ if (javaVersion.startsWith("1.6") || javaVersion.startsWith("1.7")) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
}
More information about the logback-dev
mailing list