Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.0.13, 3.1.2
-
None
-
None
Description
Regarding https://github.com/jkuhnert/ognl/pull/12
In getSetMethod/getGetMethod it calls contains after getting a null method back. This means that anytime we ever have a property miss for a class we are going to do two lookups in the cache (the get and contains). This isn't great because property misses can happen a lot.
The solution is actually trivial. The ClassPropertyMethodCache is already storing a special value for null internally. It should just return it, and the two callers can check for the special value and return null rather than making the containsKey extra call.