Overwrite the URLStreamHandler.getHostAddress(URL) in the ExtensionManager to immediately return null to prevent DNS lookup (FELIX-388).
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@582690 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java b/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
index aa67456..ac3f89e 100644
--- a/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
+++ b/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
@@ -19,6 +19,7 @@
package org.apache.felix.framework;
import java.io.IOException;
+import java.net.InetAddress;
import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
@@ -526,6 +527,12 @@
throw new IOException("Resource not provided by any extension!");
}
+ protected InetAddress getHostAddress(URL u)
+ {
+ // the extension URLs do not address real hosts
+ return null;
+ }
+
private synchronized void addExtension(Object source, Bundle extension)
{
List sourceExtensions = (List) m_sourceToExtensions.get(source);