On Fri, 2 Dec 2022 16:36:22 GMT, Magnus Ihse Bursie <i...@openjdk.org> 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 belongs with the langtools team. src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties line 170: > 168: jshell.console.no.javadoc = <Keine Dokumentation gefunden> > 169: jshell.console.do.nothing = Nichts machen > 170: jshell.console.choice = Auswahl:\u0020 This is correct. However, the original l10n.properties did not get the change as intended. l10n.properties had it implemented as `jshell.console.choice = Choice: ` The trailing white space was enclosed with a trailing `` (probably to signify the white space is intentional) and thus hidden from the script. It should be changed to `jshell.console.choice = Choice:\u0020` for consistency ------------- PR: https://git.openjdk.org/jdk/pull/11487