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

Make JexlArithmetic immutable (and threadsafe)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1
    • 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

              henrib Henri Biestro
              sebb Sebb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: