RFR: JDK-8222489: jcmd VM.system_properties gives unusable paths on Windows

Chihiro Ito chiroito107 at gmail.com
Thu Feb 20 11:20:43 UTC 2020


Hi Yasumasa,

Thank you for your quick review.

I modified the code without Properties::store.

Could you review this again, please?

Webrev : http://cr.openjdk.java.net/~cito/JDK-8222489/webrev.01/

Regards,
Chihiro


2020年2月20日(木) 9:34 Yasumasa Suenaga <suenaga at oss.nttdata.com>:

> Hi Chihiro,
>
> I think this problem is caused by spec of `Properties::store(Writer)`.
>
> `Properties::store(OutputStream)` says that the output format is as same
> as `store(Writer)` [1].
> `Properties::store(Writer)` says that `#`, `!`, `=`, `:` are written with
> a preceding backslash [2].
>
> So I think we should not use `Properties::store` to serialize properties.
>
>
> Thanks,
>
> Yasumasa
>
>
> [1]
> https://download.java.net/java/early_access/jdk15/docs/api/java.base/java/util/Properties.html#store(java.io.OutputStream,java.lang.String)
> [2]
> https://download.java.net/java/early_access/jdk15/docs/api/java.base/java/util/Properties.html#store(java.io.Writer,java.lang.String)
>
>
> On 2020/02/19 22:36, Chihiro Ito wrote:
> > Hi,
> >
> > Could you review this tiny fix, please?
> >
> > This problem affected not the only path on Windows, but also Linux and
> URLs using ":".
> >
> > Webrev : http://cr.openjdk.java.net/~cito/JDK-8222489/webrev.00/
> > JBS : https://bugs.openjdk.java.net/browse/JDK-8222489
> >
> > Regards,
> > Chihiro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20200220/94841e1a/attachment.htm>


More information about the serviceability-dev mailing list