classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix for Hashtable contains blowing up the stack


From: Dalibor Topic
Subject: [PATCH] Fix for Hashtable contains blowing up the stack
Date: Fri, 21 Nov 2003 20:40:24 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Hi all,

attached is my fix to make ant (I think) work again with Classpath, fixing the bug reported by Jim Pick here [1]

Citing myself [2]:
this is a typical java library bug, and I've both produced and fixed a couple of those myself ;) You get an infinite recursion through calling overridden methods. Class A in library implements public methods b and c, where b internally (and of course undocumentedly ;) calls c. Class B from some user of the library extends A and overrides c to call b. When the user calls the method b of class B it goes straight into an infinite loop.

The fix is to avoid calling overridable methods from overridable methods, and to delegate those calls to internal, non-overridable versions of the methods.

2003-11-21  Dalibor Topic <address@hidden>

        * libraries/javalib/java/util/Hashtable.java:
        (internalcontainsValue) new method.
        (contains, containsValue) delegate to internalContainsValue.

        Reported by: Jim Pick <address@hidden>

cheers,
dalibor topic

[1] http://mail.gnu.org/archive/html/classpath/2003-09/msg00009.html
[2] http://mail.gnu.org/archive/html/classpath/2003-09/msg00016.html





reply via email to

[Prev in Thread] Current Thread [Next in Thread]