<div dir="ltr">Please review the fix for JDK-8160941 .<div><br></div><div>Webrev: <a href="http://cr.openjdk.java.net/~rstevens/8160941/webrev/">http://cr.openjdk.java.net/~rstevens/8160941/webrev/</a></div><div><br></div><div><div>The problem: when copy-pasting (or drag-and-dropping) multiple files, the data in the transferable for the flavor "text/uri-list" concats the first two paths.</div><div><br></div><div>If you for example copy:</div><div>/Users/robin/Desktop/file1.txt</div><div>/Users/robin/Desktop/file2.txt</div><div>/Users/robin/Desktop/file3.txt</div><div><br></div><div>the data in the transferable is</div><div><br></div><div>/Users/robin/Desktop/file1.txt/Users/robin/Desktop/file2.txt</div><div>/Users/robin/Desktop/file3.txt</div><div><br></div><div>while the expected data is</div><div><br></div><div>/Users/robin/Desktop/file1.txt</div><div>/Users/robin/Desktop/file2.txt</div><div>/Users/robin/Desktop/file3.txt</div><div><br></div><div><br></div><div>This is also what you can observe when running the manual testcase.</div></div><div>As there was already a manual testcase available (which fails on JDK8), the patch does not include one.</div><div><br></div><div>Thanks,</div><div><br></div><div>Robin<br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 9:53 AM, Alexandr Scherbatiy <span dir="ltr"><<a href="mailto:alexandr.scherbatiy@oracle.com" target="_blank">alexandr.scherbatiy@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    On 7/7/2016 10:07 PM, Robin Stevens wrote:<br>
    <blockquote type="cite">
      <div dir="ltr">Thanks Alexander for creating the issue in the bug
        tracker and hosting the webrev.
        <div>
          <div>Do I need to send a new review request to the list with
            the official bug number in the subject, or is the current
            email thread sufficient ?</div>
        </div>
      </div>
    </blockquote>
    <br></span>
      Yes. You can just reply on this email, correct the bug id and
    provide the webrev link.<br>
    <br>
      Thanks,<br>
      Alexandr.<div><div class="h5"><br>
    <blockquote type="cite">
      <div dir="ltr">
        <div>
          <div><br>
          </div>
          <div>Robin</div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jul 7, 2016 at 9:36 AM,
          Alexandr Scherbatiy <span dir="ltr"><<a href="mailto:alexandr.scherbatiy@oracle.com" target="_blank">alexandr.scherbatiy@oracle.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> <br>
                The issue is recorded under id  JDK-8160941
              "text/uri-list" dataflavor concats the first two strings<br>
                  <a href="https://bugs.openjdk.java.net/browse/JDK-8160941" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8160941</a><br>
              <br>
                The webrev is uploaded to <a href="http://cr.openjdk.java.net/%7Ealexsch/robin.stevens/8160941/webrev.00" target="_blank">http://cr.openjdk.java.net/~alexsch/robin.stevens/8160941/webrev.00</a><br>
              <br>
                Thanks,<br>
                Alexandr.<br>
              <br>
              <div>On 7/7/2016 10:10 AM, Robin Stevens wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">Hello,
                  <div><br>
                  </div>
                  <div>the backport of the fix for <a href="https://bugs.openjdk.java.net/browse/JDK-8136763" target="_blank">https://bugs.openjdk.java.net/browse/JDK-8136763</a>
                    looks incorrect.</div>
                  <div>The corresponding manual test case fails on jdk8.</div>
                  <div><br>
                  </div>
                  <div>The problem: when copy-pasting (or
                    drag-and-dropping) multiple files, the data in the
                    transferable for the flavor "text/uri-list" concats
                    the first two paths.</div>
                  <div><br>
                  </div>
                  <div>If you for example copy:</div>
                  <div>/Users/robin/Desktop/file1.txt</div>
                  <div>/Users/robin/Desktop/file2.txt<br>
                  </div>
                  <div>/Users/robin/Desktop/file3.txt<br>
                  </div>
                  <div><br>
                  </div>
                  <div>the data in the transferable is</div>
                  <div><br>
                  </div>
                  <div>/Users/robin/Desktop/file1.txt/Users/robin/Desktop/file2.txt<br>
                  </div>
                  <div>/Users/robin/Desktop/file3.txt<br>
                  </div>
                  <div><br>
                  </div>
                  <div>while the expected data is</div>
                  <div><br>
                  </div>
                  <div>
                    <div>/Users/robin/Desktop/file1.txt</div>
                    <div>/Users/robin/Desktop/file2.txt<br>
                    </div>
                    <div>/Users/robin/Desktop/file3.txt<br>
                    </div>
                  </div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>This is also what you can observe when running
                    the manual testcase.</div>
                  <div><br>
                  </div>
                  <div>I have logged this in the bug database as
                    issue JI-9041413.</div>
                  <div><br>
                  </div>
                  <div>Attached you find a webrev with the proposed
                    patch.</div>
                  <div>The manual testcase succeeds with this patch, and
                    fails without.</div>
                  <div>At the bottom of this email, you also find the
                    output of hg diff.</div>
                  <div><br>
                  </div>
                  <div>The patch does not include a testcase, as there
                    is already one available.</div>
                  <div><br>
                  </div>
                  <div>Regards,</div>
                  <div><br>
                  </div>
                  <div>Robin</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>hg diff output:</div>
                  <div><br>
                  </div>
                  <div>
                    <div>diff -r 0844fa517c35
                      src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java</div>
                    <div>---
                      a/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java<span style="white-space:pre-wrap">     </span>Tue
                      Jul 05 11:03:13 2016 -0700</div>
                    <div>+++
                      b/src/macosx/classes/sun/lwawt/macosx/CDataTransferer.java<span style="white-space:pre-wrap">     </span>Thu
                      Jul 07 08:48:37 2016 +0200</div>
                    <div>@@ -148,6 +148,7 @@</div>
                    <div>             StringBuilder sb = new
                      StringBuilder();</div>
                    <div>             if(strings.length > 0) {</div>
                    <div>                 sb.append(strings[0]);</div>
                    <div>+                sb.append(separator);</div>
                    <div>                 for(int i = 1; i <
                      strings.length; i++) {</div>
                    <div>                     sb.append(strings[i]);</div>
                    <div>                     sb.append(separator);</div>
                  </div>
                </div>
              </blockquote>
              <br>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div></div></div>