You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2012/06/26 21:12:13 UTC
svn commit: r1354175 -
/felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java
Author: rickhall
Date: Tue Jun 26 19:12:13 2012
New Revision: 1354175
URL: http://svn.apache.org/viewvc?rev=1354175&view=rev
Log:
Avoid startup delay in URL Handlers. (FELIX-3262)
Modified:
felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java
Modified: felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java
URL: http://svn.apache.org/viewvc/felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java?rev=1354175&r1=1354174&r2=1354175&view=diff
==============================================================================
--- felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java (original)
+++ felix/branches/org.apache.felix.framework-4.0.3-RC/src/main/java/org/apache/felix/framework/URLHandlersBundleStreamHandler.java Tue Jun 26 19:12:13 2012
@@ -1,4 +1,4 @@
-/*
+/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -54,9 +54,9 @@ class URLHandlersBundleStreamHandler ext
{
return new URLHandlersBundleURLConnection(url, m_framework);
}
-
+
Object framework = URLHandlers.getFrameworkFromContext();
-
+
if (framework != null)
{
if (framework instanceof Felix)
@@ -67,8 +67,8 @@ class URLHandlersBundleStreamHandler ext
{
Class targetClass = framework.getClass().getClassLoader().loadClass(
URLHandlersBundleURLConnection.class.getName());
-
- Constructor constructor = m_action.getConstructor(targetClass,
+
+ Constructor constructor = m_action.getConstructor(targetClass,
new Class[]{URL.class, framework.getClass().getClassLoader().loadClass(
Felix.class.getName())});
m_action.setAccesssible(constructor);
@@ -82,7 +82,7 @@ class URLHandlersBundleStreamHandler ext
throw new IOException("No framework context found");
}
- protected void parseURL(URL u, String spec, int start, int limit)
+ protected void parseURL(URL u, String spec, int start, int limit)
{
super.parseURL(u, spec, start, limit);
@@ -92,7 +92,7 @@ class URLHandlersBundleStreamHandler ext
}
}
- protected String toExternalForm(URL u)
+ protected String toExternalForm(URL u)
{
StringBuffer result = new StringBuffer();
result.append(u.getProtocol());
@@ -100,23 +100,28 @@ class URLHandlersBundleStreamHandler ext
result.append(u.getHost());
result.append(':');
result.append(u.getPort());
- if (u.getPath() != null)
+ if (u.getPath() != null)
{
result.append(u.getPath());
}
- if (u.getQuery() != null)
+ if (u.getQuery() != null)
{
result.append('?');
result.append(u.getQuery());
}
- if (u.getRef() != null)
+ if (u.getRef() != null)
{
result.append("#");
result.append(u.getRef());
}
return result.toString();
}
-
+
+ protected java.net.InetAddress getHostAddress(URL u)
+ {
+ return null;
+ }
+
private boolean checkPermission(URL u)
{
SecurityManager sm = System.getSecurityManager();