On 04/14/2016 11:57 AM, Alan Bateman wrote:


On 13/04/2016 19:55, Xueming Shen wrote:
Hi,

Please hep review the cleanup changes for jrtfs implementation.

I'm skimmed through the changes and it looks very good.

My only concern is that we might have not enough tests for jrtfs to exercise it 
completely. I just checked the coverage it is indeed quite low. I'll create a 
bug for this.

I did not realize that the PathOps.java does not include all the path tests
we have in its nio version. I updated it with all of the "unix version" tests.
It did trigger couple corner cases (the diff against yesterday's version in
JrtPath.java attached )

http://cr.openjdk.java.net/~sherman/8147460/webrev/

sherman

----------------------------------------------------------------------------------------------------------------------
JrtPath.java:

91,93c91
<         if (path.length() == 0)
<             return this;
<         if (path.length() == 1 && path.charAt(0) == '/')
---
>         if (path.length() == 0 || path.length() == 1 && path.charAt(0) == '/')
210,212d207
<         if (path.length() == 0) {
<             return o;
<         }
240a236
>         int pos = 0;
243c239
<             if (sb.length() < len) {  // no tailing slash at the end
---
>             if (pos < len) {  // no tailing slash at the end
267c263
<         if (this.path.length() == 0 || o.isAbsolute()) {
---
>         if (o.isAbsolute()) {
270,272d265
<         if (o.path.length() == 0) {
<             return this;
<         }
299,301d291
<         if (off == 0) {
<             return tp.length() == 0;
<         }

Reply via email to