ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 35436] New: - AntClassLoader returns false loader in getParent()
Date Mon, 20 Jun 2005 19:59:44 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35436>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=35436

           Summary: AntClassLoader returns false loader in getParent()
           Product: Ant
           Version: 1.7Alpha (nightly)
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: rainer@noacks.net


Calling getParent() on oata.AntClassLoader doesn't return the - expected - 
actual parent classloader but allways the SystemClassLoader.

The Reason is simple:
Parent-Property is immutuable in java.lang.ClassLoader and getParent() is 
final.
AntClassLoader has a local, mutuable parent property that can be set via 
setParent(ClassLoader).

However, there should be a way to get AntClassLoader's real parent loader.

I see two solutions:
1. Remove the local property and it's setter-method. Allow setting of the
   parent only in the constructors. Use ClassLoader's parent property.
   Advantages: IMHO, the cleanest solution.
   Disadvantages: Many build brakes.
   Fazit: Not usable
2. Provide a "special" getter like getRealParent()
   Advantages: works with existing environments.
   Disadvantages: such a shame
   Fazit: No better way !?

Any other idea?

Regards

Rainer

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message