cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1495119 - /cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
Date Thu, 20 Jun 2013 18:16:43 GMT
Author: dkulp
Date: Thu Jun 20 18:16:43 2013
New Revision: 1495119

URL: http://svn.apache.org/r1495119
Log:
Merged revisions 1494805 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1494805 | dkulp | 2013-06-19 19:37:40 -0400 (Wed, 19 Jun 2013) | 2 lines

  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/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java

Modified: cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java?rev=1495119&r1=1495118&r2=1495119&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
(original)
+++ cxf/branches/2.7.x-fixes/api/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
Thu Jun 20 18:16:43 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