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

Possible bug in Interpreter.isCancelled()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.0
    • 3.1
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: