Hi,

this patch moves the initialization of some fields into a
static initializer so they are no longer constants. Also
weird thats what the JDK does and is reported by reverse japi.

2006-04-08  Wolfgang Baer  <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicInternalFrameTitlePane.java:
        (CLOSE_CMD, ICONIFY_CMD, MAXIMIZE_CMD, MOVE_CMD, RESTORE_CMD, SIZE_CMD):
        No longer constants.    
        * javax/accessibility/AccessibleRelation.java (LABEL_FOR, LABELED_BY,
        MEMBER_OF, CONTROLLER_FOR, CONTROLLED_BY): No longer constants.

Wolfgang

Index: javax/accessibility/AccessibleRelation.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/accessibility/AccessibleRelation.java,v
retrieving revision 1.4
diff -u -r1.4 AccessibleRelation.java
--- javax/accessibility/AccessibleRelation.java	13 Jul 2005 13:45:00 -0000	1.4
+++ javax/accessibility/AccessibleRelation.java	8 Apr 2006 13:36:36 -0000
@@ -61,7 +61,7 @@
    * @see #LABELED_BY
    * @see #MEMBER_OF
    */
-  public static final String LABEL_FOR = "labelFor";
+  public static final String LABEL_FOR;
 
   /**
    * Indicates the object is labeled by other objects.
@@ -72,7 +72,7 @@
    * @see #LABEL_FOR
    * @see #MEMBER_OF
    */
-  public static final String LABELED_BY = "labeledBy";
+  public static final String LABELED_BY;
 
   /**
    * Indicates an object is a member of a group of target objects.
@@ -83,7 +83,7 @@
    * @see #LABEL_FOR
    * @see #LABELED_BY
    */
-  public static final String MEMBER_OF = "memberOf";
+  public static final String MEMBER_OF;
 
   /**
    * Indicates an object is a controller for other objects.
@@ -94,7 +94,7 @@
    * @see #LABELED_BY
    * @see #MEMBER_OF
    */
-  public static final String CONTROLLER_FOR = "controllerFor";
+  public static final String CONTROLLER_FOR;
 
   /**
    * Indicates an object is controlled by other objects.
@@ -105,7 +105,7 @@
    * @see #LABELED_BY
    * @see #MEMBER_OF
    */
-  public static final String CONTROLLED_BY = "controlledBy";
+  public static final String CONTROLLED_BY;
 
   /** Indicates that the label target group has changed. */
   public static final String LABEL_FOR_PROPERTY = "labelForProperty";
@@ -124,6 +124,16 @@
 
   /** An empty set of targets. */
   private static final Object[] EMPTY_TARGETS = { };
+  
+  static
+    {
+      // not constants in JDK
+      LABEL_FOR = "labelFor";
+      LABELED_BY = "labeledBy";
+      MEMBER_OF = "memberOf";
+      CONTROLLER_FOR = "controllerFor";
+      CONTROLLED_BY = "controlledBy";
+    }
 
   /**
    * The related objects.
Index: javax/swing/plaf/basic/BasicInternalFrameTitlePane.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicInternalFrameTitlePane.java,v
retrieving revision 1.21
diff -u -r1.21 BasicInternalFrameTitlePane.java
--- javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	15 Mar 2006 18:25:05 -0000	1.21
+++ javax/swing/plaf/basic/BasicInternalFrameTitlePane.java	8 Apr 2006 13:36:36 -0000
@@ -520,22 +520,22 @@
   }
 
   /** The action command for the Close action. */
-  protected static final String CLOSE_CMD = "Close";
+  protected static final String CLOSE_CMD;
 
   /** The action command for the Minimize action. */
-  protected static final String ICONIFY_CMD = "Minimize";
+  protected static final String ICONIFY_CMD;
 
   /** The action command for the Maximize action. */
-  protected static final String MAXIMIZE_CMD = "Maximize";
+  protected static final String MAXIMIZE_CMD;
 
   /** The action command for the Move action. */
-  protected static final String MOVE_CMD = "Move";
+  protected static final String MOVE_CMD;
 
   /** The action command for the Restore action. */
-  protected static final String RESTORE_CMD = "Restore";
+  protected static final String RESTORE_CMD;
 
   /** The action command for the Size action. */
-  protected static final String SIZE_CMD = "Size";
+  protected static final String SIZE_CMD;
 
   /** The action associated with closing the JInternalFrame. */
   protected Action closeAction;
@@ -614,6 +614,17 @@
    * This is package-private to avoid an accessor method.
    */
   transient JLabel title;
+  
+  static
+    {
+      // not constants in JDK
+      CLOSE_CMD = "Close";
+      ICONIFY_CMD = "Minimize";
+      MAXIMIZE_CMD = "Maximize";
+      MOVE_CMD = "Move";
+      RESTORE_CMD = "Restore";
+      SIZE_CMD = "Size";
+    }
 
   /**
    * Creates a new BasicInternalFrameTitlePane object that is used in the

Reply via email to