You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ascheman (via GitHub)" <gi...@apache.org> on 2026/07/03 13:48:44 UTC

[PR] Make jdeprscan ITs locale-agnostic [maven-jdeprscan-plugin]

ascheman opened a new pull request, #80:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/80

   Refs #76.
   
   ## Problem
   The invoker ITs (`jdeprscan-release7/8/9`) assert on the English wording of the JDK `jdeprscan` tool's findings, e.g.
   
       class o/a/m/p/j/its/Deprecations uses deprecated class java/rmi/RMISecurityManager
   
   `jdeprscan`'s messages are localized (the JDK ships `jdeprscan_de`, `jdeprscan_ja`, `jdeprscan_zh_CN`). On a JVM whose default locale resolves to German the same line reads
   
       class o/a/m/p/j/its/Deprecations verwendet die veraltete Klasse java/rmi/RMISecurityManager
   
   so `-release8` and `-release9` fail. CI never catches it because the runners resolve to English.
   
   ## Fix
   Match on the untranslated identifiers only (`java/rmi/RMISecurityManager`, `java/lang/Boolean::<init>(Z)V`) instead of the translated sentence. The identifiers appear in the build log iff `jdeprscan` actually flags them, so the per-release present/absent profile is unchanged.
   
   ## Verification
   `mvn clean verify -P run-its` → BUILD SUCCESS (`jdeprscan-release7` is JDK≤10-gated via `invoker.java.version = !11+` and skipped on newer JDKs). Confirmed against a forced German tool locale (`-Duser.language=de`) that the identifiers stay byte-identical while only the surrounding wording changes.


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Make jdeprscan ITs locale-agnostic [maven-jdeprscan-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #80:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/80#issuecomment-4877048517

   On my local machine the tests `jdeprscan-release8` and `jdeprscan-release9` fail without an error message. When I remove the line `invoker.buildResult = failure`  from `invoker.properties` they succeed. But this made them fail on CI (see my PR #77 ).


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Make jdeprscan ITs locale-agnostic [maven-jdeprscan-plugin]

Posted by "Bukama (via GitHub)" <gi...@apache.org>.
Bukama commented on PR #80:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/80#issuecomment-4877316613

   If I force the locale to be English it works. This makes sense as further analyses show that the regex used to detect deprecated classes/methods is English
   
   ```
    public static final Pattern DEPRECATED_CLASS = Pattern.compile("^class (\\S+) uses deprecated class (\\S+)");
   
       public static final Pattern DEPRECATED_METHOD = Pattern.compile("^class (\\S+) uses deprecated method (\\S+)");
   ```
   
   So a correct fix would be to add commandline options to the call
   
   ```
           cmd.createArg().setValue("-J-Duser.language=en");
           cmd.createArg().setValue("-J-Duser.country=US");
   ```


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Force English locale for forked jdeprscan (#76) [maven-jdeprscan-plugin]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #80:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/80#issuecomment-5011814871

   @ascheman Please assign appropriate label to PR according to the type of change.


-- 
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-unsubscribe@maven.apache.org

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


Re: [PR] Force English locale for forked jdeprscan (#76) [maven-jdeprscan-plugin]

Posted by "ascheman (via GitHub)" <gi...@apache.org>.
ascheman merged PR #80:
URL: https://github.com/apache/maven-jdeprscan-plugin/pull/80


-- 
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-unsubscribe@maven.apache.org

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