On Fri, 2 Dec 2022 21:03:27 GMT, Chris Plummer <[email protected]> wrote:
>> According to [the >> specification](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/util/Properties.html#load(java.io.Reader)) >> trailing whitespaces in the values of properties files are (somewhat >> surprisingly) actually significant. >> >> We have multiple files in the JDK with trailing whitespaces in the values. >> For most of this files, this is likely incorrect and due to oversight, but >> in a few cases it might actually be intended (like "The value is: "). >> >> After a discussion in the PR for >> [JDK-8295729](https://bugs.openjdk.org/browse/JDK-8295729), the consensus >> was to replace valid trailing spaces with the corresponding unicode >> sequence, `\u0020`. (And of course remove non-wanted trailing spaces.) >> >> Doing so has a dual benefit: >> >> 1) It makes it clear to everyone reading the code that there is a trailing >> space and it is intended >> >> 2) It will allow us to remove all actual trailing space characters, and turn >> on the corresponding check in jcheck to keep the properties files, just like >> all other source code files, free of trailing spaces. >> >> Ultimately, the call of whether a trailing space is supposed to be there, or >> is a bug, lies with the respective component teams owning these files. Thus >> I have split up the set of properties files with trailing spaces in several >> groups, to match the JDK teams, and open a JBS issue for each of them. This >> issue is for code I believe belong with the serviceability team. > > src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_ko.properties > line 27: > >> 25: >> 26: agent.err.error = \uC624\uB958 >> 27: agent.err.exception = \uC5D0\uC774\uC804\uD2B8\uC5D0 >> \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.\u0020 > > Suggestion: > > agent.err.exception = \uC5D0\uC774\uC804\uD2B8\uC5D0 > \uC608\uC678\uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. The pre-exiting period at the end also seems like a bug, but I'm not sure. I don't see it in the other locales. > src/jdk.management.agent/share/classes/jdk/internal/agent/resources/agent_ko.properties > line 38: > >> 36: >> 37: agent.err.agentclass.notfound = \uAD00\uB9AC >> \uC5D0\uC774\uC804\uD2B8 \uD074\uB798\uC2A4\uB97C \uCC3E\uC744 \uC218 >> \uC5C6\uC2B5\uB2C8\uB2E4. >> 38: agent.err.agentclass.failed = \uAD00\uB9AC >> \uC5D0\uC774\uC804\uD2B8 \uD074\uB798\uC2A4\uB97C >> \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.\u0020 > > Suggestion: > > agent.err.agentclass.failed = \uAD00\uB9AC \uC5D0\uC774\uC804\uD2B8 > \uD074\uB798\uC2A4\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. ...and another extra period at the end that I'm unsure of. ------------- PR: https://git.openjdk.org/jdk/pull/11490
