This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: FYI: Patch: java.net.URL
- From: Michael Koch <konqueror at gmx dot de>
- To: java-patches at gcc dot gnu dot org
- Date: Sat, 27 Sep 2003 15:11:26 +0200
- Subject: Re: FYI: Patch: java.net.URL
- References: <200309271440.18581.konqueror@gmx.de>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Samstag, 27. September 2003 14:40 schrieb Michael Koch:
> Hello list,
>
>
> I commited the the attached patch to trunk to make java.net.URL
> closer to classpath's versions and fix the cache access.
I commited the attached compile fixes. :-/
Michael
- --
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/dYx+WSOgCCdjSDsRAsoyAJ0c5i7PWbhscfAyfaTEt9ODOhG50ACdH/EK
J5Dmv0UJOCZiUYxLqHLH4xE=
=ejMp
-----END PGP SIGNATURE-----
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libjava/ChangeLog,v
retrieving revision 1.2197
diff -u -b -B -r1.2197 ChangeLog
--- ChangeLog 27 Sep 2003 12:38:05 -0000 1.2197
+++ ChangeLog 27 Sep 2003 13:08:33 -0000
@@ -1,5 +1,9 @@
2003-09-27 Michael Koch <konqueror@gmx.de>
+ * java/net/URL.java (getURLStreamHandler): Compile fixes.
+
+2003-09-27 Michael Koch <konqueror@gmx.de>
+
* java/net/URL.java (getURLStreamHandler):
Check if we have to use cache before trying to retrieve handler from
cache. Rename facName to clsName to match classpath more. Reformated
Index: java/net/URL.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URL.java,v
retrieving revision 1.25
diff -u -b -B -r1.25 URL.java
--- java/net/URL.java 27 Sep 2003 12:38:05 -0000 1.25
+++ java/net/URL.java 27 Sep 2003 13:08:33 -0000
@@ -106,6 +106,11 @@
* caching behavior is disabled. This property is specific to this
* implementation. Sun's JDK may or may not do protocol caching, but it
* almost certainly does not examine this property.
+ * <p>
+ * Please also note that an application can install its own factory for
+ * loading protocol handlers (see setURLStreamHandlerFactory). If this is
+ * done, then the above information is superseded and the behavior of this
+ * class in loading protocol handlers is dependent on that factory.
*
* @author Aaron M. Renn <arenn@urbanophile.com>
* @author Warren Levy <warrenl@cygnus.com>
@@ -751,7 +756,7 @@
private static synchronized URLStreamHandler
getURLStreamHandler (String protocol)
{
- URLStreamHandler ph;
+ URLStreamHandler ph = null;
// First, see if a protocol handler is in our cache.
if (cache_handlers)
@@ -797,7 +802,7 @@
propVal = propVal + "gnu.gcj.protocol|sun.net.www.protocol";
// Finally loop through our search path looking for a match.
- StringTokenizer pkgPrefix = new StringTokenizer (ph_search_path, "|");
+ StringTokenizer pkgPrefix = new StringTokenizer (propVal, "|");
do
{