bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/20198] java.security.CodeSource.getLocation output is dif


From: green at redhat dot com
Subject: [Bug classpath/20198] java.security.CodeSource.getLocation output is different than expected
Date: 16 Sep 2005 23:10:52 -0000

------- Additional Comments From green at redhat dot com  2005-09-16 23:10 
-------
(In reply to comment #1)
> Created an attachment (id=9352)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9352&action=view)
> Proposed patch
> 
> This patch makes your test program emit an absolute path.
> 
> I'm not sure it's 100% correct.  For instance, perhaps we should canonicalize
> the path in addition to makeing it absolute.  Also, perhaps this should happen
> in URLClassLoader instead of the system loader.  Hopefully a discussion will
> happen on this thread:
> 
> http://gcc.gnu.org/ml/java-patches/2005-q3/msg00144.html
> 


I just checked in a patch for a related fix.   The test case look like this:

public class bug
{
    public static void main (String args[]) throws Exception
    {
        String urlString =
bug.class.getClassLoader().getResource("bug.class").toExternalForm ();
        System.out.println (urlString);
    }
}

Before patch:

$ gij bug
file:./bug.class

After patch:

$ gij bug
file:/home/green/FSF/HEAD/bug.class

Unfortunately it doesn't fix this bug (although the original patch attached to
this bug _does_).

I'll figure out what else is needed for this bug.

AG


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |green at redhat dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-07-26 22:10:59         |2005-09-16 23:10:50
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20198




reply via email to

[Prev in Thread] Current Thread [Next in Thread]