8194764: javac incorrectly flags deprecated for removal imports
Fixing source range for the Source.Feature.DEPRECATE_ON_IMPORT Reviewed-by: mcimadamore
This commit is contained in:
parent
b0cb59ac31
commit
d5ec9dbfb5
src/jdk.compiler/share/classes/com/sun/tools/javac/code
test/langtools/tools/javac/warnings
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2002, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -152,7 +152,7 @@ public enum Source {
|
||||
BINARY_LITERALS(JDK7, Fragments.FeatureBinaryLit, DiagKind.PLURAL),
|
||||
UNDERSCORES_IN_LITERALS(JDK7, Fragments.FeatureUnderscoreLit, DiagKind.PLURAL),
|
||||
STRINGS_IN_SWITCH(JDK7, Fragments.FeatureStringSwitch, DiagKind.PLURAL),
|
||||
DEPRECATION_ON_IMPORT(MIN, JDK9),
|
||||
DEPRECATION_ON_IMPORT(MIN, JDK8),
|
||||
SIMPLIFIED_VARARGS(JDK7),
|
||||
OBJECT_TO_PRIMITIVE_CAST(JDK7),
|
||||
ENFORCE_THIS_DOT_INIT(JDK7),
|
||||
|
@ -1,8 +1,9 @@
|
||||
/**
|
||||
* @test /nodynamiccopyright/
|
||||
* @bug 4986256 6598104 8032211
|
||||
* @bug 4986256 6598104 8032211 8194764
|
||||
* @compile/ref=Deprecation.noLint.out -XDrawDiagnostics Deprecation.java
|
||||
* @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation -XDrawDiagnostics Deprecation.java
|
||||
* @compile/ref=Deprecation.lintDeprecation.out -Xlint:deprecation,-options -source 9 -XDrawDiagnostics Deprecation.java
|
||||
* @compile/ref=Deprecation.lintDeprecation8.out -Xlint:deprecation,-options -source 8 -XDrawDiagnostics Deprecation.java
|
||||
*/
|
||||
|
||||
|
@ -1,3 +1,3 @@
|
||||
Deprecation.java:20:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:57:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:21:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:58:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
2 warnings
|
||||
|
@ -1,4 +1,4 @@
|
||||
Deprecation.java:9:15: compiler.warn.has.been.deprecated: java.io.StringBufferInputStream, java.io
|
||||
Deprecation.java:20:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:57:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:10:15: compiler.warn.has.been.deprecated: java.io.StringBufferInputStream, java.io
|
||||
Deprecation.java:21:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
Deprecation.java:58:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package
|
||||
3 warnings
|
||||
|
Loading…
x
Reference in New Issue
Block a user