RFR: 8349564: Clean warnings found in jpackage tests when building them with -Xlint:all [v3]
Alexey Semenyuk
asemenyuk at openjdk.org
Wed Feb 12 15:51:15 UTC 2025
On Thu, 6 Feb 2025 23:12:48 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:
>> Clean warnings found in jpackage tests when building them with `-Xlint:all` option in Eclipse IDE.
>>
>> They are:
>> - redundant imports (solution: remove)
>> - unused function/fields (solution: remove)
>> - missing SuppressWarnings-s (solution: add what is missing)
>> - redundant SuppressWarnings-s (solution: remove)
>> - raw types used (solution: use wildcard or more specific types if appropriate)
>> - generic varargs (solution: convert to single/double/list arguments)
>> - an incomplete list of enum elements in switch statements (solution: add `default` branch)
>>
>> To prevent regression, added `-Xlint:all -Werror` to the compiler command line of all jpackage tests
>
> Alexey Semenyuk has updated the pull request incrementally with one additional commit since the last revision:
>
> Typo fixed
Current limitations of jtreg don't allow us to avoid repeating `-Xlint:all -Werror` in every test, and there is no way to specify javac options for library code. It can be revisited when jtreg gets corresponding features. @sashamatveev please finalize the review.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23455#issuecomment-2654117677
More information about the core-libs-dev
mailing list