Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5a49292d
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5a49292d
编写于
2月 18, 2016
作者:
M
mcherkas
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8130242: DataFlavorComparator transitivity exception
Reviewed-by: serb
上级
44360c4f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
62 addition
and
42 deletion
+62
-42
src/share/classes/sun/awt/datatransfer/DataTransferer.java
src/share/classes/sun/awt/datatransfer/DataTransferer.java
+8
-7
test/sun/awt/datatransfer/DataFlavorComparatorTest1.java
test/sun/awt/datatransfer/DataFlavorComparatorTest1.java
+54
-35
未找到文件。
src/share/classes/sun/awt/datatransfer/DataTransferer.java
浏览文件 @
5a49292d
...
@@ -2898,13 +2898,7 @@ search:
...
@@ -2898,13 +2898,7 @@ search:
return
comp
;
return
comp
;
}
}
}
else
{
}
else
{
// First, prefer application types.
// First, prefer text types
comp
=
compareIndices
(
primaryTypes
,
primaryType1
,
primaryType2
,
UNKNOWN_OBJECT_LOSES
);
if
(
comp
!=
0
)
{
return
comp
;
}
if
(
flavor1
.
isFlavorTextType
())
{
if
(
flavor1
.
isFlavorTextType
())
{
return
1
;
return
1
;
}
}
...
@@ -2913,6 +2907,13 @@ search:
...
@@ -2913,6 +2907,13 @@ search:
return
-
1
;
return
-
1
;
}
}
// Next, prefer application types.
comp
=
compareIndices
(
primaryTypes
,
primaryType1
,
primaryType2
,
UNKNOWN_OBJECT_LOSES
);
if
(
comp
!=
0
)
{
return
comp
;
}
// Next, look for application/x-java-* types. Prefer unknown
// Next, look for application/x-java-* types. Prefer unknown
// MIME types because if the user provides his own data flavor,
// MIME types because if the user provides his own data flavor,
// it will likely be the most descriptive one.
// it will likely be the most descriptive one.
...
...
test/sun/awt/datatransfer/DataFlavorComparatorTest1.java
浏览文件 @
5a49292d
...
@@ -37,42 +37,61 @@ public class DataFlavorComparatorTest1 {
...
@@ -37,42 +37,61 @@ public class DataFlavorComparatorTest1 {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
[]
mimes
=
new
String
[]
{
String
[]
mimes
=
new
String
[]
{
"text/plain;class=java.nio.ByteBuffer;charset=UTF-8"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=UTF-8"
,
"text/plain;class=java.nio.ByteBuffer;charset=UTF-16LE"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=UTF-16LE"
,
"application/x-java-text-encoding"
,
"application/x-java-serialized-object;class=java.lang.String"
,
"text/plain;class=java.io.InputStream;charset=UTF-8"
,
"text/uri-list;class=java.io.InputStream;charset=UTF-8"
,
"text/plain;class=java.io.InputStream;charset=windows-1252"
,
"text/uri-list;class=java.io.InputStream;charset=windows-1252"
,
"application/x-java-url;class=java.net.URL"
,
"text/plain;class=java.io.Reader"
,
"text/plain;charset=windows-1252"
,
"text/uri-list;class=java.io.Reader"
,
"text/uri-list;charset=windows-1252"
,
"text/plain;charset=UTF-8"
,
"text/uri-list;charset=UTF-8"
,
"text/plain;class=java.io.InputStream;charset=US-ASCII"
,
"text/uri-list;class=java.io.InputStream;charset=US-ASCII"
,
"text/plain;class=java.io.InputStream;charset=UTF-16LE"
,
"text/plain;charset=US-ASCII"
,
"text/uri-list;class=java.io.InputStream;charset=UTF-16LE"
,
"text/uri-list;charset=US-ASCII"
,
"text/plain;charset=UTF-16LE"
,
"text/uri-list;charset=UTF-16LE"
,
"text/plain;class=java.nio.ByteBuffer;charset=UTF-16BE"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=UTF-16BE"
,
"text/plain;class=java.nio.ByteBuffer;charset=ISO-8859-1"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=ISO-8859-1"
,
"text/plain"
,
"text/plain"
,
"text/plain; charset=unicode"
,
"text/uri-list"
,
"text/plain; charset=cp1251"
,
"text/plain;class=java.nio.ByteBuffer;charset=UTF-16"
,
"text/plain; charset=unicode; class=java.io.InputStream"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=UTF-16"
,
"text/plain; charset=unicode; class=java.io.Serializable"
,
"text/plain;class=java.io.InputStream;charset=unicode"
,
"text/plain; charset=unicode; class=java.lang.Object"
,
"text/uri-list;class=java.io.InputStream;charset=UTF-16"
,
"text/plain; class=java.lang.String"
,
"text/plain;class=java.nio.CharBuffer"
,
"text/plain; class=java.io.Reader"
,
"text/uri-list;class=java.nio.CharBuffer"
,
"text/plain; class=java.lang.Object"
,
"text/plain;class=java.lang.String"
,
"text/html"
,
"text/plain;charset=UTF-16BE"
,
"text/html; charset=unicode"
,
"text/uri-list;class=java.lang.String"
,
"text/html; charset=cp1251"
,
"text/uri-list;charset=UTF-16BE"
,
"text/html; charset=unicode; class=java.io.InputStream"
,
"text/plain;charset=ISO-8859-1"
,
"text/html; charset=unicode; class=java.io.Serializable"
,
"text/uri-list;charset=ISO-8859-1"
,
"text/html; charset=unicode; class=java.lang.Object"
,
"text/plain;class=java.io.InputStream;charset=UTF-16BE"
,
"text/html; class=java.lang.String"
,
"text/uri-list;class=java.io.InputStream;charset=UTF-16BE"
,
"text/html; class=java.io.Reader"
,
"text/plain;class=java.nio.ByteBuffer;charset=US-ASCII"
,
"text/html; class=java.lang.Object"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=US-ASCII"
,
"text/unknown"
,
"text/plain;class=java.io.InputStream;charset=ISO-8859-1"
,
"text/unknown; charset=unicode"
,
"text/uri-list;class=java.io.InputStream;charset=ISO-8859-1"
,
"text/unknown; charset=cp1251"
,
"text/plain;charset=UTF-16"
,
"text/unknown; charset=unicode; class=java.io.InputStream"
,
"text/plain;class=java.nio.ByteBuffer;charset=windows-1252"
,
"text/unknown; charset=unicode; class=java.io.Serializable"
,
"text/uri-list;charset=UTF-16"
,
"text/unknown; charset=unicode; class=java.lang.Object"
,
"text/uri-list;class=java.nio.ByteBuffer;charset=windows-1252"
,
"text/unknown; class=java.lang.String"
,
"text/plain;class=java.io.InputStream;charset=windows-1252"
,
"text/unknown; class=java.io.Reader"
,
"text/uri-list;class=java.io.InputStream;charset=windows-1252"
,
"text/unknown; class=java.lang.Object"
,
"application/unknown; class=java.io.InputStream"
,
"application/unknown; class=java.lang.Object"
,
"application/unknown"
,
"application/x-java-jvm-local-objectref; class=java.io.InputStream"
,
"application/x-java-jvm-local-objectref; class=java.lang.Object"
,
"application/x-java-jvm-local-objectref"
,
"unknown/flavor"
,
"unknown/flavor; class=java.io.InputStream"
,
"unknown/flavor; class=java.lang.Object"
,
};
};
DataFlavor
[]
flavors
=
new
DataFlavor
[
mimes
.
length
];
DataFlavor
[]
flavors
=
new
DataFlavor
[
mimes
.
length
];
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录