Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
10d3d1c4
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看板
提交
10d3d1c4
编写于
10月 22, 2013
作者:
P
peytoia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8020037: String.toLowerCase incorrectly increases length, if string contains \u0130 char
Reviewed-by: naoto
上级
9105f3d8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
17 deletion
+7
-17
src/share/classes/java/lang/ConditionalSpecialCasing.java
src/share/classes/java/lang/ConditionalSpecialCasing.java
+1
-5
src/share/classes/java/lang/String.java
src/share/classes/java/lang/String.java
+2
-9
test/java/lang/String/ToLowerCase.java
test/java/lang/String/ToLowerCase.java
+4
-3
未找到文件。
src/share/classes/java/lang/ConditionalSpecialCasing.java
浏览文件 @
10d3d1c4
...
...
@@ -74,7 +74,6 @@ final class ConditionalSpecialCasing {
new
Entry
(
0x00CC
,
new
char
[]{
0x0069
,
0x0307
,
0x0300
},
new
char
[]{
0x00CC
},
"lt"
,
0
),
// # LATIN CAPITAL LETTER I WITH GRAVE
new
Entry
(
0x00CD
,
new
char
[]{
0x0069
,
0x0307
,
0x0301
},
new
char
[]{
0x00CD
},
"lt"
,
0
),
// # LATIN CAPITAL LETTER I WITH ACUTE
new
Entry
(
0x0128
,
new
char
[]{
0x0069
,
0x0307
,
0x0303
},
new
char
[]{
0x0128
},
"lt"
,
0
),
// # LATIN CAPITAL LETTER I WITH TILDE
new
Entry
(
0x0130
,
new
char
[]{
0x0069
,
0x0307
},
new
char
[]{
0x0130
},
"lt"
,
0
),
// # LATIN CAPITAL LETTER I WITH DOT ABOVE
//# ================================================================================
//# Turkish and Azeri
...
...
@@ -85,10 +84,7 @@ final class ConditionalSpecialCasing {
new
Entry
(
0x0049
,
new
char
[]{
0x0131
},
new
char
[]{
0x0049
},
"tr"
,
NOT_BEFORE_DOT
),
// # LATIN CAPITAL LETTER I
new
Entry
(
0x0049
,
new
char
[]{
0x0131
},
new
char
[]{
0x0049
},
"az"
,
NOT_BEFORE_DOT
),
// # LATIN CAPITAL LETTER I
new
Entry
(
0x0069
,
new
char
[]{
0x0069
},
new
char
[]{
0x0130
},
"tr"
,
0
),
// # LATIN SMALL LETTER I
new
Entry
(
0x0069
,
new
char
[]{
0x0069
},
new
char
[]{
0x0130
},
"az"
,
0
),
// # LATIN SMALL LETTER I
//# ================================================================================
//# Other
new
Entry
(
0x0130
,
new
char
[]{
0x0069
,
0x0307
},
new
char
[]{
0x0130
},
"en"
,
0
),
// # LATIN CAPITALLETTER I WITH DOT ABOVE
new
Entry
(
0x0069
,
new
char
[]{
0x0069
},
new
char
[]{
0x0130
},
"az"
,
0
)
// # LATIN SMALL LETTER I
};
// A hash table that contains the above entries
...
...
src/share/classes/java/lang/String.java
浏览文件 @
10d3d1c4
...
...
@@ -2598,21 +2598,14 @@ public final class String
}
if
(
localeDependent
||
srcChar
==
'\
u03A3
'
)
{
// GREEK CAPITAL LETTER SIGMA
lowerChar
=
ConditionalSpecialCasing
.
toLowerCaseEx
(
this
,
i
,
locale
);
}
else
if
(
srcChar
==
'\u0130'
)
{
// LATIN CAPITAL LETTER I DOT
lowerChar
=
Character
.
ERROR
;
}
else
{
lowerChar
=
Character
.
toLowerCase
(
srcChar
);
}
if
((
lowerChar
==
Character
.
ERROR
)
||
(
lowerChar
>=
Character
.
MIN_SUPPLEMENTARY_CODE_POINT
))
{
if
(
lowerChar
==
Character
.
ERROR
)
{
if
(!
localeDependent
&&
srcChar
==
'\u0130'
)
{
lowerCharArray
=
ConditionalSpecialCasing
.
toLowerCaseCharArray
(
this
,
i
,
Locale
.
ENGLISH
);
}
else
{
lowerCharArray
=
ConditionalSpecialCasing
.
toLowerCaseCharArray
(
this
,
i
,
locale
);
}
lowerCharArray
=
ConditionalSpecialCasing
.
toLowerCaseCharArray
(
this
,
i
,
locale
);
}
else
if
(
srcCount
==
2
)
{
resultOffset
+=
Character
.
toChars
(
lowerChar
,
result
,
i
+
resultOffset
)
-
srcCount
;
continue
;
...
...
test/java/lang/String/ToLowerCase.java
浏览文件 @
10d3d1c4
...
...
@@ -23,7 +23,7 @@
/*
@test
@bug 4217441 4533872 4900935
@bug 4217441 4533872 4900935
8020037
@summary toLowerCase should lower-case Greek Sigma correctly depending
on the context (final/non-final). Also it should handle
Locale specific (lt, tr, and az) lowercasings and supplementary
...
...
@@ -69,10 +69,11 @@ public class ToLowerCase {
test
(
"\u00CD"
,
Locale
.
US
,
"\u00ED"
);
test
(
"\u0128"
,
Locale
.
US
,
"\u0129"
);
// I-dot tests
(Turkish and Azeri)
// I-dot tests
test
(
"\u0130"
,
turkish
,
"i"
);
test
(
"\u0130"
,
az
,
"i"
);
test
(
"\u0130"
,
Locale
.
US
,
"i\u0307"
);
test
(
"\u0130"
,
lt
,
"i"
);
test
(
"\u0130"
,
Locale
.
US
,
"i"
);
// Remove dot_above in the sequence I + dot_above (Turkish and Azeri)
test
(
"I\u0307"
,
turkish
,
"i"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录