Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.8
    • Fix Version/s: 5.0 RC1
    • Component/s: Core:SpEL
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      SpelCompiler / SpelExpression can leak classes when a compiled expression reverts back to interpreted mode and then once again compiles.
      Happens in varied scenarios with compiler mode MIXED, e.g.
      Single expression instance, used frequently, with different "root" object classes
      etc.

      Example attached, prints out the number of loaded classes when the same expression is repeatedly evaluated for just 2 types of root object (simplest case).

      One possible solution might be to have the SpelCompiler "store" classes for specific bytecode and check for identical bytecode generated (excepting compiled expression classname), returning the class that matches the bytecode instead of "defining" it again.
      I have been unable to implement anything like this by extending as the structure of the code doesn't seem to provide the relevant hook points (in 4.1.6).

        Attachments

          Activity

            People

            • Assignee:
              aclement Andy Clement
              Reporter:
              Andrew.Rowbottom Andrew Rowbottom
              Last updater:
              St├ęphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 32 weeks, 5 days ago