----- Forwarded message from ----- To: [email protected] Subject: FYI: Fix for PR34576
This fixes a bug found when trying to run JConsole.
The isAncestorOf() method of java.awt.Container should
not return true for the container itself.
ChangeLog:
2007-12-25 Andrew John Hughes <[EMAIL PROTECTED]>
PR classpath/34576:
* java/awt/Container.java:
(isAncestorOf(Component)): Swap ordering so that
the parent is retrieved prior to checking against
this, thus preventing a component being an ancestor of
itself.
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
Index: java/awt/Container.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/Container.java,v
retrieving revision 1.112
diff -u -3 -p -u -r1.112 Container.java
--- java/awt/Container.java 27 Nov 2007 22:06:59 -0000 1.112
+++ java/awt/Container.java 25 Dec 2007 00:15:31 -0000
@@ -1322,10 +1322,10 @@ public class Container extends Component
while (true)
{
if (comp == null)
- return false;
- if (comp == this)
- return true;
+ return false;
comp = comp.getParent();
+ if (comp == this)
+ return true;
}
}
}
----- End forwarded message -----
--
Andrew :-)
Escape the Java Trap with GNU Classpath!
http://www.gnu.org/philosophy/java-trap.html
public class gcj extends Freedom implements Java { ... }
signature.asc
Description: Digital signature
