Class OptionalReturnNull

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

    public class OptionalReturnNull
    extends TypeReturnNull
    Methods with "Optional" return type should never return null.
    Author:
    Andrey Loskutov
    • Constructor Detail

      • OptionalReturnNull

        public OptionalReturnNull​(BugReporter bugReporter)
    • Method Detail

      • matchesReturnSignature

        protected boolean matchesReturnSignature​(java.lang.String returnSignature)
        Specified by:
        matchesReturnSignature in class TypeReturnNull
        Returns:
        true if the given return signature matches expected type