-
Bug
-
Resolution: Fixed
-
P4
-
8u91
-
b01
-
x86
-
other
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8183700 | 8u161 | Robin Stevens | P4 | Resolved | Fixed | b01 |
JDK-8192436 | emb-8u161 | Robin Stevens | P4 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin MacPro-Robin.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
The backport of issueJDK-8136763 introduced a new bug.
When you copy-paste, or drag-and-drop 2 files, the data in the transferable for data flavor "text/uri-list" concats the strings.
For example, if you drag-and-drop files:
/Users/robin/Desktop/file1.txt
/Users/robin/Desktop/file2.txt
the transferable wil contain
/Users/robin/Desktop/file1.txt/Users/robin/Desktop/file2.txt
The problem is located in the CDataTransferer#translateBytes method, which is missing an sb.append(separator); call
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Follow the steps of the manual testcase available in the OpenJDK (test/java/awt/datatransfer/DataFlavor/MacOsXFileAndMultipleFileCopingTest/MacOsXFileAndMultipleFileCopingTest.java).
This test case fails on jdk8, but succeeds on jdk9
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The test case succeeds
ACTUAL -
The paths of the first two files are grouped into one string, making it impossible to retrieve the 2 separate paths
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin MacPro-Robin.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
The backport of issue
When you copy-paste, or drag-and-drop 2 files, the data in the transferable for data flavor "text/uri-list" concats the strings.
For example, if you drag-and-drop files:
/Users/robin/Desktop/file1.txt
/Users/robin/Desktop/file2.txt
the transferable wil contain
/Users/robin/Desktop/file1.txt/Users/robin/Desktop/file2.txt
The problem is located in the CDataTransferer#translateBytes method, which is missing an sb.append(separator); call
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Follow the steps of the manual testcase available in the OpenJDK (test/java/awt/datatransfer/DataFlavor/MacOsXFileAndMultipleFileCopingTest/MacOsXFileAndMultipleFileCopingTest.java).
This test case fails on jdk8, but succeeds on jdk9
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The test case succeeds
ACTUAL -
The paths of the first two files are grouped into one string, making it impossible to retrieve the 2 separate paths
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8183700 "text/uri-list" dataflavor concats the first two strings
- Resolved
-
JDK-8192436 "text/uri-list" dataflavor concats the first two strings
- Resolved
- relates to
-
JDK-8172352 [macosx] dragging "text/uri-list" data flavor leads to Safari crash and system instability
- Open
-
JDK-8136763 [macosx] java always returns only one value for "text/uri-list" dataflavor even if several files were copied
- Resolved