This is the mail archive of the java-patches@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: Cleaner stacktraces and diagnostics


Mark Wielaard writes:
 > Hi,
 > 
 > On Fri, 2005-02-11 at 23:15 +0100, Mark Wielaard wrote:
 > > On Fri, 2005-02-11 at 18:08 +0000, Andrew Haley wrote:
 > > > With your patch, a failure to find a class will return only the
 > > > classpath of the final loader that tried to find the class.  But the
 > > > user needs to see all the classpaths that were searched, not just the
 > > > last one.
 > > 
 > > OK if you think that is needed. It is indeed a nice GNU extension that
 > > our URLClassLoaders actually give the whole seearch path. I think I know
 > > how to extend that to provide the parent classloaders (plus search
 > > paths) without having to create and rechain extra
 > > ClassNotFoundExceptions.
 > > 
 > > Is the rest of the patch (minus the java.lang.ClassLoader.loadClass()
 > > part) OK? Then I commit that and provide a new patch for the chaining
 > > confusion and efficiency problem in loadClass() later.
 > 
 > Since the original patch hasn't been approved yet, I just add my
 > proposal for a nicer and more efficient parent class loader search path
 > in ClassNotFoundExceptions to it. I tested them together anyway. No test
 > regressions and eclipse works fine with this.

That looks really nice.

 > 2005-02-12  Mark Wielaard  <mark@klomp.org>
 > 
 >         Fixes bug libgcj/8170
 >         * java/lang/ClassLoader.java (loadClass): Don't rewrap
 >         ClassNotFoundException.
 >         * gnu/java/lang/MainThread.java (run): Chain NoClassDefFoundError.
 >         * gnu/gcj/runtime/NameFinder.java (remove_interpreter): Removed.
 >         (remove_internal): New field superceding remove_interpreter.
 >         (sanitizeStack): Remove all no-package classes starting with "_Jv_".
 >         Remove no-class methods starting with "_Jv_". And Replace null
 >         class or method names with the empty string. Stop at either the
 >         MainThread or a real Thread run() method.
 >         (newElement): Made static.
 >         * java/net/URLClassLoader.java (findClass): Throw
 >         ClassNotFoundExceptions including urls, plus parent using toString().
 >         (thisString): New field.
 >         (toString): New method.
 > 
 > OK to commit?

Yes.  Cleaner, faster, more efficient.  Better in every way, really.

Andrew.


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