[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:32:09 UTC 2015
----- Original Message -----
> 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?
Hello,
The patch should've included a unit test. New attachment includes it.
Sorry about that,
>
>
> Regards,
>
>
> --
>
> Jie Kang
>
> OpenJDK Team - Software Engineering Intern
--
Jie Kang
OpenJDK Team - Software Engineering Intern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itw-single-quote-fix-2.patch
Type: text/x-patch
Size: 2352 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20150316/cc134613/itw-single-quote-fix-2.patch>
More information about the distro-pkg-dev
mailing list