Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
80aee3ba
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看板
提交
80aee3ba
编写于
3月 02, 2011
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7021987: native2ascii "file cannot be read" error message is broken
Reviewed-by: lancea, mchung
上级
c50f281e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
9 deletion
+16
-9
src/share/classes/sun/tools/native2ascii/Main.java
src/share/classes/sun/tools/native2ascii/Main.java
+6
-8
test/sun/tools/native2ascii/Native2AsciiTests.sh
test/sun/tools/native2ascii/Native2AsciiTests.sh
+10
-1
未找到文件。
src/share/classes/sun/tools/native2ascii/Main.java
浏览文件 @
80aee3ba
...
...
@@ -94,7 +94,7 @@ public class Main {
* Run the converter
*/
public
synchronized
boolean
convert
(
String
argv
[]){
Vector
v
=
new
Vector
(
2
);
List
<
String
>
v
=
new
ArrayList
<>
(
2
);
File
outputFile
=
null
;
boolean
createOutputFile
=
false
;
...
...
@@ -115,7 +115,7 @@ public class Main {
usage
();
return
false
;
}
v
.
add
Element
(
argv
[
i
]);
v
.
add
(
argv
[
i
]);
}
}
if
(
encodingString
==
null
)
...
...
@@ -126,11 +126,11 @@ public class Main {
initializeConverter
();
if
(
v
.
size
()
==
1
)
inputFileName
=
(
String
)
v
.
elementA
t
(
0
);
inputFileName
=
v
.
ge
t
(
0
);
if
(
v
.
size
()
==
2
)
{
inputFileName
=
(
String
)
v
.
elementA
t
(
0
);
outputFileName
=
(
String
)
v
.
elementA
t
(
1
);
inputFileName
=
v
.
ge
t
(
0
);
outputFileName
=
v
.
ge
t
(
1
);
createOutputFile
=
true
;
}
...
...
@@ -363,9 +363,7 @@ public class Main {
private
String
formatMsg
(
String
key
,
String
arg
)
{
String
msg
=
getMsg
(
key
);
String
[]
args
=
new
String
[
1
];
args
[
0
]
=
arg
;
return
MessageFormat
.
format
(
msg
,
(
Object
)
args
);
return
MessageFormat
.
format
(
msg
,
arg
);
}
...
...
test/sun/tools/native2ascii/Native2AsciiTests.sh
浏览文件 @
80aee3ba
...
...
@@ -24,7 +24,7 @@
#
# @test
# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817
# @bug 4630463 4630971 4636448 4701617 4721296 4710890 6247817
7021987
# @summary Tests miscellaneous native2ascii bugfixes and regressions
...
...
@@ -100,6 +100,15 @@ rm -f x.*
$N2A
-reverse
-encoding
MS932
$TESTSRC
/A2N_4701617 x.out
check 4701617
$TESTSRC
/A2N_4701617.expected x.out
# Check that the inputfile appears in the error message when not found
badin
=
"DoesNotExist"
$N2A
$badin
x.out |
grep
"
$badin
"
>
/dev/null
if
[
$?
!=
0
]
;
then
echo
"
\"
$badin
\"
expected to appear in error message"
exit
1
fi
# for win32 only ensure when output file pre-exists that
# native2ascii tool will simply overwrite with the expected
# output file (fixed bugID 4710890)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录