I'm checking this in.
We've had a number of workarounds for gcj front end bugs in Classpath.
This patch removes them all. This is ok because gcj won't compile the
generics code anyhow.
Tom
Index: ChangeLog
from Tom Tromey <[EMAIL PROTECTED]>
* java/security/BasicPermission.java: Remove gcj workaround.
* java/security/cert/X509Certificate.java: Remove gcj workaround.
* java/net/ServerSocket.java (ServerSocket): Remove gcj
workaround.
(getImpl): Likewise.
* java/util/TreeMap.java (TreeIterator): Remove gcj workaround.
* java/text/AttributedStringIterator.java (getRunLimit): Remove
qualifications.
(getRunStart): Likewise.
* java/awt/AWTKeyStroke.java (removeEldestEntry): Remove gcj
workaround.
* java/awt/AlphaComposite.java (removeEldestEntry): Remove gcj
workaround.
* java/awt/geom/GeneralPath.java (WIND_EVEN_ODD, WIND_NON_ZERO,
BIG_VALUE): Don't fully qualify.
* gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java: Removed
imports.
* gnu/javax/sound/midi/alsa/AlsaPortDevice.java: Removed import.
* gnu/javax/sound/midi/dssi/DSSISynthesizer.java: Removed import.
* javax/swing/JComponent.java (firePropertyChange): Removed.
* javax/swing/text/InternationalFormatter.java (clone):
Uncomment.
* javax/swing/text/AbstractDocument.java (addEdit): Remove gcj
workaround.
(getChange): Likewise.
2006-12-13 Tom Tromey <[EMAIL PROTECTED]>
Index: gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java,v
retrieving revision 1.2
diff -u -r1.2 AlsaMidiSequencerDevice.java
--- gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java 7 Oct 2005 03:21:05
-0000 1.2
+++ gnu/javax/sound/midi/alsa/AlsaMidiSequencerDevice.java 13 Dec 2006 20:26:11
-0000
@@ -1,5 +1,5 @@
/* AlsaMidiSequencerDevice.java -- The ALSA MIDI sequencer device
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -51,10 +51,6 @@
import javax.sound.midi.Track;
import javax.sound.midi.Transmitter;
-// FIXME: These next two imports are only required by gcj it seems.
-import javax.sound.midi.MidiDevice.Info;
-import javax.sound.midi.Sequencer.SyncMode;
-
/**
* The ALSA MIDI sequencer device. This is a singleton device.
*
Index: gnu/javax/sound/midi/alsa/AlsaPortDevice.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/javax/sound/midi/alsa/AlsaPortDevice.java,v
retrieving revision 1.1
diff -u -r1.1 AlsaPortDevice.java
--- gnu/javax/sound/midi/alsa/AlsaPortDevice.java 3 Oct 2005 01:53:12 -0000 1.1
+++ gnu/javax/sound/midi/alsa/AlsaPortDevice.java 13 Dec 2006 20:26:11 -0000
@@ -1,5 +1,5 @@
/* AlsaPortDevice.java -- ALSA MIDI Port Devices
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -43,9 +43,6 @@
import javax.sound.midi.Receiver;
import javax.sound.midi.Transmitter;
-// FIXME: This next import is only rquired for gcj it seems.
-import javax.sound.midi.MidiDevice.Info;
-
import gnu.javax.sound.midi.alsa.AlsaMidiDeviceProvider.AlsaPortInfo;
/**
Index: gnu/javax/sound/midi/dssi/DSSISynthesizer.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/gnu/javax/sound/midi/dssi/DSSISynthesizer.java,v
retrieving revision 1.4
diff -u -r1.4 DSSISynthesizer.java
--- gnu/javax/sound/midi/dssi/DSSISynthesizer.java 8 Oct 2005 04:10:47 -0000 1.4
+++ gnu/javax/sound/midi/dssi/DSSISynthesizer.java 13 Dec 2006 20:26:11 -0000
@@ -1,5 +1,5 @@
/* DSSISynthesizer.java -- DSSI Synthesizer Provider
- Copyright (C) 2005 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -55,9 +55,6 @@
import javax.sound.midi.Transmitter;
import javax.sound.midi.VoiceStatus;
-// FIXME: This import in only required for gcj it seems.
-import javax.sound.midi.MidiDevice.Info;
-
/**
* DSSI soft-synth support.
*
Index: java/awt/AWTKeyStroke.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AWTKeyStroke.java,v
retrieving revision 1.13
diff -u -r1.13 AWTKeyStroke.java
--- java/awt/AWTKeyStroke.java 10 Dec 2006 20:25:43 -0000 1.13
+++ java/awt/AWTKeyStroke.java 13 Dec 2006 20:26:12 -0000
@@ -1,5 +1,5 @@
/* AWTKeyStroke.java -- an immutable key stroke
- Copyright (C) 2002, 2004, 2005 Free Software Foundation
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation
This file is part of GNU Classpath.
@@ -93,9 +93,9 @@
private static final int MAX_CACHE_SIZE = 2048;
/** Prune stale entries. */
- protected boolean removeEldestEntry(Map.Entry<AWTKeyStroke,AWTKeyStroke>
+ protected boolean removeEldestEntry(Entry<AWTKeyStroke,AWTKeyStroke>
eldest)
- { // XXX - FIXME Use Map.Entry, not just Entry as gcj 3.1 workaround.
+ {
return size() > MAX_CACHE_SIZE;
}
};
Index: java/awt/AlphaComposite.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/AlphaComposite.java,v
retrieving revision 1.8
diff -u -r1.8 AlphaComposite.java
--- java/awt/AlphaComposite.java 3 May 2006 11:24:50 -0000 1.8
+++ java/awt/AlphaComposite.java 13 Dec 2006 20:26:12 -0000
@@ -1,5 +1,5 @@
/* AlphaComposite.java -- provides a context for performing alpha compositing
- Copyright (C) 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -61,8 +61,8 @@
private static final int MAX_CACHE_SIZE = 2048;
/** Prune stale entries. */
- protected boolean removeEldestEntry(Map.Entry eldest)
- { // XXX - FIXME Use Map.Entry, not just Entry as gcj 3.1 workaround.
+ protected boolean removeEldestEntry(Entry eldest)
+ {
return size() > MAX_CACHE_SIZE;
}
};
Index: java/awt/geom/GeneralPath.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/awt/geom/GeneralPath.java,v
retrieving revision 1.18
diff -u -r1.18 GeneralPath.java
--- java/awt/geom/GeneralPath.java 2 Nov 2006 17:32:49 -0000 1.18
+++ java/awt/geom/GeneralPath.java 13 Dec 2006 20:26:12 -0000
@@ -79,22 +79,17 @@
*/
public final class GeneralPath implements Shape, Cloneable
{
- // WORKAROUND for gcj 4.0.x (x < 3)
- // fully qualify PathIterator constants.
-
/** Same constant as [EMAIL PROTECTED] PathIterator#WIND_EVEN_ODD}. */
- public static final int WIND_EVEN_ODD
- = java.awt.geom.PathIterator.WIND_EVEN_ODD;
+ public static final int WIND_EVEN_ODD = PathIterator.WIND_EVEN_ODD;
/** Same constant as [EMAIL PROTECTED] PathIterator#WIND_NON_ZERO}. */
- public static final int WIND_NON_ZERO
- = java.awt.geom.PathIterator.WIND_NON_ZERO;
+ public static final int WIND_NON_ZERO = PathIterator.WIND_NON_ZERO;
/** Initial size if not specified. */
private static final int INIT_SIZE = 10;
/** A big number, but not so big it can't survive a few float operations */
- private static final double BIG_VALUE = java.lang.Double.MAX_VALUE / 10.0;
+ private static final double BIG_VALUE = Double.MAX_VALUE / 10.0;
/** The winding rule.
* This is package-private to avoid an accessor method.
Index: java/net/ServerSocket.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/ServerSocket.java,v
retrieving revision 1.49
diff -u -r1.49 ServerSocket.java
--- java/net/ServerSocket.java 9 Oct 2006 14:49:33 -0000 1.49
+++ java/net/ServerSocket.java 13 Dec 2006 20:26:12 -0000
@@ -85,9 +85,7 @@
* This constructor is only used by java.nio.
*/
- // FIXME: Workaround a bug in gcj.
- //ServerSocket (PlainSocketImpl impl) throws IOException
- ServerSocket(SocketImpl impl) throws IOException
+ ServerSocket(PlainSocketImpl impl) throws IOException
{
if (impl == null)
throw new NullPointerException("impl may not be null");
@@ -101,8 +99,6 @@
* This method is only used by java.nio.
*/
- // FIXME: Workaround a bug in gcj.
- //PlainSocketImpl getImpl()
SocketImpl getImpl()
{
return impl;
Index: java/security/BasicPermission.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/BasicPermission.java,v
retrieving revision 1.16
diff -u -r1.16 BasicPermission.java
--- java/security/BasicPermission.java 17 Mar 2006 10:55:37 -0000 1.16
+++ java/security/BasicPermission.java 13 Dec 2006 20:26:13 -0000
@@ -73,9 +73,8 @@
* @since 1.1
* @status updated to 1.4
*/
-public abstract class BasicPermission extends java.security.Permission
+public abstract class BasicPermission extends Permission
implements Serializable
- // FIXME extends with fully qualified classname as workaround for gcj 3.3.
{
/**
* Compatible with JDK 1.1+.
Index: java/security/cert/X509Certificate.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/security/cert/X509Certificate.java,v
retrieving revision 1.10
diff -u -r1.10 X509Certificate.java
--- java/security/cert/X509Certificate.java 10 Dec 2006 20:25:45 -0000 1.10
+++ java/security/cert/X509Certificate.java 13 Dec 2006 20:26:13 -0000
@@ -1,5 +1,5 @@
/* X509Certificate.java --- X.509 Certificate class
- Copyright (C) 1999,2003 Free Software Foundation, Inc.
+ Copyright (C) 1999,2003, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -137,7 +137,7 @@
* @author Casey Marshall ([EMAIL PROTECTED])
*/
public abstract class X509Certificate
- extends java.security.cert.Certificate // XXX workaround for gcj bug #17845
+ extends Certificate
implements X509Extension
{
private static final long serialVersionUID = -2491127588187038216L;
Index: java/text/AttributedStringIterator.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/text/AttributedStringIterator.java,v
retrieving revision 1.14
diff -u -r1.14 AttributedStringIterator.java
--- java/text/AttributedStringIterator.java 11 Sep 2006 13:56:09 -0000 1.14
+++ java/text/AttributedStringIterator.java 13 Dec 2006 20:26:13 -0000
@@ -213,9 +213,7 @@
Iterator iterator = attributeSet.iterator();
while (iterator.hasNext())
{
- // Qualified name is a workaround for a gcj 4.0 bug.
- AttributedCharacterIterator.Attribute attributeKey
- = (AttributedCharacterIterator.Attribute) iterator.next();
+ Attribute attributeKey = (Attribute) iterator.next();
Object v1 = runValues.get(attributeKey);
Object v2 = getAttribute(attributeKey, limit + 1);
boolean changed = false;
@@ -298,9 +296,7 @@
Iterator iterator = attributeSet.iterator();
while (iterator.hasNext())
{
- // Qualified name is a workaround for a gcj 4.0 bug.
- AttributedCharacterIterator.Attribute attributeKey
- = (AttributedCharacterIterator.Attribute) iterator.next();
+ Attribute attributeKey = (Attribute) iterator.next();
Object v1 = runValues.get(attributeKey);
Object v2 = getAttribute(attributeKey, prev);
boolean changed = false;
Index: java/util/TreeMap.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/util/TreeMap.java,v
retrieving revision 1.31
diff -u -r1.31 TreeMap.java
--- java/util/TreeMap.java 10 Dec 2006 20:25:46 -0000 1.31
+++ java/util/TreeMap.java 13 Dec 2006 20:26:13 -0000
@@ -1,6 +1,6 @@
/* TreeMap.java -- a class providing a basic Red-Black Tree data structure,
mapping Object --> Object
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005 Free Software
Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Classpath.
@@ -1409,11 +1409,7 @@
*/
TreeIterator(int type)
{
- // FIXME gcj cannot handle this. Bug java/4695
- // this(type, firstNode(), nil);
- this.type = type;
- this.next = firstNode();
- this.max = nil;
+ this(type, firstNode(), nil);
}
/**
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.149
diff -u -r1.149 JComponent.java
--- javax/swing/JComponent.java 10 Dec 2006 20:25:48 -0000 1.149
+++ javax/swing/JComponent.java 13 Dec 2006 20:26:15 -0000
@@ -1022,21 +1022,6 @@
}
/**
- * Fires a property change for a primitive character property.
- *
- * @param property the name of the property
- * @param oldValue the old value of the property
- * @param newValue the new value of the property
- */
- public void firePropertyChange(String property, char oldValue,
- char newValue)
- {
- // FIXME - This method is already public in awt Component, but
- // is included here to work around a compilation bug in gcj 4.1.
- super.firePropertyChange(property, oldValue, newValue);
- }
-
- /**
* Get the value of the accessibleContext property for this component.
*
* @return the current value of the property
Index: javax/swing/text/AbstractDocument.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/text/AbstractDocument.java,v
retrieving revision 1.65
diff -u -r1.65 AbstractDocument.java
--- javax/swing/text/AbstractDocument.java 10 Dec 2006 20:25:48 -0000 1.65
+++ javax/swing/text/AbstractDocument.java 13 Dec 2006 20:26:15 -0000
@@ -1,5 +1,5 @@
/* AbstractDocument.java --
- Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -2450,8 +2450,6 @@
*/
public boolean addEdit(UndoableEdit edit)
{
- // XXX - Fully qualify ElementChange to work around gcj bug #2499.
-
// Start using Hashtable when we pass a certain threshold. This
// gives a good memory/performance compromise.
if (changes == null && edits.size() > THRESHOLD)
@@ -2461,19 +2459,17 @@
for (int i = 0; i < count; i++)
{
Object o = edits.elementAt(i);
- if (o instanceof DocumentEvent.ElementChange)
+ if (o instanceof ElementChange)
{
- DocumentEvent.ElementChange ec =
- (DocumentEvent.ElementChange) o;
+ ElementChange ec = (ElementChange) o;
changes.put(ec.getElement(), ec);
}
}
}
- if (changes != null && edit instanceof DocumentEvent.ElementChange)
+ if (changes != null && edit instanceof ElementChange)
{
- DocumentEvent.ElementChange elEdit =
- (DocumentEvent.ElementChange) edit;
+ ElementChange elEdit = (ElementChange) edit;
changes.put(elEdit.getElement(), elEdit);
}
return super.addEdit(edit);
@@ -2527,13 +2523,12 @@
* @return the changes for <code>elem</code> or <code>null</code> if
* <code>elem</code> has not been changed
*/
- public DocumentEvent.ElementChange getChange(Element elem)
+ public ElementChange getChange(Element elem)
{
- // XXX - Fully qualify ElementChange to work around gcj bug #2499.
- DocumentEvent.ElementChange change = null;
+ ElementChange change = null;
if (changes != null)
{
- change = (DocumentEvent.ElementChange) changes.get(elem);
+ change = (ElementChange) changes.get(elem);
}
else
{
@@ -2541,10 +2536,9 @@
for (int i = 0; i < count && change == null; i++)
{
Object o = edits.get(i);
- if (o instanceof DocumentEvent.ElementChange)
+ if (o instanceof ElementChange)
{
- DocumentEvent.ElementChange ec =
- (DocumentEvent.ElementChange) o;
+ ElementChange ec = (ElementChange) o;
if (elem.equals(ec.getElement()))
change = ec;
}
Index: javax/swing/text/InternationalFormatter.java
===================================================================
RCS file:
/cvsroot/classpath/classpath/javax/swing/text/InternationalFormatter.java,v
retrieving revision 1.9
diff -u -r1.9 InternationalFormatter.java
--- javax/swing/text/InternationalFormatter.java 29 Aug 2006 19:50:39 -0000 1.9
+++ javax/swing/text/InternationalFormatter.java 13 Dec 2006 20:26:16 -0000
@@ -1,5 +1,5 @@
/* InternationalFormatter.java --
-Copyright (C) 2005 Free Software Foundation, Inc.
+Copyright (C) 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -329,7 +329,7 @@
*
* @throws CloneNotSupportedException not thrown here, since cloning is
* supported
- * XXX - FIXME - Whole method disabled as workaround for gcj bug #22060.
+ */
public Object clone()
throws CloneNotSupportedException
{
@@ -338,7 +338,6 @@
Object clone = super.clone();
return clone;
}
- */
/**
* Returns the Actions that are supported by this Formatter.