JDK-6729835 : Deprecated flag before import or package is not processed properly
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Resolved
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2008-07-25
  • Updated: 2013-09-10
  • Resolved: 2013-09-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
FULL PRODUCT VERSION :
javac -version
javac 1.6.0_06

A DESCRIPTION OF THE PROBLEM :
Compile the following code with javac -Xlint:deprecation src.java,
A warning will be given :
warning: [deprecation] test.b in test has been deprecated
b c = new b();

/**
 * @deprecated
 */
package test;
class b{
	
}

public class Test{
	public static void main(String[] args) {
		b c = new b();
	}
}


REPRODUCIBILITY :
This bug can be reproduced always.

Comments
Appears this has been resolved by the fix for JDK-7096014. Looked at the tests for that bug as well, and appears the tests are verifying the comment is attached to the top-level and not to the class, so should not regress.
10-09-2013