Skip to content

Commit

Permalink
Merge pull request #6425 from dbalek/dbalek/nb-javac-update
Browse files Browse the repository at this point in the history
Update nb-javac to jdk-21u.
  • Loading branch information
dbalek authored Sep 18, 2023
2 parents 841a4e8 + 9df1d37 commit b5a8baf
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,3 @@ LBL_FIX_Make_Class_Abstract=LBL_FIX_Make_Class_Abstract
LBL_FIX_Impl_Abstract_Methods=LBL_FIX_Impl_Abstract_Methods
WARN_FoundConflictingMethods1=WARN_FoundConflictingMethods1
WARN_FoundConflictingMethodsMany=WARN_FoundConflictingMethodsMany

LBL_NotInitializedVariable_fix=FIX_InitializeVariable
LBL_NotInitializedVariableCtor_fix=FIX_InitializeVariableInCtor
LBL_AddCtorParameter_fix=FIX_AddConstructorParameter
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void testNotInitializedInDefaultConstructor() throws Exception {
"public class Test {\n" +
" public final String |s;" +
"}\n",
"FIX_InitializeVariable", "FIX_InitializeVariableInCtor", "FIX_AddConstructorParameter");
"Initialize variable s", "Initialize variable s in constructor(s)", "Add parameter to constructor Test()");
}

public void testNotInitializedInDefaultConstructorInitialize() throws Exception {
Expand All @@ -52,7 +52,7 @@ public void testNotInitializedInDefaultConstructorInitialize() throws Exception
"public class Test {\n" +
" public final String |s;" +
"}\n",
"FIX_InitializeVariable",
"Initialize variable s",
"package test; public class Test { public final String s = null;} ");
}

Expand All @@ -63,7 +63,7 @@ public void testNotInitializedInDefaultConstructorInitializeInConstructor() thro
"public class Test {\n" +
" public final String |s;" +
"}\n",
"FIX_InitializeVariableInCtor",
"Initialize variable s in constructor(s)",
"package test; public class Test { public final String s; public Test() { this.s = null; } } ");
}

Expand All @@ -76,7 +76,7 @@ public void testNotInitializedInConstructor() throws Exception {
" public Test() {" +
" }" +
"}\n",
"FIX_InitializeVariable", "FIX_InitializeVariableInCtor", "FIX_AddConstructorParameter");
"Initialize variable s", "Initialize variable s in constructor(s)", "Add parameter to constructor Test()");
}

public void testNotInitializedInConstructorInitialize() throws Exception {
Expand All @@ -88,7 +88,7 @@ public void testNotInitializedInConstructorInitialize() throws Exception {
" public Test() {" +
" }" +
"}\n",
"FIX_InitializeVariable",
"Initialize variable s",
"package test; public class Test { public final String s = null; public Test() { }} ");
}

Expand All @@ -101,7 +101,7 @@ public void testNotInitializedInConstructorInitializeInConstructor() throws Exce
" public Test() {" +
" }" +
"}\n",
"FIX_InitializeVariableInCtor",
"Initialize variable s in constructor(s)",
"package test; public class Test { public final String s; public Test() {this.s = null; }} ");
}

Expand All @@ -116,7 +116,7 @@ public void testNotInitializedInMultipleConstructors() throws Exception {
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariable", "FIX_InitializeVariableInCtor", "FIX_AddConstructorParameter", "FIX_AddConstructorParameter");
"Initialize variable s", "Initialize variable s in constructor(s)", "Add parameter to constructor Test()", "Add parameter to constructor Test(int i)");
}

public void testNotInitializedInMultipleConstructorsInitialize() throws Exception {
Expand All @@ -130,7 +130,7 @@ public void testNotInitializedInMultipleConstructorsInitialize() throws Exceptio
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariable",
"Initialize variable s",
"package test; public class Test { public final String s = null; public Test() { } public Test(int i) { }} ");
}

Expand All @@ -145,7 +145,7 @@ public void testNotInitializedInMultipleConstructorsInitializeInConstructor() th
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariableInCtor",
"Initialize variable s in constructor(s)",
"package test; public class Test { public final String s; public Test() {this.s = null; } public Test(int i) {this.s = null; }} ");
}

Expand All @@ -161,7 +161,7 @@ public void testNotInitializedInMultipleConstructors2() throws Exception {
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariable", "FIX_InitializeVariableInCtor", "FIX_AddConstructorParameter");
"Initialize variable s", "Initialize variable s in constructor(s)", "Add parameter to constructor Test(int i)");
}

public void testNotInitializedInMultipleConstructors2Initialize() throws Exception {
Expand All @@ -176,7 +176,7 @@ public void testNotInitializedInMultipleConstructors2Initialize() throws Excepti
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariable",
"Initialize variable s",
"package test; public class Test { public final String s = null; public Test() { this.s = \"test\"; } public Test(int i) { }} ");
}

Expand All @@ -192,7 +192,7 @@ public void testNotInitializedInMultipleConstructors2InitializeInConstructor() t
" public Test(int i) {" +
" }" +
"}\n",
"FIX_InitializeVariableInCtor",
"Initialize variable s in constructor(s)",
"package test; public class Test { public final String s; public Test() { this.s = \"test\"; } public Test(int i) {this.s = null; }} ");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void testUnnamedClass() throws Exception {
"}\n",
"21",
//TODO: needs to be adjusted when the error in javac is fixed:
"0:0-0:13::Test.java:3:1: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.unnamed.classes)");
"0:0-0:13::Test.java:1:1: compiler.err.preview.feature.disabled.plural: (compiler.misc.feature.unnamed.classes)");
}

private void performInlinedTest(String name, String code) throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,7 @@ private static JavacTaskImpl createJavacTask(
}
options.add(sb.toString());
}
options.add("-proc:full");
} else {
options.add("-proc:none"); // NOI18N, Disable annotation processors
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void testEmptyClassPath() throws Exception {
List<String> actualErrors;
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-source", "8", "-XDide", "-Xlint:-options");
assertEquals(expectedErrors, actualErrors);
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-XDide");
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-XDide", "-Xlint:-options");
assertEquals(expectedErrors, actualErrors);
expectedErrors =
Arrays.asList(
Expand All @@ -65,7 +65,7 @@ public void testEmptyClassPath() throws Exception {
);
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-source", "8", "-XDide", "-XDbackgroundCompilation", "-Xlint:-options");
assertEquals(expectedErrors, actualErrors);
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-XDide", "-XDbackgroundCompilation");
actualErrors = compile(code, "-bootclasspath", "", "--system", "none", "-XDrawDiagnostics", "-XDide", "-XDbackgroundCompilation", "-Xlint:-options");
assertEquals(expectedErrors, actualErrors);
}

Expand Down
4 changes: 2 additions & 2 deletions java/libs.javacapi/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
2D8ACD8AAD9C74FDAAA9D7BBAF4278A57E2D86E0 com.dukescript.nbjavac:nb-javac:jdk-21+26:api
9A9BAB9DC8497962967345A59CDD8CBC9D73A40D com.dukescript.nbjavac:nb-javac:jdk-21+26
D5113DE0BE3E296D3D9F2139F0102FDD9EB0D993 com.dukescript.nbjavac:nb-javac:jdk-21u:api
A9C5BABB481C07742E0C4FCD150DB6E6DE2C2119 com.dukescript.nbjavac:nb-javac:jdk-21u
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: Javac Compiler Implementation
Description: Javac Compiler Implementation
Version: jdk-21+26
Files: nb-javac-jdk-21+26-api.jar nb-javac-jdk-21+26.jar
Version: jdk-21u
Files: nb-javac-jdk-21u-api.jar nb-javac-jdk-21u.jar
License: GPL-2-CP
Origin: OpenJDK (https://github.com/openjdk/jdk21)
Source: https://github.com/openjdk/jdk21
Expand Down
4 changes: 2 additions & 2 deletions java/libs.javacapi/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
</public-packages>
<class-path-extension>
<runtime-relative-path />
<binary-origin>external/nb-javac-jdk-21+26-api.jar</binary-origin>
<binary-origin>external/nb-javac-jdk-21u-api.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path />
<binary-origin>external/nb-javac-jdk-21+26.jar</binary-origin>
<binary-origin>external/nb-javac-jdk-21u.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions java/libs.nbjavacapi/external/binaries-list
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
2D8ACD8AAD9C74FDAAA9D7BBAF4278A57E2D86E0 com.dukescript.nbjavac:nb-javac:jdk-21+26:api
9A9BAB9DC8497962967345A59CDD8CBC9D73A40D com.dukescript.nbjavac:nb-javac:jdk-21+26
D5113DE0BE3E296D3D9F2139F0102FDD9EB0D993 com.dukescript.nbjavac:nb-javac:jdk-21u:api
A9C5BABB481C07742E0C4FCD150DB6E6DE2C2119 com.dukescript.nbjavac:nb-javac:jdk-21u
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Name: Javac Compiler Implementation
Description: Javac Compiler Implementation
Version: jdk-21+26
Files: nb-javac-jdk-21+26-api.jar nb-javac-jdk-21+26.jar
Version: jdk-21u
Files: nb-javac-jdk-21u-api.jar nb-javac-jdk-21u.jar
License: GPL-2-CP
Origin: OpenJDK (https://github.com/openjdk/jdk21)
Source: https://github.com/openjdk/jdk21
Expand Down
4 changes: 2 additions & 2 deletions java/libs.nbjavacapi/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial
license.file.override=${nb_all}/nbbuild/licenses/GPL-2-CP
release.external/nb-javac-jdk-21+26-api.jar=modules/ext/nb-javac-jdk-21-26-api.jar
release.external/nb-javac-jdk-21+26.jar=modules/ext/nb-javac-jdk-21-26.jar
release.external/nb-javac-jdk-21u-api.jar=modules/ext/nb-javac-jdk-21u-api.jar
release.external/nb-javac-jdk-21u.jar=modules/ext/nb-javac-jdk-21u.jar

# for tests
requires.nb.javac=true
8 changes: 4 additions & 4 deletions java/libs.nbjavacapi/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
</test-dependencies>
<public-packages/>
<class-path-extension>
<runtime-relative-path>ext/nb-javac-jdk-21-26-api.jar</runtime-relative-path>
<binary-origin>external/nb-javac-jdk-21+26-api.jar</binary-origin>
<runtime-relative-path>ext/nb-javac-jdk-21u-api.jar</runtime-relative-path>
<binary-origin>external/nb-javac-jdk-21u-api.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/nb-javac-jdk-21-26.jar</runtime-relative-path>
<binary-origin>external/nb-javac-jdk-21+26.jar</binary-origin>
<runtime-relative-path>ext/nb-javac-jdk-21u.jar</runtime-relative-path>
<binary-origin>external/nb-javac-jdk-21u.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
Expand Down
4 changes: 2 additions & 2 deletions nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ webcommon/javascript2.jsdoc/external/testfiles-jsdoc-1.zip webcommon/javascript2
harness/apisupport.harness/external/launcher-12.5-distribution.zip platform/o.n.bootstrap/external/launcher-12.5-distribution.zip

# only one is part of the product:
java/libs.javacapi/external/nb-javac-jdk-21+26-api.jar java/libs.nbjavacapi/external/nb-javac-jdk-21+26-api.jar
java/libs.javacapi/external/nb-javac-jdk-21+26.jar java/libs.nbjavacapi/external/nb-javac-jdk-21+26.jar
java/libs.javacapi/external/nb-javac-jdk-21u-api.jar java/libs.nbjavacapi/external/nb-javac-jdk-21u-api.jar
java/libs.javacapi/external/nb-javac-jdk-21u.jar java/libs.nbjavacapi/external/nb-javac-jdk-21u.jar

# Used only in unittests for mysql db specific tests
ide/db.metadata.model/external/mysql-connector-j-8.0.31.jar ide/db.mysql/external/mysql-connector-j-8.0.31.jar
Expand Down

0 comments on commit b5a8baf

Please sign in to comment.