public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/23288] java.lang.Class's #getPackage() returns null
       [not found] <bug-23288-10349@http.gcc.gnu.org/bugzilla/>
@ 2006-03-07 22:41 ` tromey at gcc dot gnu dot org
  0 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2006-03-07 22:41 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from tromey at gcc dot gnu dot org  2006-03-07 22:41 -------
I believe this was fixed a while back.
The test cases work for me with 4.1.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/23288] java.lang.Class's #getPackage() returns null
  2005-08-08 18:54 [Bug libgcj/23288] New: " martin at egholm-nielsen dot dk
                   ` (2 preceding siblings ...)
  2005-09-09 21:51 ` cvs-commit at developer dot classpath dot org
@ 2005-09-15 20:17 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-15 20:17 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-15 20:17 -------
Subject: Bug 23288

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tromey@gcc.gnu.org	2005-09-15 20:17:09

Modified files:
	libjava        : ChangeLog 
	libjava/java/net: URLClassLoader.java 

Log message:
	For PR libgcj/23288:
	* java/net/URLClassLoader.java (definePackage): Correctly order
	arguments to definePackage.  Look up per-entry Attributes.
	(getAttributeValue): New method.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.3738&r2=1.3739
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/net/URLClassLoader.java.diff?cvsroot=gcc&r1=1.32&r2=1.33



-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/23288] java.lang.Class's #getPackage() returns null
  2005-08-08 18:54 [Bug libgcj/23288] New: " martin at egholm-nielsen dot dk
  2005-08-08 18:59 ` [Bug libgcj/23288] " pinskia at gcc dot gnu dot org
  2005-09-09 18:35 ` tromey at gcc dot gnu dot org
@ 2005-09-09 21:51 ` cvs-commit at developer dot classpath dot org
  2005-09-15 20:17 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at developer dot classpath dot org @ 2005-09-09 21:51 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at developer dot classpath dot org  2005-09-09 21:51 -------
Subject: Bug 23288

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Tom Tromey <tromey@savannah.gnu.org>	05/09/09 21:42:58

Modified files:
	.              : ChangeLog 
	java/net       : URLClassLoader.java 

Log message:
	For PR libgcj/23288:
	* java/net/URLClassLoader.java (definePackage): Correctly order
	arguments to definePackage.  Look up per-entry Attributes.
	(getAttributeValue): New method.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.4712&tr2=1.4713&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/net/URLClassLoader.java.diff?tr1=1.35&tr2=1.36&r1=text&r2=text






-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/23288] java.lang.Class's #getPackage() returns null
  2005-08-08 18:54 [Bug libgcj/23288] New: " martin at egholm-nielsen dot dk
  2005-08-08 18:59 ` [Bug libgcj/23288] " pinskia at gcc dot gnu dot org
@ 2005-09-09 18:35 ` tromey at gcc dot gnu dot org
  2005-09-09 21:51 ` cvs-commit at developer dot classpath dot org
  2005-09-15 20:17 ` cvs-commit at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-09-09 18:35 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From tromey at gcc dot gnu dot org  2005-09-09 18:35 -------
Note also that Package.getVersion fails when the class file comes from a
jar.  With the included example you can see this by making a manifest file
(in my example named "J/Man"):

Main-Class: men.gcjpackage.TestPackage

Name: men/gcjpackage/
Specification-Title: JChemPaint
Specification-Version: 2.0
Specification-Vendor: The JChemPaint Project
Implementation-Title: jchempaint
Implementation-Version: 2.0.12
Implementation-Vendor: The JChemPaint Project


Then make a jar:

jar -cv -m J/Man -f J/men.jar men/gcjpackage/*.class

And change the test to:

package men.gcjpackage;

public class TestPackage
{
  public static void main(String[] args)
  {
    System.out.println("ClassLoader: " + TestPackage.class.getClassLoader() );
    Package x = TestPackage.class.getPackage();
    System.out.println("Package: " + x);
    System.out.println("Version: " + x.getImplementationVersion());
  } // main
} // TestPackage


With the JDK the last line prints:

Version: 2.0.12

With gij it prints:

Version: null


As the names suggest, this prevents JChemPaint from working:
http://almost.cubic.uni-koeln.de/cdk/jcp


-- 


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug libgcj/23288] java.lang.Class's #getPackage() returns null
  2005-08-08 18:54 [Bug libgcj/23288] New: " martin at egholm-nielsen dot dk
@ 2005-08-08 18:59 ` pinskia at gcc dot gnu dot org
  2005-09-09 18:35 ` tromey at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-08 18:59 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-08 18:59 -------
Confirmed:
It works when interpreting the byte-code:
earth:~>gij men.gcjpackage.TestPackage
ClassLoader: gnu.gcj.runtime.SystemClassLoader{urls=[file:./], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
Package: package men.gcjpackage

But not when natively:
earth:~>!./a
./a.out
ClassLoader: gnu.gcj.runtime.SystemClassLoader{urls=[file:./], 
parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
Package: null

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-08 18:59:21
               date|                            |


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-03-07 22:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23288-10349@http.gcc.gnu.org/bugzilla/>
2006-03-07 22:41 ` [Bug libgcj/23288] java.lang.Class's #getPackage() returns null tromey at gcc dot gnu dot org
2005-08-08 18:54 [Bug libgcj/23288] New: " martin at egholm-nielsen dot dk
2005-08-08 18:59 ` [Bug libgcj/23288] " pinskia at gcc dot gnu dot org
2005-09-09 18:35 ` tromey at gcc dot gnu dot org
2005-09-09 21:51 ` cvs-commit at developer dot classpath dot org
2005-09-15 20:17 ` cvs-commit at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).