Skip to content

Commit

Permalink
Make class-level caches for InferredJARModelsHandler instance fields. (
Browse files Browse the repository at this point in the history
…#315)

Static mutable fields are incredibly dangerous in NullAway and should have been avoided. The original code actually triggers a crash when using a shared classloader for Error Prone.
  • Loading branch information
lazaroclapp committed May 20, 2019
1 parent 8fce284 commit cd6e24f
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -72,9 +72,9 @@ private static void LOG(boolean cond, String tag, String msg) {

private static final int RETURN = -1; // '-1' indexes Return type in the Annotation Cache

private static Map<String, Map<String, Map<Integer, Set<String>>>> argAnnotCache;
private static Map<String, Set<String>> mapModelJarLocations;
private static Set<String> loadedJars;
private final Map<String, Map<String, Map<Integer, Set<String>>>> argAnnotCache;
private final Map<String, Set<String>> mapModelJarLocations;
private final Set<String> loadedJars;

private final Config config;

Expand Down

0 comments on commit cd6e24f

Please sign in to comment.