-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b40
-
generic, sparc
-
generic, solaris_9
The source in the attachment CheckLayoutLTR.java fails to compile with
recent 1.5 beta compilers because it is interpreting the import
import java.awt.geom.*
to automatically also act like this
import java.awt.geom.Rectangle2D.*
It is (applying to static inner classes-- which it didn't do before,
introducing an ambiguity.
% /import/java/jdk1.5/solaris-sparc/bin/java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b36)
Java HotSpot(TM) Server VM (build 1.5.0-beta2-b36, mixed mode)
rincewind- 255% /import/java/jdk1.5/solaris-sparc/bin/javac CheckLayoutLTR.java
CheckLayoutLTR.java:20: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
rtl.put(TextAttribute.SIZE, new Float(20));
^
CheckLayoutLTR.java:24: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
ltr.put(TextAttribute.SIZE, new Float(20));
^
CheckLayoutLTR.java:27: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
none.put(TextAttribute.SIZE, new Float(20));
recent 1.5 beta compilers because it is interpreting the import
import java.awt.geom.*
to automatically also act like this
import java.awt.geom.Rectangle2D.*
It is (applying to static inner classes-- which it didn't do before,
introducing an ambiguity.
% /import/java/jdk1.5/solaris-sparc/bin/java -version
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b36)
Java HotSpot(TM) Server VM (build 1.5.0-beta2-b36, mixed mode)
rincewind- 255% /import/java/jdk1.5/solaris-sparc/bin/javac CheckLayoutLTR.java
CheckLayoutLTR.java:20: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
rtl.put(TextAttribute.SIZE, new Float(20));
^
CheckLayoutLTR.java:24: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
ltr.put(TextAttribute.SIZE, new Float(20));
^
CheckLayoutLTR.java:27: reference to Float is ambiguous, both class java.lang.Float in java.lang and class java.awt.geom.Rectangle2D.Float in java.awt.geom.Rectangle2D match
none.put(TextAttribute.SIZE, new Float(20));
- duplicates
-
JDK-4992683 TEST_BUG: Regression-test java/awt/font/TextLayout/CheckLayoutLTR.java fails
- Closed
-
JDK-4996316 regression java/awt/font/TextLayout/CheckLayoutLTR.java : Compilation fails
- Closed