This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Sun's java vs. gij : Own classloader and static attributes


Stefan Prelle wrote:

---Using Sun's java----------------------
Value is 5
MyClassLoader.loadClass(Loaded)
MyClassLoader.loadClass(java.lang.Object)
MyClassLoader.loadClass(java.lang.System)
MyClassLoader.loadClass(java.lang.StringBuffer)
MyClassLoader.loadClass(MyStatic)
MyClassLoader.loadClass(java.io.PrintStream)
In Loaded: Value is 0
MyClassLoader.loadClass(java.lang.Class)

---Using GNU gij--------------------------
Value is 5
MyClassLoader.loadClass(Loaded)
In Loaded: Value is 5


I figured that I still don't use my ClassLoader subclass the correct
way, since it should only load that classes that haven't been loaded so
far and I think I better overwrite the findClass-Method. But anyway: Is the different behaviour of gij considered a bug or
feature?



It looks like a bug to me. The Sun implementation appears to be defining a new instance of MyStatic.class in a different classloader context, while the libgcj implementation is not. It would be good to add this testcase to mauve.


Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]