camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: Add isJava9
Date Wed, 27 Sep 2017 09:46:11 GMT
Repository: camel
Updated Branches:
  refs/heads/master 43d021b53 -> 86b58a1ad


Add isJava9


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f3d0d4f8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f3d0d4f8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f3d0d4f8

Branch: refs/heads/master
Commit: f3d0d4f818bc68b64ee038d9c9356974f308ebe7
Parents: 43d021b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Wed Sep 27 11:44:56 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Sep 27 11:44:56 2017 +0200

----------------------------------------------------------------------
 .../apache/camel/test/junit4/TestSupport.java   | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f3d0d4f8/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
----------------------------------------------------------------------
diff --git a/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
b/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
index fcd0b7b..c9ba215 100644
--- a/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
+++ b/components/camel-test/src/main/java/org/apache/camel/test/junit4/TestSupport.java
@@ -524,7 +524,7 @@ public abstract class TestSupport extends Assert {
      */
     public static boolean isPlatform(String platform) {
         String osName = System.getProperty("os.name").toLowerCase(Locale.US);
-        return osName.indexOf(platform.toLowerCase(Locale.US)) > -1;
+        return osName.contains(platform.toLowerCase(Locale.US));
     }
 
     /**
@@ -537,14 +537,14 @@ public abstract class TestSupport extends Assert {
      */
     public static boolean isJavaVendor(String vendor) {
         String javaVendor = System.getProperty("java.vendor").toLowerCase(Locale.US);
-        return javaVendor.indexOf(vendor.toLowerCase(Locale.US)) > -1;
+        return javaVendor.contains(vendor.toLowerCase(Locale.US));
     }
 
     /**
      * Is this Java 1.5
      *
      * @return <tt>true</tt> if its Java 1.5, <tt>false</tt> if its
not (for example Java 1.6 or better)
-     * @deprecated will be removed in the near future as Camel now requires JDK1.6+
+     * @deprecated will be removed in the future as Camel requires JDK1.8+
      */
     @Deprecated
     public static boolean isJava15() {
@@ -555,7 +555,9 @@ public abstract class TestSupport extends Assert {
      * Is this Java 1.6
      *
      * @return <tt>true</tt> if its Java 1.6, <tt>false</tt> if its
not (for example Java 1.7 or better)
+     * @deprecated will be removed in the future as Camel requires JDK1.8+
      */
+    @Deprecated
     public static boolean isJava16() {
         return getJavaMajorVersion() == 6;
 
@@ -565,7 +567,9 @@ public abstract class TestSupport extends Assert {
      * Is this Java 1.7
      *
      * @return <tt>true</tt> if its Java 1.7, <tt>false</tt> if its
not (for example Java 1.6 or older)
+     * @deprecated will be removed in the future as Camel requires JDK1.8+
      */
+    @Deprecated
     public static boolean isJava17() {
         return getJavaMajorVersion() == 7;
 
@@ -582,6 +586,16 @@ public abstract class TestSupport extends Assert {
     }
 
     /**
+     * Is this Java 1.9
+     *
+     * @return <tt>true</tt> if its Java 1.9, <tt>false</tt> if its
not (for example Java 1.8 or older)
+     */
+    public static boolean isJava19() {
+        return getJavaMajorVersion() == 9;
+
+    }
+
+    /**
      * Returns the current major Java version e.g 8.
      * <p/>
      * Uses <tt>java.specification.version</tt> from the system properties to
determine the major version.


Mime
View raw message