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]

Patch: fixes for bougs found by jikes


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi list,


I just commited the attached patch to fix mainline for more strict 
java compilers like jikes. This should really be commited to 
java-gui-branch too.

PLEASE: Merge the recent gcj from mainline to libjava-gui-branch. This 
helps at least for some of the failures.


Michael


2004-05-30  Michael Koch  <konqueror@gmx.de>

	* java/awt/DefaultKeyboardFocusManager.java
	(dispatchEvent): Call method to get key event dispatchers.
	(dispatchKeyEvent): Call method to get key event post processors.
	* javax/swing/JComponent.java
	(listenerList): Made protected.
	* javax/swing/JOptionPane.java
	(message): Don't initialize.
	(JOptionPane): Set message text.
	* javax/swing/JPopupMenu.java
	(show): Fixed typo in argument name.
	* javax/swing/RepaintManager.java
	(paintDirtyRegions): Use public API of java.util.Map.
	* javax/swing/plaf/basic/BasicSplitPaneDivider.java
	(positionForMouseEvent): Removed redundant ';'.
	(continueDrag): Use method arguments.
- -- 
Homepage: http://www.worldforge.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAud9iWSOgCCdjSDsRAoNKAKCFuaSf0SuSC08wStiNzG0PEBjsBACfYys3
1+7HBkQIePG9QlHnRFhGWtk=
=Sk6R
-----END PGP SIGNATURE-----
Index: java/awt/DefaultKeyboardFocusManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/awt/DefaultKeyboardFocusManager.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 DefaultKeyboardFocusManager.java
--- java/awt/DefaultKeyboardFocusManager.java	27 May 2004 06:17:37 -0000	1.2
+++ java/awt/DefaultKeyboardFocusManager.java	30 May 2004 13:14:53 -0000
@@ -180,7 +180,7 @@
       {
         // Loop through all registered KeyEventDispatchers, giving
         // each a chance to handle this event.
-        Iterator i = keyEventDispatchers.iterator ();
+        Iterator i = getKeyEventDispatchers().iterator();
 
         while (i.hasNext ())
           {
@@ -234,7 +234,7 @@
 
     // Loop through all registered KeyEventPostProcessors, giving
     // each a chance to process this event.
-    Iterator i = keyEventPostProcessors.iterator ();
+    Iterator i = getKeyEventPostProcessors().iterator();
 
     while (i.hasNext ())
       {
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JComponent.java,v
retrieving revision 1.12
diff -u -b -B -r1.12 JComponent.java
--- javax/swing/JComponent.java	27 May 2004 06:17:38 -0000	1.12
+++ javax/swing/JComponent.java	30 May 2004 13:14:53 -0000
@@ -305,7 +305,7 @@
    * handled by this listener list. PropertyChangeEvents are handled in
    * {@link #changeSupport}.
    */
-  EventListenerList listenerList = new EventListenerList();
+  protected EventListenerList listenerList = new EventListenerList();
 
   /** 
    * Support for {@link PropertyChangeEvent} events. This is constructed
Index: javax/swing/JOptionPane.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JOptionPane.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 JOptionPane.java
--- javax/swing/JOptionPane.java	27 May 2004 06:17:39 -0000	1.5
+++ javax/swing/JOptionPane.java	30 May 2004 13:14:54 -0000
@@ -203,7 +203,7 @@
   protected Object inputValue = UNINITIALIZED_VALUE;
 
   /** The message displayed in the dialog/internal frame. */
-  protected Object message = "JOptionPane message";
+  protected Object message;
 
   /** The type of message displayed. */
   protected int messageType = PLAIN_MESSAGE;
@@ -235,7 +235,7 @@
    */
   public JOptionPane()
   {
-    this(this.message, PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null);
+    this("JOptionPane message", PLAIN_MESSAGE, DEFAULT_OPTION, null, null, null);
   }
 
   /**
Index: javax/swing/JPopupMenu.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/JPopupMenu.java,v
retrieving revision 1.5
diff -u -b -B -r1.5 JPopupMenu.java
--- javax/swing/JPopupMenu.java	27 May 2004 12:26:13 -0000	1.5
+++ javax/swing/JPopupMenu.java	30 May 2004 13:14:54 -0000
@@ -893,7 +893,7 @@
      * @param width DOCUMENT ME!
      * @param heigth DOCUMENT ME!
      */
-    public void show(int x, int y, int width, int heigth)
+    public void show(int x, int y, int width, int height)
     {
       JLayeredPane layeredPane;
       layeredPane = SwingUtilities.getRootPane(invoker).getLayeredPane();
Index: javax/swing/RepaintManager.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/RepaintManager.java,v
retrieving revision 1.4
diff -u -b -B -r1.4 RepaintManager.java
--- javax/swing/RepaintManager.java	27 May 2004 12:26:13 -0000	1.4
+++ javax/swing/RepaintManager.java	30 May 2004 13:14:54 -0000
@@ -41,11 +41,11 @@
 import java.awt.Dimension;
 import java.awt.Image;
 import java.awt.Rectangle;
-import java.util.AbstractMap;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.Map;
 import java.util.Vector;
 
 
@@ -441,7 +441,7 @@
     Iterator i = roots.values().iterator();
     while(i.hasNext())
       {
-        AbstractMap.BasicMapEntry ent = (AbstractMap.BasicMapEntry) i.next();
+        Map.Entry ent = (Map.Entry) i.next();
         JRootPane root = (JRootPane) ent.getKey();
         Rectangle rect = (Rectangle) ent.getValue();
         root.paintImmediately(rect);                
Index: javax/swing/plaf/basic/BasicSplitPaneDivider.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/javax/swing/plaf/basic/BasicSplitPaneDivider.java,v
retrieving revision 1.2
diff -u -b -B -r1.2 BasicSplitPaneDivider.java
--- javax/swing/plaf/basic/BasicSplitPaneDivider.java	27 May 2004 06:17:42 -0000	1.2
+++ javax/swing/plaf/basic/BasicSplitPaneDivider.java	30 May 2004 13:14:54 -0000
@@ -623,7 +623,6 @@
     protected int positionForMouseEvent(MouseEvent e)
     {
       return e.getX() + getX() - offset;
-      ;
     }
 
     /**
@@ -650,7 +649,7 @@
     protected void continueDrag(int newX, int newY)
     {
       if (isValid())
-	dragDividerTo(adjust(x, y));
+	dragDividerTo(adjust(newX, newY));
     }
 
     /**

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