# HG changeset patch # User jlahoda # Date 1518018564 -3600 # Node ID 107413b070b92c88bde6230ceb4a19b579781068 # Parent 7c59727b4890f972019180f28cc824291dc4834c 8194764: javac incorrectly flags deprecated for removal imports Summary: Fixing source range for the Source.Feature.DEPRECATE_ON_IMPORT Reviewed-by: mcimadamore diff -r 7c59727b4890 -r 107413b070b9 src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java Wed Feb 07 09:18:13 2018 +0100 +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Source.java Wed Feb 07 16:49:24 2018 +0100 @@ -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 @@ 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), diff -r 7c59727b4890 -r 107413b070b9 test/langtools/tools/javac/warnings/Deprecation.java --- a/test/langtools/tools/javac/warnings/Deprecation.java Wed Feb 07 09:18:13 2018 +0100 +++ b/test/langtools/tools/javac/warnings/Deprecation.java Wed Feb 07 16:49:24 2018 +0100 @@ -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 */ diff -r 7c59727b4890 -r 107413b070b9 test/langtools/tools/javac/warnings/Deprecation.lintDeprecation.out --- a/test/langtools/tools/javac/warnings/Deprecation.lintDeprecation.out Wed Feb 07 09:18:13 2018 +0100 +++ b/test/langtools/tools/javac/warnings/Deprecation.lintDeprecation.out Wed Feb 07 16:49:24 2018 +0100 @@ -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 diff -r 7c59727b4890 -r 107413b070b9 test/langtools/tools/javac/warnings/Deprecation.lintDeprecation8.out --- a/test/langtools/tools/javac/warnings/Deprecation.lintDeprecation8.out Wed Feb 07 09:18:13 2018 +0100 +++ b/test/langtools/tools/javac/warnings/Deprecation.lintDeprecation8.out Wed Feb 07 16:49:24 2018 +0100 @@ -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