You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/02/24 17:04:51 UTC

[09/18] git commit: Fixed CS

Fixed CS


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

Branch: refs/heads/master
Commit: 76bc00f47a6660561d5b96a7467c0a4b4e5d9e65
Parents: 4bc7d6e
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Feb 24 16:49:40 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Feb 24 17:05:29 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/FileUtil.java    | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/76bc00f4/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
index 9668cc7..d51330f 100644
--- a/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
+++ b/camel-core/src/main/java/org/apache/camel/util/FileUtil.java
@@ -51,6 +51,12 @@ public final class FileUtil {
         // Utils method
     }
 
+    private static boolean initWindowsOs() {
+        // initialize once as System.getProperty is not fast
+        String osName = System.getProperty("os.name").toLowerCase(Locale.US);
+        return osName.contains("windows");
+    }
+
     public static File getUserDir() {
         return USER_DIR;
     }
@@ -72,11 +78,6 @@ public final class FileUtil {
         }
     }
 
-    private static boolean initWindowsOs() {
-        String osName = System.getProperty("os.name").toLowerCase(Locale.US);
-        return osName.indexOf("windows") > -1;
-    }
-
     /**
      * Returns true, if the OS is windows
      */