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

Make JexlArithmetic immutable (and threadsafe)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Labels:
      None

      Description

      The JexlArithmetic class is currently not thread-safe because of the single field:

      /** Whether this JexlArithmetic instance behaves in strict or lenient mode. */
      protected boolean strict;

      If this field were made final, and the setLenient() method removed, then the class would be immutable and therefore thread-safe.

      This would mean that JexlEngine would also have to change.

      The class is new to 2.0, so this is the best time to fix this.

        Attachments

        1. JEXL-83.patch
          3 kB
          Henri Biestro

          Issue Links

            Activity

              People

              • Assignee:
                henrib Henri Biestro
                Reporter:
                sebb@apache.org Sebb
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: