You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2025/06/16 08:22:51 UTC

(lucene) branch branch_10x updated: Remove duplicate -Xlint:options flags. #14782

This is an automated email from the ASF dual-hosted git repository.

dweiss pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git


The following commit(s) were added to refs/heads/branch_10x by this push:
     new 9f159c46095 Remove duplicate -Xlint:options flags. #14782
9f159c46095 is described below

commit 9f159c460951c1e9c9046f78e7775c7292c7e4ee
Author: Dawid Weiss <da...@carrotsearch.com>
AuthorDate: Mon Jun 16 10:22:42 2025 +0200

    Remove duplicate -Xlint:options flags. #14782
---
 gradle/java/core-mrjar.gradle | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gradle/java/core-mrjar.gradle b/gradle/java/core-mrjar.gradle
index 2b1a9e9ce40..2bd5de51971 100644
--- a/gradle/java/core-mrjar.gradle
+++ b/gradle/java/core-mrjar.gradle
@@ -30,18 +30,20 @@ configure(project(":lucene:core")) {
 
       tasks.named("compileMain${jdkVersion}Java").configure {
         def apijar = apijars.file("jdk${jdkVersion}.apijar")
-        
+
         int releaseIndex = options.compilerArgs.indexOf("--release")
         options.compilerArgs.removeAt(releaseIndex)
         options.compilerArgs.removeAt(releaseIndex)
+
+        // Remove conflicting options for the linter. #14782
+        options.compilerArgs.removeAll("-Xlint:options")
+
         options.compilerArgs += [
           "-Xlint:-options",
           "--add-exports", "java.base/java.lang.foreign=ALL-UNNAMED",
           // for compilation we patch the incubator packages into java.base, this has no effect on resulting class files:
           "--add-exports", "java.base/jdk.incubator.vector=ALL-UNNAMED",
         ]
-        // hack because -Xlint:-options does not work for all options (regression in JDK 25+):
-        options.compilerArgs.remove("-Werror")
 
         def argsProvider = objects.newInstance(CompilerArgsProvider)
         argsProvider.apiJarFile.set(apijar)