Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-189

Possible bug in Interpreter.isCancelled()

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.1
    • Labels:
      None

      Description

      Reported by FindBugs is the message:

      "Questionable use of non-short-circuit logic in org.apache.commons.jexl3.internal.Interpreter.isCancelled()"

          protected boolean isCancelled() {
              if (cancelled | Thread.interrupted()) {
                  cancelled = true;
              }
              return cancelled;
          }
      

      Maybe it is better to replace method as

          protected boolean isCancelled() {
              if (Thread.interrupted())
                  cancelled = true;
      
              return cancelled;
          }
      

        Attachments

          Activity

            People

            • Assignee:
              henrib Henri Biestro
              Reporter:
              dmitri_blinov Dmitri Blinov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: