uschindler commented on issue #12911:
URL: https://github.com/apache/lucene/issues/12911#issuecomment-1852090987

   OK, I fixed the file and also enforced UTF-8 when executing the JDK version. 
The general problem was: If I enforce locally another charset than UTF-8 (see 
the sysprops passed to the java version), it fails with a similar error 
message. It looks like depending on java version it may refuse wrong character 
depedning on compiler version.
   
   The main issue here is that the generation java file is not tidied by code 
formatting (as it is treated as a script and never compiled).
   
   ```diff
    gradle/generation/extract-jdk-apis.gradle              | 3 ++-
    gradle/generation/extract-jdk-apis/ExtractJdkApis.java | 2 +-
    2 files changed, 3 insertions(+), 2 deletions(-)
   
   diff --git a/gradle/generation/extract-jdk-apis.gradle 
b/gradle/generation/extract-jdk-apis.gradle
   index 6a7b333aaa3..a24496db7fa 100644
   --- a/gradle/generation/extract-jdk-apis.gradle
   +++ b/gradle/generation/extract-jdk-apis.gradle
   @@ -62,7 +62,8 @@ configure(project(":lucene:core")) {
          classpath = configurations.apiextractor
          mainClass = file("${resources}/ExtractJdkApis.java") as String
          systemProperties = [
   -        'user.timezone': 'UTC'
   +        'user.timezone': 'UTC',
   +        'file.encoding': 'UTF-8',
          ]
          args = [
            jdkVersion,
   diff --git a/gradle/generation/extract-jdk-apis/ExtractJdkApis.java 
b/gradle/generation/extract-jdk-apis/ExtractJdkApis.java
   index 7121374850b..58c7d2ec584 100644
   --- a/gradle/generation/extract-jdk-apis/ExtractJdkApis.java
   +++ b/gradle/generation/extract-jdk-apis/ExtractJdkApis.java
   @@ -189,7 +189,7 @@ public final class ExtractJdkApis {
        }
        
        @Override
   -    public void visitPermittedSubclass​(String c) {
   +    public void visitPermittedSubclass(String c) {
        }
    
      }
   ```
   
   I will commit an push the change to 3 branches.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to