Skip to content

Commit 9f159c4

Browse files
committed
Remove duplicate -Xlint:options flags. #14782
1 parent 2503e83 commit 9f159c4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gradle/java/core-mrjar.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,20 @@ configure(project(":lucene:core")) {
3030

3131
tasks.named("compileMain${jdkVersion}Java").configure {
3232
def apijar = apijars.file("jdk${jdkVersion}.apijar")
33-
33+
3434
int releaseIndex = options.compilerArgs.indexOf("--release")
3535
options.compilerArgs.removeAt(releaseIndex)
3636
options.compilerArgs.removeAt(releaseIndex)
37+
38+
// Remove conflicting options for the linter. #14782
39+
options.compilerArgs.removeAll("-Xlint:options")
40+
3741
options.compilerArgs += [
3842
"-Xlint:-options",
3943
"--add-exports", "java.base/java.lang.foreign=ALL-UNNAMED",
4044
// for compilation we patch the incubator packages into java.base, this has no effect on resulting class files:
4145
"--add-exports", "java.base/jdk.incubator.vector=ALL-UNNAMED",
4246
]
43-
// hack because -Xlint:-options does not work for all options (regression in JDK 25+):
44-
options.compilerArgs.remove("-Werror")
4547

4648
def argsProvider = objects.newInstance(CompilerArgsProvider)
4749
argsProvider.apiJarFile.set(apijar)

0 commit comments

Comments
 (0)