Skip to content

Commit

Permalink
Painless: Fix caching bug and clean up addPainlessClass. (#32142)
Browse files Browse the repository at this point in the history
This change cleans up the addPainlessClass methods by doing the following things:

* Rename many variable names to match the new conventions described in the JavaDocs 
for PainlessLookup
* Decouples Whitelist.Class from adding a PainlessClass directly
* Adds a second version of addPainlessClass that is intended for use to add future 
defaults in a follow PR

This change also fixes the method and field caches by storing Classes instead of Strings 
since it would technically be possible now that the whitelists are extendable to have 
different Classes with the same name. It was convenient to add this change together 
since some of the new constants are shared.

Note the changes are largely mechanical again where all the code behavior should 
remain the same.
  • Loading branch information
jdconrad committed Jul 18, 2018
1 parent 4bd9de2 commit dade5bb
Showing 1 changed file with 305 additions and 178 deletions.
Loading

0 comments on commit dade5bb

Please sign in to comment.