cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1494805 - /cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
Date Wed, 19 Jun 2013 23:37:41 GMT
Author: dkulp
Date: Wed Jun 19 23:37:40 2013
New Revision: 1494805

URL: http://svn.apache.org/r1494805
Log:
Skip the IOImage hack by default.  With the very latest JDK's on OSX, it will immediately
create a bouncing java icon on the Dock. Since use of Images is fairly rare, it's likely not
needed very often and it can be turned on if needed.

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java?rev=1494805&r1=1494804&r2=1494805&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java Wed Jun 19
23:37:40 2013
@@ -54,6 +54,9 @@ final class JDKBugHacks {
     }
     
     private static boolean skipHack(final String key) {
+        return skipHack(key, "false");
+    }
+    private static boolean skipHack(final String key, String def) {
         String cname = null;
         try {
             cname = AccessController.doPrivileged(new PrivilegedAction<String>() {
@@ -82,8 +85,8 @@ final class JDKBugHacks {
         } catch (Throwable t) {
             //ignore
         }
-        if (cname == null) {
-            cname = "false";
+        if (StringUtils.isEmpty(cname)) {
+            cname = def;
         }
         return Boolean.parseBoolean(cname);
     }
@@ -100,7 +103,7 @@ final class JDKBugHacks {
             try {
                 try {
                     //Trigger a call to sun.awt.AppContext.getAppContext()
-                    if (!skipHack("org.apache.cxf.JDKBugHacks.imageIO")) {
+                    if (!skipHack("org.apache.cxf.JDKBugHacks.imageIO", "true")) {
                         ImageIO.getCacheDirectory();
                     }
                 } catch (Throwable t) {



Mime
View raw message