RFR: JDK-8225569: jpackage app-image layout

Brian Burkhalter brian.burkhalter at oracle.com
Thu Jun 13 19:52:55 UTC 2019


Please note that it is recommended to use Path.of() [1] which was added in JDK 11 as indicated in the class doc of Paths:

API Note:
It is recommended to obtain a Path via the Path.of methods instead of via the get methods defined in this class as this class may be deprecated in a future release.

Thanks,

Brian

[1] https://docs.oracle.com/en/java/javase/12/docs/api/java.base/java/nio/file/Path.html#of(java.lang.String,java.lang.String...)

> On Jun 13, 2019, at 12:38 PM, Alexey Semenyuk <alexey.semenyuk at oracle.com> wrote:
> 
> Andy,
> 
> I was just curios why we don't use Paths. If we should then I'll use this API in my patches. I didn't mean to ask you do the clean up in all the sources :)
> 
> - Alexey
> 
> On 6/13/2019 3:34 PM, Andy Herrick wrote:
>> 
>> 
>> On 6/13/19, 2:00 PM, Alexey Semenyuk wrote:
>>> Looks good.
>>> 
>>> Q: any good reason we are not using
>>> Paths.get(a, b, c)
>>> instead of
>>> a + File.separator + b + File.separator + c
>>> to build paths?
>> There are a lot of places we should be using Paths instead of String and File objects, but JPackagePath (test helper) is among the worst of the offenders.  I will make a pass at cleaning that up and any other such places this change set is touching.



More information about the core-libs-dev mailing list