classpath
[Top][All Lists]
Advanced

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

Workarounds for gcj 3.1


From: Mark Wielaard
Subject: Workarounds for gcj 3.1
Date: 21 Apr 2002 18:32:50 +0200

Hi,

Since gcj 3.1 is about to be released and gcj 3.0 can no longer compile
the current Classpath from CVS I am going to commit the following
workarounds.

2002-04-21  Mark Wielaard  <address@hidden>

  * java/awt/AWTKeyStroke.java (removeEldestEntry): Use fully qualified
  Map.Entry as argument (gcj 3.1 workaround).
  * java/awt/im/InputSubset.java: extends fully qualified
  Character.Subset (likewise).
  * java/util/AbstractMap.java (BasicMapEntry): implements fully
  qualified Map.Entry (likewise).
  * javax/swing/JList.java (setListData): Rename innerclass AL to ALData
  to avoid name clash (likewise).

Together with the patch provided in PR java/2791 for gcj this makes it
possible to compile classpath with gcj again (jikes still works with
this applied). For more background information see:
<http://gcc.gnu.org/ml/java/2002-04/msg00292.html>

Cheers,

Mark
? java/awt/dnd/Makefile
? java/awt/im/Makefile
? java/awt/im/spi/Makefile
? java/rmi/Makefile
? java/rmi/activation/Makefile
? java/rmi/dgc/Makefile
? java/rmi/registry/Makefile
? java/rmi/server/Makefile
Index: java/awt/AWTKeyStroke.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AWTKeyStroke.java,v
retrieving revision 1.1
diff -u -r1.1 AWTKeyStroke.java
--- java/awt/AWTKeyStroke.java  31 Mar 2002 02:05:37 -0000      1.1
+++ java/awt/AWTKeyStroke.java  21 Apr 2002 16:11:34 -0000
@@ -48,6 +48,7 @@
 import java.security.PrivilegedAction;
 import java.security.PrivilegedActionException;
 import java.security.PrivilegedExceptionAction;
+import java.util.Map;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.StringTokenizer;
@@ -89,7 +90,7 @@
     private static final int MAX_CACHE_SIZE = 2048;
 
     /** Prune stale entries. */
-    protected boolean removeEldestEntry(Entry eldest)
+    protected boolean removeEldestEntry(Map.Entry eldest)
     {
       return size() > MAX_CACHE_SIZE;
     }
Index: java/awt/im/InputSubset.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/im/InputSubset.java,v
retrieving revision 1.1
diff -u -r1.1 InputSubset.java
--- java/awt/im/InputSubset.java        29 Mar 2002 05:53:18 -0000      1.1
+++ java/awt/im/InputSubset.java        21 Apr 2002 16:11:34 -0000
@@ -46,7 +46,7 @@
  * @since 1.2
  * @status updated to 1.4
  */
-public final class InputSubset extends Character.Subset
+public final class InputSubset extends java.lang.Character.Subset
 {
   /**
    * Constant for all Latin characters, including the characters in the
Index: java/util/AbstractMap.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/AbstractMap.java,v
retrieving revision 1.22
diff -u -r1.22 AbstractMap.java
--- java/util/AbstractMap.java  8 Apr 2002 00:20:00 -0000       1.22
+++ java/util/AbstractMap.java  21 Apr 2002 16:11:34 -0000
@@ -527,7 +527,7 @@
    * @author Jon Zeppieri
    * @author Eric Blake <address@hidden>
    */
-  static class BasicMapEntry implements Entry
+  static class BasicMapEntry implements Map.Entry
   {
     /**
      * The key. Package visible for direct manipulation.
? javax/accessibility/Makefile
Index: javax/swing/JList.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JList.java,v
retrieving revision 1.3
diff -u -r1.3 JList.java
--- javax/swing/JList.java      8 Apr 2002 10:14:49 -0000       1.3
+++ javax/swing/JList.java      21 Apr 2002 16:16:51 -0000
@@ -106,13 +106,13 @@
     
     public void setListData(final Vector listData)
     {
-       class AL extends AbstractListModel 
+       class ALData extends AbstractListModel 
        {
            public int getSize()              { return listData.size(); }
            public Object getElementAt(int i) { return listData.elementAt(i); }
        };
        
-        setModel (new AL());
+        setModel (new ALData());
     }
     
     

reply via email to

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