Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_langtools
提交
4202ed20
D
dragonwell8_langtools
项目概览
openanolis
/
dragonwell8_langtools
通知
0
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_langtools
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
4202ed20
编写于
1月 15, 2009
作者:
J
jjg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6794520: MessageRetriever should be upgraded to use varargs Object...
Reviewed-by: bpatel
上级
3e6fc31b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
21 addition
and
254 deletion
+21
-254
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
...tools/doclets/internal/toolkit/util/MessageRetriever.java
+21
-253
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
...ses/com/sun/tools/doclets/internal/toolkit/util/Util.java
+0
-1
未找到文件。
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
浏览文件 @
4202ed20
...
@@ -80,47 +80,15 @@ public class MessageRetriever {
...
@@ -80,47 +80,15 @@ public class MessageRetriever {
this
.
resourcelocation
=
resourcelocation
;
this
.
resourcelocation
=
resourcelocation
;
}
}
/**
* get and format message string from resource
*
* @param key selects message from resource
*/
public
String
getText
(
String
key
)
{
return
getText
(
key
,
(
String
)
null
);
}
/**
* Get and format message string from resource
*
* @param key selects message from resource
* @param a1 Argument, to be repalced in the message.
*/
public
String
getText
(
String
key
,
String
a1
)
{
return
getText
(
key
,
a1
,
null
);
}
/**
* Get and format message string from resource
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
public
String
getText
(
String
key
,
String
a1
,
String
a2
)
{
return
getText
(
key
,
a1
,
a2
,
null
);
}
/**
/**
* Get and format message string from resource
* Get and format message string from resource
*
*
* @param key selects message from resource
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param args arguments to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
* @throws MissingResourceException when the key does not
* @throws MissingResourceException when the key does not
* exist in the properties file.
* exist in the properties file.
*/
*/
public
String
getText
(
String
key
,
String
a1
,
String
a2
,
String
a3
)
throws
MissingResourceException
{
public
String
getText
(
String
key
,
Object
...
args
)
throws
MissingResourceException
{
if
(
messageRB
==
null
)
{
if
(
messageRB
==
null
)
{
try
{
try
{
messageRB
=
ResourceBundle
.
getBundle
(
resourcelocation
);
messageRB
=
ResourceBundle
.
getBundle
(
resourcelocation
);
...
@@ -130,7 +98,7 @@ public class MessageRetriever {
...
@@ -130,7 +98,7 @@ public class MessageRetriever {
}
}
}
}
String
message
=
messageRB
.
getString
(
key
);
String
message
=
messageRB
.
getString
(
key
);
return
MessageFormat
.
format
(
message
,
a
1
,
a2
,
a3
);
return
MessageFormat
.
format
(
message
,
a
rgs
);
}
}
/**
/**
...
@@ -195,127 +163,20 @@ public class MessageRetriever {
...
@@ -195,127 +163,20 @@ public class MessageRetriever {
*
*
* @param pos the position of the source
* @param pos the position of the source
* @param key selects message from resource
* @param key selects message from resource
* @param args arguments to be replaced in the message.
*/
*/
public
void
error
(
SourcePosition
pos
,
String
key
)
{
public
void
error
(
SourcePosition
pos
,
String
key
,
Object
...
args
)
{
printError
(
pos
,
getText
(
key
));
printError
(
pos
,
getText
(
key
,
args
));
}
}
/**
/**
* Print error message, increment error count.
* Print error message, increment error count.
*
*
* @param key selects message from resource
* @param key selects message from resource
* @param args arguments to be replaced in the message.
*/
*/
public
void
error
(
String
key
)
{
public
void
error
(
String
key
,
Object
...
args
)
{
printError
(
getText
(
key
));
printError
(
getText
(
key
,
args
));
}
/**
* Print error message, increment error count.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
error
(
SourcePosition
pos
,
String
key
,
String
a1
)
{
printError
(
pos
,
getText
(
key
,
a1
));
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
error
(
String
key
,
String
a1
)
{
printError
(
getText
(
key
,
a1
));
}
/**
* Print error message, increment error count.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
public
void
error
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
)
{
printError
(
pos
,
getText
(
key
,
a1
,
a2
));
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
public
void
error
(
String
key
,
String
a1
,
String
a2
)
{
printError
(
getText
(
key
,
a1
,
a2
));
}
/**
* Print error message, increment error count.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
public
void
error
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
printError
(
pos
,
getText
(
key
,
a1
,
a2
,
a3
));
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
public
void
error
(
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
printError
(
getText
(
key
,
a1
,
a2
,
a3
));
}
/**
* Print warning message, increment warning count.
*
* @param pos the position of the source
* @param key selects message from resource
*/
public
void
warning
(
SourcePosition
pos
,
String
key
)
{
printWarning
(
pos
,
getText
(
key
));
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
*/
public
void
warning
(
String
key
)
{
printWarning
(
getText
(
key
));
}
/**
* Print warning message, increment warning count.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
warning
(
SourcePosition
pos
,
String
key
,
String
a1
)
{
printWarning
(
pos
,
getText
(
key
,
a1
));
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
warning
(
String
key
,
String
a1
)
{
printWarning
(
getText
(
key
,
a1
));
}
}
/**
/**
...
@@ -323,109 +184,20 @@ public class MessageRetriever {
...
@@ -323,109 +184,20 @@ public class MessageRetriever {
*
*
* @param pos the position of the source
* @param pos the position of the source
* @param key selects message from resource
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param args arguments to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
*/
public
void
warning
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
)
{
public
void
warning
(
SourcePosition
pos
,
String
key
,
Object
...
args
)
{
printWarning
(
pos
,
getText
(
key
,
a
1
,
a2
));
printWarning
(
pos
,
getText
(
key
,
a
rgs
));
}
}
/**
/**
* Print warning message, increment warning count.
* Print warning message, increment warning count.
*
*
* @param key selects message from resource
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param args arguments to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
public
void
warning
(
String
key
,
String
a1
,
String
a2
)
{
printWarning
(
getText
(
key
,
a1
,
a2
));
}
/**
* Print warning message, increment warning count.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
public
void
warning
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
printWarning
(
pos
,
getText
(
key
,
a1
,
a2
,
a3
));
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
public
void
warning
(
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
printWarning
(
getText
(
key
,
a1
,
a2
,
a3
));
}
/**
* Print a message.
*
* @param pos the position of the source
* @param key selects message from resource
*/
public
void
notice
(
SourcePosition
pos
,
String
key
)
{
printNotice
(
pos
,
getText
(
key
));
}
/**
* Print a message.
*
* @param key selects message from resource
*/
public
void
notice
(
String
key
)
{
printNotice
(
getText
(
key
));
}
/**
* Print a message.
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
notice
(
SourcePosition
pos
,
String
key
,
String
a1
)
{
printNotice
(
pos
,
getText
(
key
,
a1
));
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
*/
public
void
notice
(
String
key
,
String
a1
)
{
printNotice
(
getText
(
key
,
a1
));
}
/**
* Print a message.
*
* @param pos the position of the source
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
public
void
notice
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
)
{
printNotice
(
pos
,
getText
(
key
,
a1
,
a2
));
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param a2 second argument to be replaced in the message.
*/
*/
public
void
notice
(
String
key
,
String
a1
,
String
a2
)
{
public
void
warning
(
String
key
,
Object
...
args
)
{
print
Notice
(
getText
(
key
,
a1
,
a2
));
print
Warning
(
getText
(
key
,
args
));
}
}
/**
/**
...
@@ -433,23 +205,19 @@ public class MessageRetriever {
...
@@ -433,23 +205,19 @@ public class MessageRetriever {
*
*
* @param pos the position of the source
* @param pos the position of the source
* @param key selects message from resource
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param args arguments to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
*/
public
void
notice
(
SourcePosition
pos
,
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
public
void
notice
(
SourcePosition
pos
,
String
key
,
Object
...
args
)
{
printNotice
(
pos
,
getText
(
key
,
a
1
,
a2
,
a3
));
printNotice
(
pos
,
getText
(
key
,
a
rgs
));
}
}
/**
/**
* Print a message.
* Print a message.
*
*
* @param key selects message from resource
* @param key selects message from resource
* @param a1 first argument to be replaced in the message.
* @param args arguments to be replaced in the message.
* @param a2 second argument to be replaced in the message.
* @param a3 third argument to be replaced in the message.
*/
*/
public
void
notice
(
String
key
,
String
a1
,
String
a2
,
String
a3
)
{
public
void
notice
(
String
key
,
Object
...
args
)
{
printNotice
(
getText
(
key
,
a
1
,
a2
,
a3
));
printNotice
(
getText
(
key
,
a
rgs
));
}
}
}
}
src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
浏览文件 @
4202ed20
...
@@ -599,7 +599,6 @@ public class Util {
...
@@ -599,7 +599,6 @@ public class Util {
}
}
if
(
docencoding
==
null
)
{
if
(
docencoding
==
null
)
{
OutputStreamWriter
oswriter
=
new
OutputStreamWriter
(
fos
);
OutputStreamWriter
oswriter
=
new
OutputStreamWriter
(
fos
);
docencoding
=
oswriter
.
getEncoding
();
return
oswriter
;
return
oswriter
;
}
else
{
}
else
{
return
new
OutputStreamWriter
(
fos
,
docencoding
);
return
new
OutputStreamWriter
(
fos
,
docencoding
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录