RFR: 7903151: NPE when resolving @library from jtreg plugin [v2]

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Apr 28 13:28:52 UTC 2022


> This pathc fixes a trivial NPE which occurs when the plugin is attempting to resolve an absolute library in a `@library` tag. If no library is found starting from TEST.ROOT, and if TEST.ROOT does not specify any alternate library root, the plugin fails with a NPE, as the code is eagerly trimming the property value "external.lib.roots", which might not exist.
> 
> The solution is simple, e.g. check for null before trimming.

Maurizio Cimadamore has updated the pull request incrementally with two additional commits since the last revision:

 - Fix typo in gradle.properties
 - Use gradle property to specify version of IntelliJ dependency
   Fix readme

-------------

Changes:
  - all: https://git.openjdk.java.net/jtreg/pull/70/files
  - new: https://git.openjdk.java.net/jtreg/pull/70/files/a05c1bab..345b5f12

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jtreg&pr=70&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jtreg&pr=70&range=00-01

  Stats: 3 lines in 3 files changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.java.net/jtreg/pull/70.diff
  Fetch: git fetch https://git.openjdk.java.net/jtreg pull/70/head:pull/70

PR: https://git.openjdk.java.net/jtreg/pull/70


More information about the jtreg-dev mailing list