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 |