Re: [9] RFR 8170113: jimage extract to readonly directory causes MissingResourceException
On 09/02/2017 10:03, Denis Kononenko wrote: : I think we might have to defer such big change to the next release. If there's no objections I'd propose to deliver this fix AS IS and open a new enhancement request to re-implement 'extract' method. Okay but can you create a bug in JBS so that it's not forgotten? -Alan
Re: [9] RFR 8170113: jimage extract to readonly directory causes MissingResourceException
Hi, looks ok for me. Simple and safe fix. —Andrey > On 9 Feb 2017, at 13:03, Denis Kononenko wrote: > > > Hi, > >> >> On 06/02/2017 10:27, Denis Kononenko wrote: >>> Hi, >>> >>> Could someone please review this very small fix. >>> >>> The class JImageTask >> (src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java) has >> references to an info message by 'err.cannot.create.dir' key. >> Unfortunately the corresponding resource file >> (src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties) >> doesn't contain this key. This results in long not user friendly >> stacktraces in output when jimage cannot create a directory. The fix >> is very small, I added the missing definition into the resource file. >>> >>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8170113 >>> WEBREV: http://cr.openjdk.java.net/~dkononenko/8170113/webrev.00 >>> >> This looks okay as a short term fix but I think that extract need to >> be-implemented to use the new file system API so that the reasons why >> >> the directory can be printed too. Also there is an anomaly in errors >> related to the directory result in an error message whereas any errors >> >> extracting to the directory lead to an exception. >> >> -Alan > > > I think we might have to defer such big change to the next release. If > there's no objections I'd propose to deliver this fix AS IS and open a new > enhancement request to re-implement 'extract' method. > > Thank you, > Denis.
Re: [9] RFR 8170113: jimage extract to readonly directory causes MissingResourceException
Hi, > > On 06/02/2017 10:27, Denis Kononenko wrote: > > Hi, > > > > Could someone please review this very small fix. > > > > The class JImageTask > (src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java) has > references to an info message by 'err.cannot.create.dir' key. > Unfortunately the corresponding resource file > (src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties) > doesn't contain this key. This results in long not user friendly > stacktraces in output when jimage cannot create a directory. The fix > is very small, I added the missing definition into the resource file. > > > > BUGURL: https://bugs.openjdk.java.net/browse/JDK-8170113 > > WEBREV: http://cr.openjdk.java.net/~dkononenko/8170113/webrev.00 > > > This looks okay as a short term fix but I think that extract need to > be-implemented to use the new file system API so that the reasons why > > the directory can be printed too. Also there is an anomaly in errors > related to the directory result in an error message whereas any errors > > extracting to the directory lead to an exception. > > -Alan I think we might have to defer such big change to the next release. If there's no objections I'd propose to deliver this fix AS IS and open a new enhancement request to re-implement 'extract' method. Thank you, Denis.
Re: [9] RFR 8170113: jimage extract to readonly directory causes MissingResourceException
(cc'ing jigsaw-dev as that is where the jimage tool is maintained). On 06/02/2017 10:27, Denis Kononenko wrote: Hi, Could someone please review this very small fix. The class JImageTask (src/jdk.jlink/share/classes/jdk/tools/jimage/JImageTask.java) has references to an info message by 'err.cannot.create.dir' key. Unfortunately the corresponding resource file (src/jdk.jlink/share/classes/jdk/tools/jimage/resources/jimage.properties) doesn't contain this key. This results in long not user friendly stacktraces in output when jimage cannot create a directory. The fix is very small, I added the missing definition into the resource file. BUGURL: https://bugs.openjdk.java.net/browse/JDK-8170113 WEBREV: http://cr.openjdk.java.net/~dkononenko/8170113/webrev.00 This looks okay as a short term fix but I think that extract need to be-implemented to use the new file system API so that the reasons why the directory can be printed too. Also there is an anomaly in errors related to the directory result in an error message whereas any errors extracting to the directory lead to an exception. -Alan