DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11196>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11196

ClassLoader  does not produce an appropriate package name

           Summary: ClassLoader  does not produce an appropriate package
                    name
           Product: Ant
           Version: 1.5
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


it seems the AntClassLoader does not correctly resolve the package name for a
class not loaded via the bootclasspath.

the particular case i am running involes a JUnit test case which attempts to
strip off the package name by doing:

Class oink = moo.cow.Piggy.class;
String oinkClassName = oink.getName();
String oinkPackageName = oink.getPackage().getName(); 
String classNameNoPackage = oinkClassName.substring(oinkPackageName + 1);

oink.getPackage() will return null.

the workaround is to have junit fork the jvm.  the forked jvm will return an
appropriate package name.

the JVM i'm running is JDK 1.3.1 (build 1.3.1-b24) on solaris 2.8

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to