Details

    • Type: False-Positive
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Rules, Symbolic Execution
    • Labels:
      None

      Description

      Following code snippet will raise false positive on RSPEC-3516 method returns should not be invariant.

       

      Note, issue is not raised when someExceptionalMethod is not declared (unknown). 

       

      public boolean someMethod() {  // FP raised
        try {
          someExceptionalMethod();
        } catch (IllegalArgumentException e) {
          return false;
        }
        return true;
      }
      
      private int someExceptionalMethod() {
        throw new IllegalArgumentException();
      } 

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tibor.blenessy Tibor Blenessy
              • Votes:
                2 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: