Class URLProblems

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

public class URLProblems extends OpcodeStackDetector
equals and hashCode are blocking methods on URL's. Warn about invoking equals or hashCode on them, or defining Set or Maps with them as keys.
  • Field Details

    • URL_EQUALS

      private static final MethodDescriptor URL_EQUALS
    • URL_HASHCODE

      private static final MethodDescriptor URL_HASHCODE
    • BAD_SIGNATURES

      static final String[] BAD_SIGNATURES
    • HASHSET_KEY_METHODS

      private static final String[] HASHSET_KEY_METHODS
    • HASHMAP_KEY_METHODS

      private static final String[] HASHMAP_KEY_METHODS
    • HASHMAP_TWO_ARG_KEY_METHODS

      private static final String[] HASHMAP_TWO_ARG_KEY_METHODS
    • methods

      private static final List<MethodDescriptor> methods
    • bugReporter

      private final BugReporter bugReporter
    • accumulator

      private final BugAccumulator accumulator
    • hasInterestingMethodCalls

      private boolean hasInterestingMethodCalls
  • Constructor Details

    • URLProblems

      public URLProblems(BugReporter bugReporter)
  • Method Details