Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
351dc065
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看板
提交
351dc065
编写于
8月 08, 2017
作者:
N
naoto
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8182601: Improve usage messages
Reviewed-by: alanb, ahgross, ksrini, mchung, dfuchs
上级
7cb56d9b
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
28 addition
and
13 deletion
+28
-13
src/share/classes/java/util/ResourceBundle.java
src/share/classes/java/util/ResourceBundle.java
+12
-3
src/share/classes/java/util/logging/Level.java
src/share/classes/java/util/logging/Level.java
+11
-5
src/share/classes/java/util/logging/Logger.java
src/share/classes/java/util/logging/Logger.java
+2
-3
src/share/classes/javax/swing/UIDefaults.java
src/share/classes/javax/swing/UIDefaults.java
+3
-2
未找到文件。
src/share/classes/java/util/ResourceBundle.java
浏览文件 @
351dc065
/*
* Copyright (c) 1996, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -485,7 +485,7 @@ public abstract class ResourceBundle {
}
/**
* A wrapper of
ClassLoader.getSystemClassLoader().
* A wrapper of
Extension Class Loader
*/
private
static
class
RBClassLoader
extends
ClassLoader
{
private
static
final
RBClassLoader
INSTANCE
=
AccessController
.
doPrivileged
(
...
...
@@ -494,7 +494,16 @@ public abstract class ResourceBundle {
return
new
RBClassLoader
();
}
});
private
static
final
ClassLoader
loader
=
ClassLoader
.
getSystemClassLoader
();
private
static
final
ClassLoader
loader
;
static
{
// Find the extension class loader.
ClassLoader
ld
=
ClassLoader
.
getSystemClassLoader
();
ClassLoader
parent
;
while
((
parent
=
ld
.
getParent
())
!=
null
)
{
ld
=
parent
;
}
loader
=
ld
;
}
private
RBClassLoader
()
{
}
...
...
src/share/classes/java/util/logging/Level.java
浏览文件 @
351dc065
/*
* Copyright (c) 2000, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -262,11 +262,17 @@ public class Level implements java.io.Serializable {
}
private
String
computeLocalizedLevelName
(
Locale
newLocale
)
{
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
resourceBundleName
,
newLocale
);
final
String
localizedName
=
rb
.
getString
(
name
);
// If this is a custom Level, load resource bundles on the
// classpath and return.
if
(!
defaultBundle
.
equals
(
resourceBundleName
))
{
return
ResourceBundle
.
getBundle
(
resourceBundleName
,
newLocale
,
ClassLoader
.
getSystemClassLoader
()).
getString
(
name
);
}
final
boolean
isDefaultBundle
=
defaultBundle
.
equals
(
resourceBundleName
);
if
(!
isDefaultBundle
)
return
localizedName
;
// The default bundle "sun.util.logging.resources.logging" should only
// be loaded from the runtime; so use the extension class loader;
final
ResourceBundle
rb
=
ResourceBundle
.
getBundle
(
defaultBundle
,
newLocale
);
final
String
localizedName
=
rb
.
getString
(
name
);
// This is a trick to determine whether the name has been translated
// or not. If it has not been translated, we need to use Locale.ROOT
...
...
src/share/classes/java/util/logging/Logger.java
浏览文件 @
351dc065
/*
* Copyright (c) 2000, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -1817,8 +1817,7 @@ public class Logger {
public
ResourceBundle
run
()
{
try
{
return
ResourceBundle
.
getBundle
(
SYSTEM_LOGGER_RB_NAME
,
locale
,
ClassLoader
.
getSystemClassLoader
());
locale
);
}
catch
(
MissingResourceException
e
)
{
throw
new
InternalError
(
e
.
toString
());
}
...
...
src/share/classes/javax/swing/UIDefaults.java
浏览文件 @
351dc065
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
7
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -305,7 +305,8 @@ public class UIDefaults extends Hashtable<Object,Object>
if
(
c
!=
null
)
{
b
=
ResourceBundle
.
getBundle
(
bundleName
,
l
,
c
);
}
else
{
b
=
ResourceBundle
.
getBundle
(
bundleName
,
l
);
b
=
ResourceBundle
.
getBundle
(
bundleName
,
l
,
ClassLoader
.
getSystemClassLoader
());
}
Enumeration
keys
=
b
.
getKeys
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录