Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
aaee3a0a
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看板
提交
aaee3a0a
编写于
9月 09, 2008
作者:
M
martin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6728229: (str) StringBuilder.append(CharSequence) does not throw IndexOutOfBoundsException
Summary: Major spec rework Reviewed-by: alanb
上级
9d7df9ae
变更
3
展开全部
隐藏空白更改
内联
并排
Showing
3 changed file
with
244 addition
and
313 deletion
+244
-313
src/share/classes/java/lang/AbstractStringBuilder.java
src/share/classes/java/lang/AbstractStringBuilder.java
+229
-215
src/share/classes/java/lang/StringBuffer.java
src/share/classes/java/lang/StringBuffer.java
+8
-49
src/share/classes/java/lang/StringBuilder.java
src/share/classes/java/lang/StringBuilder.java
+7
-49
未找到文件。
src/share/classes/java/lang/AbstractStringBuilder.java
浏览文件 @
aaee3a0a
此差异已折叠。
点击以展开。
src/share/classes/java/lang/StringBuffer.java
浏览文件 @
aaee3a0a
...
...
@@ -212,7 +212,7 @@ package java.lang;
* @throws NullPointerException {@inheritDoc}
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public
synchronized
void
getChars
(
int
srcBegin
,
int
srcEnd
,
char
dst
[]
,
public
synchronized
void
getChars
(
int
srcBegin
,
int
srcEnd
,
char
[]
dst
,
int
dstBegin
)
{
super
.
getChars
(
srcBegin
,
srcEnd
,
dst
,
dstBegin
);
...
...
@@ -228,10 +228,6 @@ package java.lang;
value
[
index
]
=
ch
;
}
/**
* @see java.lang.String#valueOf(java.lang.Object)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
Object
obj
)
{
super
.
append
(
String
.
valueOf
(
obj
));
return
this
;
...
...
@@ -314,20 +310,19 @@ package java.lang;
return
this
;
}
public
synchronized
StringBuffer
append
(
char
str
[]
)
{
public
synchronized
StringBuffer
append
(
char
[]
str
)
{
super
.
append
(
str
);
return
this
;
}
public
synchronized
StringBuffer
append
(
char
str
[],
int
offset
,
int
len
)
{
/**
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public
synchronized
StringBuffer
append
(
char
[]
str
,
int
offset
,
int
len
)
{
super
.
append
(
str
,
offset
,
len
);
return
this
;
}
/**
* @see java.lang.String#valueOf(boolean)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
boolean
b
)
{
super
.
append
(
b
);
return
this
;
...
...
@@ -338,10 +333,6 @@ package java.lang;
return
this
;
}
/**
* @see java.lang.String#valueOf(int)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
int
i
)
{
super
.
append
(
i
);
return
this
;
...
...
@@ -355,28 +346,16 @@ package java.lang;
return
this
;
}
/**
* @see java.lang.String#valueOf(long)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
long
lng
)
{
super
.
append
(
lng
);
return
this
;
}
/**
* @see java.lang.String#valueOf(float)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
float
f
)
{
super
.
append
(
f
);
return
this
;
}
/**
* @see java.lang.String#valueOf(double)
* @see #append(java.lang.String)
*/
public
synchronized
StringBuffer
append
(
double
d
)
{
super
.
append
(
d
);
return
this
;
...
...
@@ -437,7 +416,7 @@ package java.lang;
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @since 1.2
*/
public
synchronized
StringBuffer
insert
(
int
index
,
char
str
[]
,
int
offset
,
public
synchronized
StringBuffer
insert
(
int
index
,
char
[]
str
,
int
offset
,
int
len
)
{
super
.
insert
(
index
,
str
,
offset
,
len
);
...
...
@@ -446,9 +425,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(java.lang.Object)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
synchronized
StringBuffer
insert
(
int
offset
,
Object
obj
)
{
super
.
insert
(
offset
,
String
.
valueOf
(
obj
));
...
...
@@ -457,7 +433,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see #length()
*/
public
synchronized
StringBuffer
insert
(
int
offset
,
String
str
)
{
super
.
insert
(
offset
,
str
);
...
...
@@ -467,7 +442,7 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
*/
public
synchronized
StringBuffer
insert
(
int
offset
,
char
str
[]
)
{
public
synchronized
StringBuffer
insert
(
int
offset
,
char
[]
str
)
{
super
.
insert
(
offset
,
str
);
return
this
;
}
...
...
@@ -498,9 +473,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(boolean)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuffer
insert
(
int
offset
,
boolean
b
)
{
return
insert
(
offset
,
String
.
valueOf
(
b
));
...
...
@@ -508,7 +480,6 @@ package java.lang;
/**
* @throws IndexOutOfBoundsException {@inheritDoc}
* @see #length()
*/
public
synchronized
StringBuffer
insert
(
int
offset
,
char
c
)
{
super
.
insert
(
offset
,
c
);
...
...
@@ -517,9 +488,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(int)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuffer
insert
(
int
offset
,
int
i
)
{
return
insert
(
offset
,
String
.
valueOf
(
i
));
...
...
@@ -527,9 +495,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(long)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuffer
insert
(
int
offset
,
long
l
)
{
return
insert
(
offset
,
String
.
valueOf
(
l
));
...
...
@@ -537,9 +502,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(float)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuffer
insert
(
int
offset
,
float
f
)
{
return
insert
(
offset
,
String
.
valueOf
(
f
));
...
...
@@ -547,9 +509,6 @@ package java.lang;
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(double)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuffer
insert
(
int
offset
,
double
d
)
{
return
insert
(
offset
,
String
.
valueOf
(
d
));
...
...
src/share/classes/java/lang/StringBuilder.java
浏览文件 @
aaee3a0a
...
...
@@ -124,10 +124,6 @@ public final class StringBuilder
append
(
seq
);
}
/**
* @see java.lang.String#valueOf(java.lang.Object)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
Object
obj
)
{
return
append
(
String
.
valueOf
(
obj
));
}
...
...
@@ -175,7 +171,6 @@ public final class StringBuilder
}
/**
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public
StringBuilder
append
(
CharSequence
s
)
{
if
(
s
==
null
)
...
...
@@ -197,20 +192,19 @@ public final class StringBuilder
return
this
;
}
public
StringBuilder
append
(
char
str
[]
)
{
public
StringBuilder
append
(
char
[]
str
)
{
super
.
append
(
str
);
return
this
;
}
public
StringBuilder
append
(
char
str
[],
int
offset
,
int
len
)
{
/**
* @throws IndexOutOfBoundsException {@inheritDoc}
*/
public
StringBuilder
append
(
char
[]
str
,
int
offset
,
int
len
)
{
super
.
append
(
str
,
offset
,
len
);
return
this
;
}
/**
* @see java.lang.String#valueOf(boolean)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
boolean
b
)
{
super
.
append
(
b
);
return
this
;
...
...
@@ -221,37 +215,21 @@ public final class StringBuilder
return
this
;
}
/**
* @see java.lang.String#valueOf(int)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
int
i
)
{
super
.
append
(
i
);
return
this
;
}
/**
* @see java.lang.String#valueOf(long)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
long
lng
)
{
super
.
append
(
lng
);
return
this
;
}
/**
* @see java.lang.String#valueOf(float)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
float
f
)
{
super
.
append
(
f
);
return
this
;
}
/**
* @see java.lang.String#valueOf(double)
* @see #append(java.lang.String)
*/
public
StringBuilder
append
(
double
d
)
{
super
.
append
(
d
);
return
this
;
...
...
@@ -292,7 +270,7 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
*/
public
StringBuilder
insert
(
int
index
,
char
str
[]
,
int
offset
,
public
StringBuilder
insert
(
int
index
,
char
[]
str
,
int
offset
,
int
len
)
{
super
.
insert
(
index
,
str
,
offset
,
len
);
...
...
@@ -301,9 +279,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(java.lang.Object)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
Object
obj
)
{
return
insert
(
offset
,
String
.
valueOf
(
obj
));
...
...
@@ -311,7 +286,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
String
str
)
{
super
.
insert
(
offset
,
str
);
...
...
@@ -321,7 +295,7 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
*/
public
StringBuilder
insert
(
int
offset
,
char
str
[]
)
{
public
StringBuilder
insert
(
int
offset
,
char
[]
str
)
{
super
.
insert
(
offset
,
str
);
return
this
;
}
...
...
@@ -349,9 +323,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(boolean)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
boolean
b
)
{
super
.
insert
(
offset
,
b
);
...
...
@@ -360,7 +331,6 @@ public final class StringBuilder
/**
* @throws IndexOutOfBoundsException {@inheritDoc}
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
char
c
)
{
super
.
insert
(
offset
,
c
);
...
...
@@ -369,9 +339,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(int)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
int
i
)
{
return
insert
(
offset
,
String
.
valueOf
(
i
));
...
...
@@ -379,9 +346,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(long)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
long
l
)
{
return
insert
(
offset
,
String
.
valueOf
(
l
));
...
...
@@ -389,9 +353,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(float)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
float
f
)
{
return
insert
(
offset
,
String
.
valueOf
(
f
));
...
...
@@ -399,9 +360,6 @@ public final class StringBuilder
/**
* @throws StringIndexOutOfBoundsException {@inheritDoc}
* @see java.lang.String#valueOf(double)
* @see #insert(int, java.lang.String)
* @see #length()
*/
public
StringBuilder
insert
(
int
offset
,
double
d
)
{
return
insert
(
offset
,
String
.
valueOf
(
d
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录