Class OverridingEqualsNotSymmetrical

All Implemented Interfaces:
Detector, FirstPassDetector, Priorities, org.apache.bcel.classfile.Visitor

public class OverridingEqualsNotSymmetrical extends OpcodeStackDetector implements FirstPassDetector
  • Field Details

    • EQUALS_NAME

      private static final String EQUALS_NAME
      See Also:
    • EQUALS_SIGNATURE

      private static final String EQUALS_SIGNATURE
      See Also:
    • STATIC_EQUALS_SIGNATURE

      private static final String STATIC_EQUALS_SIGNATURE
      See Also:
    • classesWithGetClassBasedEquals

      Map<ClassDescriptor,Set<ClassDescriptor>> classesWithGetClassBasedEquals
    • classesWithInstanceOfBasedEquals

      Map<ClassDescriptor,Set<ClassDescriptor>> classesWithInstanceOfBasedEquals
    • parentMap

    • equalsMethod

    • bugReporter

      final BugReporter bugReporter
    • bugAccumulator

      final BugAccumulator bugAccumulator
    • equalsKindSummary

      final EqualsKindSummary equalsKindSummary
    • sawInstanceOf

      boolean sawInstanceOf
    • sawInstanceOfSupertype

      boolean sawInstanceOfSupertype
    • sawCheckedCast

      boolean sawCheckedCast
    • sawGetClass

      boolean sawGetClass
    • sawReturnSuper

      boolean sawReturnSuper
    • sawSuperEquals

      boolean sawSuperEquals
    • sawReturnNonSuper

      boolean sawReturnNonSuper
    • prevWasSuperEquals

      boolean prevWasSuperEquals
    • sawInitialIdentityCheck

      boolean sawInitialIdentityCheck
    • alwaysTrue

      boolean alwaysTrue
    • alwaysFalse

      boolean alwaysFalse
    • equalsCalls

      int equalsCalls
    • sawGoodEqualsClass

      boolean sawGoodEqualsClass
    • sawBadEqualsClass

      boolean sawBadEqualsClass
    • sawCompare

      boolean sawCompare
    • dangerDanger

      boolean dangerDanger
    • sawStaticDelegate

      boolean sawStaticDelegate
    • sawEqualsBuilder

      boolean sawEqualsBuilder
    • isRecord

      boolean isRecord
    • count

  • Constructor Details

    • OverridingEqualsNotSymmetrical

      public OverridingEqualsNotSymmetrical(BugReporter bugReporter)
  • Method Details

    • visit

      public void visit(org.apache.bcel.classfile.Code obj)
      Overrides:
      visit in class DismantleBytecode
    • count

      private void count(EqualsKindSummary.KindOfEquals k)
    • sawOpcode

      public void sawOpcode(int seen)
      Description copied from class: OpcodeStackDetector

      By default, this method will not be called when stack is TOP. To change this behavior, override #beforeOpcode(int) and change to return true even if stack is TOP.

      see Using FindBugs for Research to learn lattice and what TOP means.

      Specified by:
      sawOpcode in class OpcodeStackDetector
      See Also:
    • callToInvoke

      private boolean callToInvoke(int seen)
    • invokesMethodWithEqualLikeName

      public boolean invokesMethodWithEqualLikeName()
    • checkForComparingClasses

      private void checkForComparingClasses()
    • report

      public void report()
      Description copied from interface: Detector
      This method is called after all classes to be visited. It should be used by any detectors which accumulate information over all visited classes to generate results.
      Specified by:
      report in interface Detector
      Overrides:
      report in class BytecodeScanningDetector