The method getDefaults() in MetalLookAndFeel initializes the defaults table only once, but calls theme.addCustomEntriesToTable() on every invokation. This is not necessary and actually leads to an infinite recursion on an application here. This is fixed.

2005-07-08  Roman Kennke  <[EMAIL PROTECTED]>

       * javax/swing/plaf/metal/MetalLookAndFeel.java
       (getDefaults): Call theme.addCustomEntriesToTable() only once
       during initialization of the defaults table.


Index: javax/swing/plaf/metal/MetalLookAndFeel.java
===================================================================
RCS file: 
/CVSROOT/Jamaica/src/classpath/javax/swing/plaf/metal/MetalLookAndFeel.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- javax/swing/plaf/metal/MetalLookAndFeel.java        5 Jul 2005 12:28:02 
-0000       1.14
+++ javax/swing/plaf/metal/MetalLookAndFeel.java        8 Jul 2005 09:18:48 
-0000       1.15
@@ -90,10 +90,12 @@
   public UIDefaults getDefaults()
   {
     if (LAF_defaults == null)
-      LAF_defaults = super.getDefaults();
+      {
+        LAF_defaults = super.getDefaults();
 
-    // add custom theme entries to the table
-    theme.addCustomEntriesToTable(LAF_defaults);
+        // add custom theme entries to the table
+        theme.addCustomEntriesToTable(LAF_defaults);
+      }
     
     // Returns the default values for this look and feel. 
     return LAF_defaults;
_______________________________________________
Classpath-patches mailing list
Classpath-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to