This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Merge java.net.URL


Andrew Haley wrote:
> Gary Benson writes:
> > I'm planning on removing GCJ'S customized java.net.URL after the
> > branch gets merged (with something like the attached patch) but
> > there's one bit I want to check.  GCJ's URL.getURLStreamHandler()
> > has special cases for "file://" and "core://" URLs with this note:
> > 
> >   This is an interesting case.  It's tempting to think that we
> >   could call Class.forName ("gnu.java.net.protocol.file.Handler")
> >   to get the appropriate class.  Unfortunately, if we do that
> >   the program will never terminate, because getURLStreamHandler
> >   is eventually called by Class.forName.
> 
> The handler for "core" has nothing to do with that note; it's a
> separate case.

The note continues:

  Treating "file" as a special case is the minimum that will fix this
  problem.  If other protocols are required in a statically linked
  application they will need to be handled in the same way as "file".

I presumed that the "core" handler was done in this way because it
will definitly be required in a statically linked application.
  
> > The special cases are six years old, and GCJ seems to run fine
> > without them, passing make check, etc, but I wanted to see if
> > anyone knows of special weird cases in which this could break.
> 
> Well, are you suggesting we remove the "core" protocaol altogether?

No, not at all.  I'm suggesting we remove the special case for
creating core URLStreamHandlers.

Cheers,
Gary


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]