On 10/21/2014 2:08 PM, Bernd Eckenfels wrote:
Hello,
one thing I wonder - in the old and in the new case there is nothing
in definePackage() guaring the parents from getting to know the new
package and causing a conflict (as the atomic insert is only on the
specific packages table. Are those (parent and system package)
immutable?
Each class loader maintains its own package map.
I guess your question is related to my comment about two class loaders
can define classes in a package of the same name (two different runtime
packages). ClassLoader.getPackage(s) assumes there is only one Package
for each name in the class loader chain which seems wrong to me. Claes
has filed a bug to track this:
https://bugs.openjdk.java.net/browse/JDK-8061804
Mandy
[1]
http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-October/029146.html