[rfc][icedtea-web] Replace single quote with two single quotes when using MessageFormat in Translator

Jie Kang jkang at redhat.com
Mon Mar 16 16:09:22 UTC 2015


Hello,

When looking into reproducer failures I noticed that the single quote ' was not being displayed in the logs.

E.g:

don't --> dont

This was caused by the use of MessageFormat in the Translator class.

>From [1]: Within a String, "''" represents a single quote. [...]

[1] http://docs.oracle.com/javase/6/docs/api/java/text/MessageFormat.html

Out of the various possible fixes, I have decided to replace single quote instances with two quotes only prior to using the MessageFormat class. Afaict, this doesn't cause any issues and doesn't affect things that don't go through the MessageFormat class.

This bug caused a number of reproducers to fail (ex. CodeBaseManifestEntryUnsignedNotMatching.BrowserJNLPHrefRemoteTest) as they expected a string like "don't" but the log output contained a string "dont". With this fix, those reproducers now pass.

Thoughts?


Regards,


-- 

Jie Kang

OpenJDK Team - Software Engineering Intern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itw-single-quote-fix-1.patch
Type: text/x-patch
Size: 764 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20150316/ab222f30/itw-single-quote-fix-1.patch>


More information about the distro-pkg-dev mailing list