-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NPE when on the bootclasspath (fixes #481)
To reduce runtime overhead due to fields needed only by certain configurations, code generation is used and reflection loads the optimal implementation classes. This trades off a small amount of disk space for reduced memory usage. Unfortunately the wrong classloader method was used, which is not available on the bootclasspath (null value). This fails when the cache is used by a compiler, e.g. ErrorProne's javac fork. Instead Class.forName is now used which should resolve to a non-null, acceptable class loader. It appears as if this should be the same loader as before, or else the system loader if on the bootclasspath.
- Loading branch information
Showing
3 changed files
with
13 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters