-
Enhancement
-
Resolution: Cannot Reproduce
-
P4
-
5.0
-
x86
-
windows_2000
###@###.### 2004-03-12
J2SE Version (please include all output from java -version flag):
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b40)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b40, mixed mode)
Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
No
Operating System Configuration Information (be specific):
Windows 2000 Professional SP2
Bug Description:
Compiler errors caused by a problem with a class declaration's extends
clause are in some cases accompanied by a spurious [serial] warning if
-Xlint:serial is enabled.
Test Program: SerialTest.java
// Start of SerialTest.java
class SerialTest extends Typo { }
// End of SerialTest.java
Other examples which exhibit the same behaviour:
class SerialTest extends String { }
class SerialTest extends Comparable { }
Other examples which do NOT exhibit the same behaviour:
class SerialTest extends System { }
class SerialTest implements Typo { }
Steps to Reproduce (be specific):
1) Save the Test Program above as SerialTest.java
2) javac -Xlint:all SerialTest.java
Output from javac:
SerialTest.java:1: cannot find symbol
symbol: class Typo
class SerialTest extends Typo { }
^
SerialTest.java:1: warning: [serial] serializable class SerialTest
has no definition of serialVersionUID
class SerialTest extends Typo { }
^
1 error
1 warning