cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asold...@apache.org
Subject svn commit: r1143452 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
Date Wed, 06 Jul 2011 14:59:08 GMT
Author: asoldano
Date: Wed Jul  6 14:59:08 2011
New Revision: 1143452

URL: http://svn.apache.org/viewvc?rev=1143452&view=rev
Log:
[CXF-3634] Avoid opening a connection in JDKBugHacks to disable url caching

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

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java?rev=1143452&r1=1143451&r2=1143452&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java Wed
Jul  6 14:59:08 2011
@@ -19,6 +19,7 @@
 
 package org.apache.cxf.common.logging;
 
+import java.io.IOException;
 import java.lang.reflect.Method;
 import java.net.URL;
 import java.net.URLConnection;
@@ -64,7 +65,12 @@ final class JDKBugHacks {
                     // Doesn't matter that this JAR doesn't exist - just as long as
                     // the URL is well-formed
                     URL url = new URL("jar:file://dummy.jar!/");
-                    URLConnection uConn = url.openConnection();
+                    URLConnection uConn = new URLConnection(url) {
+                        @Override
+                        public void connect() throws IOException {
+                            // NOOP
+                        }
+                    };
                     uConn.setDefaultUseCaches(false);
                 } catch (Throwable e) {
                     //ignore



Mime
View raw message