Class InterningChecker

All Implemented Interfaces:
Processor, OptionConfiguration

@StubFiles({"com-sun.astub","org-jcp.astub","org-xml.astub","sun.astub"}) @SupportedLintOptions("dotequals") @SupportedOptions("checkclass") public final class InterningChecker extends BaseTypeChecker
A type-checker plug-in for the Interned qualifier that finds (and verifies the absence of) equality-testing and interning errors.

The Interned annotation indicates that a variable refers to the canonical instance of an object, meaning that it is safe to compare that object using the "==" operator. This plugin warns whenever "==" is used in cases where one or both operands are not Interned. Optionally, it suggests using "==" instead of ".equals" where possible.

See the Checker Framework Manual:
Interning Checker
  • Constructor Details

    • InterningChecker

      public InterningChecker()