You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2011/07/06 16:59:08 UTC
svn commit: r1143452 -
/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/logging/JDKBugHacks.java
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