-
Bug
-
Resolution: Fixed
-
P4
-
5.0u1
-
b27
-
generic
-
generic
-
Verified
The file Test1.java is incorrectly accepted by javac:
$ cat -n Test1.java
1 @SuppressWarnings("dep-ann")
2 /** @deprecated */
3 public class Foo {}
$ cat -n Test2.java
1 package foo;
2 @SuppressWarnings("dep-ann")
3 /** @deprecated */
4 public class Foo {}
$ javac Test1.java
$ javac Test2.java
Test2.java:4: class Foo is public, should be declared in a file named Foo.java
public class Foo {}
^
1 error
$
###@###.### 2005-2-28 23:40:26 GMT
$ cat -n Test1.java
1 @SuppressWarnings("dep-ann")
2 /** @deprecated */
3 public class Foo {}
$ cat -n Test2.java
1 package foo;
2 @SuppressWarnings("dep-ann")
3 /** @deprecated */
4 public class Foo {}
$ javac Test1.java
$ javac Test2.java
Test2.java:4: class Foo is public, should be declared in a file named Foo.java
public class Foo {}
^
1 error
$
###@###.### 2005-2-28 23:40:26 GMT
- relates to
-
JDK-4986256 add support for jsr175's java.lang.SuppressWarnings
- Closed