Some classes are dependent on the default charset

Description

SpotBugs observes four places where the code is influenced by the system’s default charset:

  • MDQueryMD5ItemIdTransformer

  • MDQuerySHA1ItemIdTransformer

  • SHA1StringTransformer

  • X509RSAOpenSSLBlacklistValidator (reading the blocklist resource)

In each of these cases, we should stabilise behaviour by explicitly using UTF-8 and updating the Javadoc appropriately.

Note that there’s a proposed JSR that will make this the default behaviour of Java at some point in the future, so in my mind this isn’t particularly contentious.

Environment

None

Activity

Ian YoungOctober 18, 2022 at 3:37 PM

Done, commit 6a1ad60ab3bc542f4444c5cd66e015ae1a3b280d.

Ian YoungOctober 18, 2022 at 2:16 PM

The change in default behaviour is in JEP 400 and was incorporated in Java 18. So, we can’t assume this to be done for us while Java 17 is still a permitted platform.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created August 26, 2022 at 4:56 PM
Updated May 16, 2024 at 12:37 PM
Resolved October 18, 2022 at 3:37 PM