src/share/classes/com/sun/tools/javac/comp/Check.java

changeset 2553
191d1aecdf68
parent 2543
c6d5efccedc3
child 2702
9ca8d8713094
child 2717
11743872bfc9
equal deleted inserted replaced
2552:02370b1748eb 2553:191d1aecdf68
1713 uncheckedOverrides(m, other)); 1713 uncheckedOverrides(m, other));
1714 } 1714 }
1715 1715
1716 // Warn if a deprecated method overridden by a non-deprecated one. 1716 // Warn if a deprecated method overridden by a non-deprecated one.
1717 if (!isDeprecatedOverrideIgnorable(other, origin)) { 1717 if (!isDeprecatedOverrideIgnorable(other, origin)) {
1718 checkDeprecated(TreeInfo.diagnosticPositionFor(m, tree), m, other); 1718 Lint prevLint = setLint(lint.augment(m));
1719 try {
1720 checkDeprecated(TreeInfo.diagnosticPositionFor(m, tree), m, other);
1721 } finally {
1722 setLint(prevLint);
1723 }
1719 } 1724 }
1720 } 1725 }
1721 // where 1726 // where
1722 private boolean isDeprecatedOverrideIgnorable(MethodSymbol m, ClassSymbol origin) { 1727 private boolean isDeprecatedOverrideIgnorable(MethodSymbol m, ClassSymbol origin) {
1723 // If the method, m, is defined in an interface, then ignore the issue if the method 1728 // If the method, m, is defined in an interface, then ignore the issue if the method

mercurial