Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8020714 | 8 | Jan Lahoda | P4 | Closed | Duplicate | b100 |
Consider the following test files:
-----IncorrectWarning.java:
public class IncorrectWarning {
private Aux a;
}
-----
-----Aux.java:
import java.io.StringBufferInputStream;
public class Aux {
}
-----
When the deprecation warnings are enabled, there should be a warning produced for the import in the Aux class, like this:
-----
$ javac -sourcepath . -Xlint:deprecation Aux.java IncorrectWarning.java
Aux.java:1: warning: [deprecation] StringBufferInputStream in java.io has been deprecated
import java.io.StringBufferInputStream;
^
1 warning
-----
But when compiling the IncorrectWarning.java first, the warning is incorrectly put into the IncorrectWarning.java file:
-----
$ javac -sourcepath . -Xlint:deprecation IncorrectWarning.java Aux.java
IncorrectWarning.java:1: warning: [deprecation] StringBufferInputStream in java.io has been deprecated
public class IncorrectWarning {
^
1 warning
-----
This is reproducible with jdk8/tl/langtools tip:
$ hg tip
changeset: 1890:37031963493e
tag: tip
user: jjg
date: Fri Jul 12 13:11:12 2013 -0700
summary: 8020278: NPE in javadoc
Also reproducible with:
$ javac -version
javac 1.7.0_11
-----IncorrectWarning.java:
public class IncorrectWarning {
private Aux a;
}
-----
-----Aux.java:
import java.io.StringBufferInputStream;
public class Aux {
}
-----
When the deprecation warnings are enabled, there should be a warning produced for the import in the Aux class, like this:
-----
$ javac -sourcepath . -Xlint:deprecation Aux.java IncorrectWarning.java
Aux.java:1: warning: [deprecation] StringBufferInputStream in java.io has been deprecated
import java.io.StringBufferInputStream;
^
1 warning
-----
But when compiling the IncorrectWarning.java first, the warning is incorrectly put into the IncorrectWarning.java file:
-----
$ javac -sourcepath . -Xlint:deprecation IncorrectWarning.java Aux.java
IncorrectWarning.java:1: warning: [deprecation] StringBufferInputStream in java.io has been deprecated
public class IncorrectWarning {
^
1 warning
-----
This is reproducible with jdk8/tl/langtools tip:
$ hg tip
changeset: 1890:37031963493e
tag: tip
user: jjg
date: Fri Jul 12 13:11:12 2013 -0700
summary: 8020278: NPE in javadoc
Also reproducible with:
$ javac -version
javac 1.7.0_11
- backported by
-
JDK-8020714 Warning produced for an incorrect file
- Closed