Skip to content

Commit

Permalink
7903151: NPE when resolving @library from jtreg plugin
Browse files Browse the repository at this point in the history
Reviewed-by: djelinski, jjg
  • Loading branch information
mcimadamore committed Apr 28, 2022
1 parent c415cd0 commit bc75e5f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/idea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This will download gradle and the required IntelliJ dependencies, will build the

> Note: to build the plugin, the build script must point to a valid jtreg installation; see the property `jtregHome` in the `gradle.properties` file, and tweak accordingly.
> Note: the property `intellijVersion` can be used to specify which IDE version should the plugin depend on (defaults to `2021.1`).
> Note: the property `minBuild` can be used to specify which IDE version should the plugin depend. The value of this property should be a valid IntelliJ [release build number](https://www.jetbrains.com/intellij-repository/releases/) (defaults to `IC-211.7142.45`).
Once the build is configured correctly, the plugin can even be tested in a sandbox environment, as follows:

Expand Down
1 change: 1 addition & 0 deletions plugins/idea/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ dependencies {

// See https://github.com/JetBrains/gradle-intellij-plugin/
intellij {
version = minBuild
plugins = ['java', 'AntSupport', 'TestNG-J']
}

Expand Down
6 changes: 3 additions & 3 deletions plugins/idea/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jtregHome = /path/to/jtreg
minBuild = 211
pluginVersion = 1.14
minBuild = IC-211.7142.45
pluginVersion = 1.15
javaLevel = 11
notes = <ul>\
<li>Fix debugging support for 2021.3</li>\
<li>Fix NPE when resolving @library tag</li>\
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,9 @@ public static List<VirtualFile> getJTRegRoots(PsiFile file) {
LOG.debug("Nothing found relative to test suite root.");
Properties testSuiteConfig = testSuiteConfigForRootFile(testRootFile);
if (testSuiteConfig != null) {
String s = testSuiteConfig.getProperty("external.lib.roots").trim();
String s = testSuiteConfig.getProperty("external.lib.roots");
if (s != null) {
s = s.trim();
LOG.debug("external.lib.roots = \"" + s + "\"");
// Note: jtreg tag specification for "external.lib.roots" talks about a
// search path with separate segments; however, all usages I see in our
Expand Down

0 comments on commit bc75e5f

Please sign in to comment.