Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
e8775990
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e8775990
编写于
6月 19, 2012
作者:
M
malenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7162476: XMLDecoder security issue via ClassFinder
Reviewed-by: art, ahgross
上级
01b6efab
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
72 addition
and
99 deletion
+72
-99
make/sun/Makefile
make/sun/Makefile
+1
-1
make/sun/beans/Makefile
make/sun/beans/Makefile
+0
-43
src/share/classes/com/sun/beans/editors/BooleanEditor.java
src/share/classes/com/sun/beans/editors/BooleanEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/ByteEditor.java
src/share/classes/com/sun/beans/editors/ByteEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/ColorEditor.java
src/share/classes/com/sun/beans/editors/ColorEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/DoubleEditor.java
src/share/classes/com/sun/beans/editors/DoubleEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/EnumEditor.java
src/share/classes/com/sun/beans/editors/EnumEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/FloatEditor.java
src/share/classes/com/sun/beans/editors/FloatEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/FontEditor.java
src/share/classes/com/sun/beans/editors/FontEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/IntegerEditor.java
src/share/classes/com/sun/beans/editors/IntegerEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/LongEditor.java
src/share/classes/com/sun/beans/editors/LongEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/NumberEditor.java
src/share/classes/com/sun/beans/editors/NumberEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/ShortEditor.java
src/share/classes/com/sun/beans/editors/ShortEditor.java
+2
-2
src/share/classes/com/sun/beans/editors/StringEditor.java
src/share/classes/com/sun/beans/editors/StringEditor.java
+2
-2
src/share/classes/com/sun/beans/finder/BeanInfoFinder.java
src/share/classes/com/sun/beans/finder/BeanInfoFinder.java
+6
-2
src/share/classes/com/sun/beans/finder/ClassFinder.java
src/share/classes/com/sun/beans/finder/ClassFinder.java
+5
-1
src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java
...re/classes/com/sun/beans/finder/PropertyEditorFinder.java
+18
-10
src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java
src/share/classes/com/sun/beans/infos/ComponentBeanInfo.java
+2
-2
test/java/beans/Introspector/4520754/Test4520754.java
test/java/beans/Introspector/4520754/Test4520754.java
+2
-2
test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java
...java/beans/PropertyEditor/6380849/TestPropertyEditor.java
+12
-12
test/java/beans/PropertyEditor/Test6963811.java
test/java/beans/PropertyEditor/Test6963811.java
+2
-2
未找到文件。
make/sun/Makefile
浏览文件 @
e8775990
...
@@ -87,7 +87,7 @@ else
...
@@ -87,7 +87,7 @@ else
endif
endif
SUBDIRS_desktop
=
audio
$(RENDER_SUBDIR)
image
\
SUBDIRS_desktop
=
audio
$(RENDER_SUBDIR)
image
\
$(LWAWT_PRE_SUBDIR)
$(DISPLAY_LIBS)
$(DGA_SUBDIR)
$(LWAWT_SUBDIR)
\
$(LWAWT_PRE_SUBDIR)
$(DISPLAY_LIBS)
$(DGA_SUBDIR)
$(LWAWT_SUBDIR)
\
jawt font jpeg cmm
$(DISPLAY_TOOLS)
beans
jawt font jpeg cmm
$(DISPLAY_TOOLS)
SUBDIRS_management
=
management
SUBDIRS_management
=
management
SUBDIRS_misc
=
$(ORG_SUBDIR)
rmi
$(JDBC_SUBDIR)
tracing
SUBDIRS_misc
=
$(ORG_SUBDIR)
rmi
$(JDBC_SUBDIR)
tracing
SUBDIRS_tools
=
native2ascii serialver tools jconsole
SUBDIRS_tools
=
native2ascii serialver tools jconsole
...
...
make/sun/beans/Makefile
已删除
100644 → 0
浏览文件 @
01b6efab
#
# Copyright (c) 1997, 2005, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# Makefile for building sun.beans.*
#
BUILDDIR
=
../..
PACKAGE
=
sun.beans
PRODUCT
=
sun
include
$(BUILDDIR)/common/Defs.gmk
#
# Files
#
AUTO_FILES_JAVA_DIRS
=
sun/beans
#
# Rules
#
include
$(BUILDDIR)/common/Classes.gmk
src/share/classes/sun/beans/editors/BooleanEditor.java
→
src/share/classes/
com/
sun/beans/editors/BooleanEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2006, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "boolean" type.
* Property editor for a java builtin "boolean" type.
...
...
src/share/classes/sun/beans/editors/ByteEditor.java
→
src/share/classes/
com/
sun/beans/editors/ByteEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "byte" type.
* Property editor for a java builtin "byte" type.
...
...
src/share/classes/sun/beans/editors/ColorEditor.java
→
src/share/classes/
com/
sun/beans/editors/ColorEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
import
java.awt.*
;
import
java.awt.*
;
import
java.beans.*
;
import
java.beans.*
;
...
...
src/share/classes/sun/beans/editors/DoubleEditor.java
→
src/share/classes/
com/
sun/beans/editors/DoubleEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "double" type.
* Property editor for a java builtin "double" type.
...
...
src/share/classes/sun/beans/editors/EnumEditor.java
→
src/share/classes/
com/
sun/beans/editors/EnumEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
* or visit www.oracle.com if you need additional information or have any
* or visit www.oracle.com if you need additional information or have any
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
import
java.awt.Component
;
import
java.awt.Component
;
import
java.awt.Graphics
;
import
java.awt.Graphics
;
...
...
src/share/classes/sun/beans/editors/FloatEditor.java
→
src/share/classes/
com/
sun/beans/editors/FloatEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "float" type.
* Property editor for a java builtin "float" type.
...
...
src/share/classes/sun/beans/editors/FontEditor.java
→
src/share/classes/
com/
sun/beans/editors/FontEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
09
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
import
java.awt.*
;
import
java.awt.*
;
import
java.beans.*
;
import
java.beans.*
;
...
...
src/share/classes/sun/beans/editors/IntegerEditor.java
→
src/share/classes/
com/
sun/beans/editors/IntegerEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2006, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "int" type.
* Property editor for a java builtin "int" type.
...
...
src/share/classes/sun/beans/editors/LongEditor.java
→
src/share/classes/
com/
sun/beans/editors/LongEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "long" type.
* Property editor for a java builtin "long" type.
...
...
src/share/classes/sun/beans/editors/NumberEditor.java
→
src/share/classes/
com/
sun/beans/editors/NumberEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Abstract Property editor for a java builtin number types.
* Abstract Property editor for a java builtin number types.
...
...
src/share/classes/sun/beans/editors/ShortEditor.java
→
src/share/classes/
com/
sun/beans/editors/ShortEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
/**
/**
* Property editor for a java builtin "short" type.
* Property editor for a java builtin "short" type.
...
...
src/share/classes/sun/beans/editors/StringEditor.java
→
src/share/classes/
com/
sun/beans/editors/StringEditor.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
06
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
*/
*/
package
sun.beans.editors
;
package
com.
sun.beans.editors
;
import
java.beans.*
;
import
java.beans.*
;
...
...
src/share/classes/com/sun/beans/finder/BeanInfoFinder.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -42,6 +42,7 @@ public final class BeanInfoFinder
...
@@ -42,6 +42,7 @@ public final class BeanInfoFinder
extends
InstanceFinder
<
BeanInfo
>
{
extends
InstanceFinder
<
BeanInfo
>
{
private
static
final
String
DEFAULT
=
"sun.beans.infos"
;
private
static
final
String
DEFAULT
=
"sun.beans.infos"
;
private
static
final
String
DEFAULT_NEW
=
"com.sun.beans.infos"
;
public
BeanInfoFinder
()
{
public
BeanInfoFinder
()
{
super
(
BeanInfo
.
class
,
true
,
"BeanInfo"
,
DEFAULT
);
super
(
BeanInfo
.
class
,
true
,
"BeanInfo"
,
DEFAULT
);
...
@@ -53,10 +54,13 @@ public final class BeanInfoFinder
...
@@ -53,10 +54,13 @@ public final class BeanInfoFinder
@Override
@Override
protected
BeanInfo
instantiate
(
Class
<?>
type
,
String
prefix
,
String
name
)
{
protected
BeanInfo
instantiate
(
Class
<?>
type
,
String
prefix
,
String
name
)
{
if
(
DEFAULT
.
equals
(
prefix
))
{
prefix
=
DEFAULT_NEW
;
}
// this optimization will only use the BeanInfo search path
// this optimization will only use the BeanInfo search path
// if is has changed from the original
// if is has changed from the original
// or trying to get the ComponentBeanInfo
// or trying to get the ComponentBeanInfo
BeanInfo
info
=
!
DEFAULT
.
equals
(
prefix
)
||
"ComponentBeanInfo"
.
equals
(
name
)
BeanInfo
info
=
!
DEFAULT
_NEW
.
equals
(
prefix
)
||
"ComponentBeanInfo"
.
equals
(
name
)
?
super
.
instantiate
(
type
,
prefix
,
name
)
?
super
.
instantiate
(
type
,
prefix
,
name
)
:
null
;
:
null
;
...
...
src/share/classes/com/sun/beans/finder/ClassFinder.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2006, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
*/
*/
package
com.sun.beans.finder
;
package
com.sun.beans.finder
;
import
static
sun
.
reflect
.
misc
.
ReflectUtil
.
checkPackageAccess
;
/**
/**
* This is utility class that provides {@code static} methods
* This is utility class that provides {@code static} methods
* to find a class with the specified name using the specified class loader.
* to find a class with the specified name using the specified class loader.
...
@@ -54,6 +56,7 @@ public final class ClassFinder {
...
@@ -54,6 +56,7 @@ public final class ClassFinder {
* @see Thread#getContextClassLoader()
* @see Thread#getContextClassLoader()
*/
*/
public
static
Class
<?>
findClass
(
String
name
)
throws
ClassNotFoundException
{
public
static
Class
<?>
findClass
(
String
name
)
throws
ClassNotFoundException
{
checkPackageAccess
(
name
);
try
{
try
{
ClassLoader
loader
=
Thread
.
currentThread
().
getContextClassLoader
();
ClassLoader
loader
=
Thread
.
currentThread
().
getContextClassLoader
();
if
(
loader
==
null
)
{
if
(
loader
==
null
)
{
...
@@ -94,6 +97,7 @@ public final class ClassFinder {
...
@@ -94,6 +97,7 @@ public final class ClassFinder {
* @see Class#forName(String,boolean,ClassLoader)
* @see Class#forName(String,boolean,ClassLoader)
*/
*/
public
static
Class
<?>
findClass
(
String
name
,
ClassLoader
loader
)
throws
ClassNotFoundException
{
public
static
Class
<?>
findClass
(
String
name
,
ClassLoader
loader
)
throws
ClassNotFoundException
{
checkPackageAccess
(
name
);
if
(
loader
!=
null
)
{
if
(
loader
!=
null
)
{
try
{
try
{
return
Class
.
forName
(
name
,
false
,
loader
);
return
Class
.
forName
(
name
,
false
,
loader
);
...
...
src/share/classes/com/sun/beans/finder/PropertyEditorFinder.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2009, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -28,14 +28,14 @@ import com.sun.beans.WeakCache;
...
@@ -28,14 +28,14 @@ import com.sun.beans.WeakCache;
import
java.beans.PropertyEditor
;
import
java.beans.PropertyEditor
;
import
sun.beans.editors.BooleanEditor
;
import
com.
sun.beans.editors.BooleanEditor
;
import
sun.beans.editors.ByteEditor
;
import
com.
sun.beans.editors.ByteEditor
;
import
sun.beans.editors.DoubleEditor
;
import
com.
sun.beans.editors.DoubleEditor
;
import
sun.beans.editors.EnumEditor
;
import
com.
sun.beans.editors.EnumEditor
;
import
sun.beans.editors.FloatEditor
;
import
com.
sun.beans.editors.FloatEditor
;
import
sun.beans.editors.IntegerEditor
;
import
com.
sun.beans.editors.IntegerEditor
;
import
sun.beans.editors.LongEditor
;
import
com.
sun.beans.editors.LongEditor
;
import
sun.beans.editors.ShortEditor
;
import
com.
sun.beans.editors.ShortEditor
;
/**
/**
* This is utility class that provides functionality
* This is utility class that provides functionality
...
@@ -48,10 +48,13 @@ import sun.beans.editors.ShortEditor;
...
@@ -48,10 +48,13 @@ import sun.beans.editors.ShortEditor;
public
final
class
PropertyEditorFinder
public
final
class
PropertyEditorFinder
extends
InstanceFinder
<
PropertyEditor
>
{
extends
InstanceFinder
<
PropertyEditor
>
{
private
static
final
String
DEFAULT
=
"sun.beans.editors"
;
private
static
final
String
DEFAULT_NEW
=
"com.sun.beans.editors"
;
private
final
WeakCache
<
Class
<?>,
Class
<?>>
registry
;
private
final
WeakCache
<
Class
<?>,
Class
<?>>
registry
;
public
PropertyEditorFinder
()
{
public
PropertyEditorFinder
()
{
super
(
PropertyEditor
.
class
,
false
,
"Editor"
,
"sun.beans.editors"
);
super
(
PropertyEditor
.
class
,
false
,
"Editor"
,
DEFAULT
);
this
.
registry
=
new
WeakCache
<
Class
<?>,
Class
<?>>();
this
.
registry
=
new
WeakCache
<
Class
<?>,
Class
<?>>();
this
.
registry
.
put
(
Byte
.
TYPE
,
ByteEditor
.
class
);
this
.
registry
.
put
(
Byte
.
TYPE
,
ByteEditor
.
class
);
...
@@ -84,4 +87,9 @@ public final class PropertyEditorFinder
...
@@ -84,4 +87,9 @@ public final class PropertyEditorFinder
}
}
return
editor
;
return
editor
;
}
}
@Override
protected
PropertyEditor
instantiate
(
Class
<?>
type
,
String
prefix
,
String
name
)
{
return
super
.
instantiate
(
type
,
DEFAULT
.
equals
(
prefix
)
?
DEFAULT_NEW
:
prefix
,
name
);
}
}
}
src/share/classes/sun/beans/infos/ComponentBeanInfo.java
→
src/share/classes/
com/
sun/beans/infos/ComponentBeanInfo.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 1996, 20
0
2, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
1
2, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
* questions.
* questions.
*/
*/
package
sun.beans.infos
;
package
com.
sun.beans.infos
;
import
java.beans.*
;
import
java.beans.*
;
...
...
test/java/beans/Introspector/4520754/Test4520754.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2002, 20
07
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
12
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -58,7 +58,7 @@ public class Test4520754 {
...
@@ -58,7 +58,7 @@ public class Test4520754 {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
// ensure that 4168475 does not regress
// ensure that 4168475 does not regress
test4168475
(
Component
.
class
);
test4168475
(
Component
.
class
);
// AWT classes (sun.beans.infos.ComponentBeanInfo)
// AWT classes (
com.
sun.beans.infos.ComponentBeanInfo)
test
(
null
,
Button
.
class
,
Component
.
class
,
List
.
class
,
Menu
.
class
,
Panel
.
class
);
test
(
null
,
Button
.
class
,
Component
.
class
,
List
.
class
,
Menu
.
class
,
Panel
.
class
);
// Swing classes (dt.jar)
// Swing classes (dt.jar)
test
(
null
,
JApplet
.
class
,
JButton
.
class
,
JCheckBox
.
class
);
test
(
null
,
JApplet
.
class
,
JButton
.
class
,
JCheckBox
.
class
);
...
...
test/java/beans/PropertyEditor/6380849/TestPropertyEditor.java
浏览文件 @
e8775990
/**
/**
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -36,17 +36,17 @@ import java.awt.Font;
...
@@ -36,17 +36,17 @@ import java.awt.Font;
import
java.beans.PropertyEditor
;
import
java.beans.PropertyEditor
;
import
java.beans.PropertyEditorManager
;
import
java.beans.PropertyEditorManager
;
import
sun.beans.editors.BooleanEditor
;
import
com.
sun.beans.editors.BooleanEditor
;
import
sun.beans.editors.ByteEditor
;
import
com.
sun.beans.editors.ByteEditor
;
import
sun.beans.editors.ColorEditor
;
import
com.
sun.beans.editors.ColorEditor
;
import
sun.beans.editors.DoubleEditor
;
import
com.
sun.beans.editors.DoubleEditor
;
import
sun.beans.editors.EnumEditor
;
import
com.
sun.beans.editors.EnumEditor
;
import
sun.beans.editors.FloatEditor
;
import
com.
sun.beans.editors.FloatEditor
;
import
sun.beans.editors.FontEditor
;
import
com.
sun.beans.editors.FontEditor
;
import
sun.beans.editors.IntegerEditor
;
import
com.
sun.beans.editors.IntegerEditor
;
import
sun.beans.editors.LongEditor
;
import
com.
sun.beans.editors.LongEditor
;
import
sun.beans.editors.ShortEditor
;
import
com.
sun.beans.editors.ShortEditor
;
import
sun.beans.editors.StringEditor
;
import
com.
sun.beans.editors.StringEditor
;
public
class
TestPropertyEditor
implements
Runnable
{
public
class
TestPropertyEditor
implements
Runnable
{
...
...
test/java/beans/PropertyEditor/Test6963811.java
浏览文件 @
e8775990
/*
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
*/
*/
import
java.beans.PropertyEditorManager
;
import
java.beans.PropertyEditorManager
;
import
sun.beans.editors.StringEditor
;
import
com.
sun.beans.editors.StringEditor
;
public
class
Test6963811
implements
Runnable
{
public
class
Test6963811
implements
Runnable
{
private
final
long
time
;
private
final
long
time
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录