Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-06-05 Thread Ulf Zibis
Am 05.06.2016 um 21:30 schrieb Ulf Zibis: And I still think, moving the string concatenation to ZipPath constructor would be a good idea. I believe, this would make things more simple and less redundant: ZipPath(ZipFileSystem zfs, String first, String... more) E.g. you could reuse the

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-06-05 Thread Ulf Zibis
Am 05.06.2016 um 21:30 schrieb Ulf Zibis: Is this the answer to my # 3.) ? I really often see Windows-1252 coded zip files for download in the web. Maybe you see them rarely as american, but if there are german Umlaute in the file names, it' really painful to convert all the paths here on

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-06-05 Thread Ulf Zibis
Sherman, thanks for your consideration. Am 31.05.2016 um 19:08 schrieb Xueming Shen: Ulf, thanks for the suggestions! On 5/31/16 6:27 AM, Ulf Zibis wrote: Hi Sherman, 1.) wouldn't it be better to have a public getBytes() in AbstractStringBuilder? Then you could save the array copy with

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-05-31 Thread Xueming Shen
Ulf, thanks for the suggestions! On 5/31/16 6:27 AM, Ulf Zibis wrote: Hi Sherman, 1.) wouldn't it be better to have a public getBytes() in AbstractStringBuilder? Then you could save the array copy with sb.toString() here: 178 return new ZipPath(this, sb.toString(), zc.isUTF8());

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-05-31 Thread Ulf Zibis
Hi Sherman, 1.) wouldn't it be better to have a public getBytes() in AbstractStringBuilder? Then you could save the array copy with sb.toString() here: 178 return new ZipPath(this, sb.toString(), zc.isUTF8()); 525 return zfs.getBytes(to.toString()); You could simplify even

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-05-31 Thread Paul Sandoz
> On 31 May 2016, at 07:07, Xueming Shen wrote: > > Thanks Paul, > > updated accordingly. > > http://cr.openjdk.java.net/~sherman/8061777/webrev > +1 Alas it’s awkward to do the converse for constructor accepting byte[] that may or may not be utf-8 given the

Re: RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-05-30 Thread Paul Sandoz
Hi Sherman, Do you consider modifying the new ZipPath constructor you added to accept a boolean value for UTF-8 encoding? If so you can more clearly document the behaviour and avoid duplication of the operators in ZipFileSystem e.g.: return new ZipPath(this, first, zc.isUTF8()); Paul. >

RFR: JDK-8061777, , (zipfs) IllegalArgumentException in ZipCoder.toString when using Shitft_JIS

2016-05-27 Thread Xueming Shen
Hi, Please help review the change for JDK-8061777. issue: https://bugs.openjdk.java.net/browse/JDK-8061777 webrev: http://cr.openjdk.java.net/~sherman/8061777 Cause: ZipPath/ZipFileSystem uses byte[] as the internal underlying storage for entry names (for better performance, as the "name" is