Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
3f9f9e12
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看板
提交
3f9f9e12
编写于
6月 11, 2014
作者:
M
mullan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8038913: Bolster XML support
Reviewed-by: xuelei, skoivu
上级
6d08fc56
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
142 addition
and
41 deletion
+142
-41
src/share/classes/com/sun/org/apache/xml/internal/security/Init.java
...lasses/com/sun/org/apache/xml/internal/security/Init.java
+47
-37
src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
...rg/apache/xml/internal/security/algorithms/JCEMapper.java
+7
-0
src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
.../xml/internal/security/algorithms/SignatureAlgorithm.java
+10
-3
src/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
.../org/apache/xml/internal/security/c14n/Canonicalizer.java
+8
-1
src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
...e/xml/internal/security/keys/keyresolver/KeyResolver.java
+13
-0
src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java
...rg/apache/xml/internal/security/transforms/Transform.java
+7
-0
src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
.../org/apache/xml/internal/security/utils/ElementProxy.java
+3
-0
src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
...sun/org/apache/xml/internal/security/utils/JavaUtils.java
+22
-0
src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
.../sun/org/apache/xml/internal/security/utils/XMLUtils.java
+12
-0
src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java
...ml/internal/security/utils/resolver/ResourceResolver.java
+13
-0
未找到文件。
src/share/classes/com/sun/org/apache/xml/internal/security/Init.java
浏览文件 @
3f9f9e12
...
...
@@ -25,6 +25,8 @@ package com.sun.org.apache.xml.internal.security;
import
java.io.InputStream
;
import
java.security.AccessController
;
import
java.security.PrivilegedAction
;
import
java.security.PrivilegedActionException
;
import
java.security.PrivilegedExceptionAction
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -35,6 +37,7 @@ import javax.xml.parsers.DocumentBuilderFactory;
import
com.sun.org.apache.xml.internal.security.algorithms.JCEMapper
;
import
com.sun.org.apache.xml.internal.security.algorithms.SignatureAlgorithm
;
import
com.sun.org.apache.xml.internal.security.c14n.Canonicalizer
;
import
com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException
;
import
com.sun.org.apache.xml.internal.security.keys.keyresolver.KeyResolver
;
import
com.sun.org.apache.xml.internal.security.transforms.Transform
;
import
com.sun.org.apache.xml.internal.security.utils.ElementProxy
;
...
...
@@ -118,43 +121,50 @@ public class Init {
log
.
log
(
java
.
util
.
logging
.
Level
.
FINE
,
"Registering default algorithms"
);
}
try
{
//
// Bind the default prefixes
//
ElementProxy
.
registerDefaultPrefixes
();
//
// Set the default Transforms
//
Transform
.
registerDefaultAlgorithms
();
//
// Set the default signature algorithms
//
SignatureAlgorithm
.
registerDefaultAlgorithms
();
//
// Set the default JCE algorithms
//
JCEMapper
.
registerDefaultAlgorithms
();
//
// Set the default c14n algorithms
//
Canonicalizer
.
registerDefaultAlgorithms
();
//
// Register the default resolvers
//
ResourceResolver
.
registerDefaultResolvers
();
//
// Register the default key resolvers
//
KeyResolver
.
registerDefaultResolvers
();
}
catch
(
Exception
ex
)
{
log
.
log
(
java
.
util
.
logging
.
Level
.
SEVERE
,
ex
.
getMessage
(),
ex
);
ex
.
printStackTrace
();
AccessController
.
doPrivileged
(
new
PrivilegedExceptionAction
<
Void
>(){
@Override
public
Void
run
()
throws
XMLSecurityException
{
//
// Bind the default prefixes
//
ElementProxy
.
registerDefaultPrefixes
();
//
// Set the default Transforms
//
Transform
.
registerDefaultAlgorithms
();
//
// Set the default signature algorithms
//
SignatureAlgorithm
.
registerDefaultAlgorithms
();
//
// Set the default JCE algorithms
//
JCEMapper
.
registerDefaultAlgorithms
();
//
// Set the default c14n algorithms
//
Canonicalizer
.
registerDefaultAlgorithms
();
//
// Register the default resolvers
//
ResourceResolver
.
registerDefaultResolvers
();
//
// Register the default key resolvers
//
KeyResolver
.
registerDefaultResolvers
();
return
null
;
}
});
}
catch
(
PrivilegedActionException
ex
)
{
XMLSecurityException
xse
=
(
XMLSecurityException
)
ex
.
getException
();
log
.
log
(
java
.
util
.
logging
.
Level
.
SEVERE
,
xse
.
getMessage
(),
xse
);
xse
.
printStackTrace
();
}
}
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/JCEMapper.java
浏览文件 @
3f9f9e12
...
...
@@ -27,6 +27,7 @@ import java.util.concurrent.ConcurrentHashMap;
import
com.sun.org.apache.xml.internal.security.encryption.XMLCipher
;
import
com.sun.org.apache.xml.internal.security.signature.XMLSignature
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
org.w3c.dom.Element
;
...
...
@@ -49,8 +50,11 @@ public class JCEMapper {
*
* @param id
* @param algorithm
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the JCE algorithm
*/
public
static
void
register
(
String
id
,
Algorithm
algorithm
)
{
JavaUtils
.
checkRegisterPermission
();
algorithmsMap
.
put
(
id
,
algorithm
);
}
...
...
@@ -292,8 +296,11 @@ public class JCEMapper {
/**
* Sets the default Provider for obtaining the security algorithms
* @param provider the default providerId.
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the JCE provider
*/
public
static
void
setProviderId
(
String
provider
)
{
JavaUtils
.
checkRegisterPermission
();
providerName
=
provider
;
}
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/algorithms/SignatureAlgorithm.java
浏览文件 @
3f9f9e12
...
...
@@ -37,6 +37,7 @@ import com.sun.org.apache.xml.internal.security.exceptions.XMLSecurityException;
import
com.sun.org.apache.xml.internal.security.signature.XMLSignature
;
import
com.sun.org.apache.xml.internal.security.signature.XMLSignatureException
;
import
com.sun.org.apache.xml.internal.security.utils.Constants
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
org.w3c.dom.Attr
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Element
;
...
...
@@ -314,18 +315,21 @@ public class SignatureAlgorithm extends Algorithm {
}
/**
* Registers implementing class of the
Transform a
lgorithm with algorithmURI
* Registers implementing class of the
SignatureA
lgorithm with algorithmURI
*
* @param algorithmURI algorithmURI URI representation of <code>
Transform a
lgorithm</code>.
* @param algorithmURI algorithmURI URI representation of <code>
SignatureA
lgorithm</code>.
* @param implementingClass <code>implementingClass</code> the implementing class of
* {@link SignatureAlgorithmSpi}
* @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered
* @throws XMLSignatureException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the signature algorithm
*/
@SuppressWarnings
(
"unchecked"
)
public
static
void
register
(
String
algorithmURI
,
String
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
,
ClassNotFoundException
,
XMLSignatureException
{
JavaUtils
.
checkRegisterPermission
();
if
(
log
.
isLoggable
(
java
.
util
.
logging
.
Level
.
FINE
))
{
log
.
log
(
java
.
util
.
logging
.
Level
.
FINE
,
"Try to register "
+
algorithmURI
+
" "
+
implementingClass
);
}
...
...
@@ -352,15 +356,18 @@ public class SignatureAlgorithm extends Algorithm {
/**
* Registers implementing class of the Transform algorithm with algorithmURI
*
* @param algorithmURI algorithmURI URI representation of <code>
Transform a
lgorithm</code>.
* @param algorithmURI algorithmURI URI representation of <code>
SignatureA
lgorithm</code>.
* @param implementingClass <code>implementingClass</code> the implementing class of
* {@link SignatureAlgorithmSpi}
* @throws AlgorithmAlreadyRegisteredException if specified algorithmURI is already registered
* @throws XMLSignatureException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the signature algorithm
*/
public
static
void
register
(
String
algorithmURI
,
Class
<?
extends
SignatureAlgorithmSpi
>
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
,
ClassNotFoundException
,
XMLSignatureException
{
JavaUtils
.
checkRegisterPermission
();
if
(
log
.
isLoggable
(
java
.
util
.
logging
.
Level
.
FINE
))
{
log
.
log
(
java
.
util
.
logging
.
Level
.
FINE
,
"Try to register "
+
algorithmURI
+
" "
+
implementingClass
);
}
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/c14n/Canonicalizer.java
浏览文件 @
3f9f9e12
...
...
@@ -41,6 +41,7 @@ import com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicaliz
import
com.sun.org.apache.xml.internal.security.c14n.implementations.Canonicalizer20010315WithComments
;
import
com.sun.org.apache.xml.internal.security.c14n.implementations.CanonicalizerPhysical
;
import
com.sun.org.apache.xml.internal.security.exceptions.AlgorithmAlreadyRegisteredException
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Node
;
import
org.w3c.dom.NodeList
;
...
...
@@ -142,10 +143,13 @@ public class Canonicalizer {
* @param algorithmURI
* @param implementingClass
* @throws AlgorithmAlreadyRegisteredException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the canonicalizer
*/
@SuppressWarnings
(
"unchecked"
)
public
static
void
register
(
String
algorithmURI
,
String
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
,
ClassNotFoundException
{
JavaUtils
.
checkRegisterPermission
();
// check whether URI is already registered
Class
<?
extends
CanonicalizerSpi
>
registeredClass
=
canonicalizerHash
.
get
(
algorithmURI
);
...
...
@@ -166,9 +170,12 @@ public class Canonicalizer {
* @param algorithmURI
* @param implementingClass
* @throws AlgorithmAlreadyRegisteredException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the canonicalizer
*/
public
static
void
register
(
String
algorithmURI
,
Class
<
CanonicalizerSpi
>
implementingClass
)
public
static
void
register
(
String
algorithmURI
,
Class
<
?
extends
CanonicalizerSpi
>
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
,
ClassNotFoundException
{
JavaUtils
.
checkRegisterPermission
();
// check whether URI is already registered
Class
<?
extends
CanonicalizerSpi
>
registeredClass
=
canonicalizerHash
.
get
(
algorithmURI
);
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/keys/keyresolver/KeyResolver.java
浏览文件 @
3f9f9e12
...
...
@@ -42,6 +42,7 @@ import com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations
import
com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SKIResolver
;
import
com.sun.org.apache.xml.internal.security.keys.keyresolver.implementations.X509SubjectNameResolver
;
import
com.sun.org.apache.xml.internal.security.keys.storage.StorageResolver
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
org.w3c.dom.Element
;
import
org.w3c.dom.Node
;
...
...
@@ -175,9 +176,12 @@ public class KeyResolver {
* @throws InstantiationException
* @throws IllegalAccessException
* @throws ClassNotFoundException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the key resolver
*/
public
static
void
register
(
String
className
,
boolean
globalResolver
)
throws
ClassNotFoundException
,
IllegalAccessException
,
InstantiationException
{
JavaUtils
.
checkRegisterPermission
();
KeyResolverSpi
keyResolverSpi
=
(
KeyResolverSpi
)
Class
.
forName
(
className
).
newInstance
();
keyResolverSpi
.
setGlobalResolver
(
globalResolver
);
...
...
@@ -195,8 +199,11 @@ public class KeyResolver {
*
* @param className
* @param globalResolver Whether the KeyResolverSpi is a global resolver or not
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the key resolver
*/
public
static
void
registerAtStart
(
String
className
,
boolean
globalResolver
)
{
JavaUtils
.
checkRegisterPermission
();
KeyResolverSpi
keyResolverSpi
=
null
;
Exception
ex
=
null
;
try
{
...
...
@@ -228,11 +235,14 @@ public class KeyResolver {
*
* @param keyResolverSpi a KeyResolverSpi instance to register
* @param start whether to register the KeyResolverSpi at the start of the list or not
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the key resolver
*/
public
static
void
register
(
KeyResolverSpi
keyResolverSpi
,
boolean
start
)
{
JavaUtils
.
checkRegisterPermission
();
KeyResolver
resolver
=
new
KeyResolver
(
keyResolverSpi
);
if
(
start
)
{
resolverVector
.
add
(
0
,
resolver
);
...
...
@@ -254,9 +264,12 @@ public class KeyResolver {
* @throws InstantiationException
* @throws IllegalAccessException
* @throws ClassNotFoundException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the key resolver
*/
public
static
void
registerClassNames
(
List
<
String
>
classNames
)
throws
ClassNotFoundException
,
IllegalAccessException
,
InstantiationException
{
JavaUtils
.
checkRegisterPermission
();
List
<
KeyResolver
>
keyResolverList
=
new
ArrayList
<
KeyResolver
>(
classNames
.
size
());
for
(
String
className
:
classNames
)
{
KeyResolverSpi
keyResolverSpi
=
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/transforms/Transform.java
浏览文件 @
3f9f9e12
...
...
@@ -46,6 +46,7 @@ import com.sun.org.apache.xml.internal.security.transforms.implementations.Trans
import
com.sun.org.apache.xml.internal.security.transforms.implementations.TransformXSLT
;
import
com.sun.org.apache.xml.internal.security.utils.Constants
;
import
com.sun.org.apache.xml.internal.security.utils.HelperNodeList
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
com.sun.org.apache.xml.internal.security.utils.SignatureElementProxy
;
import
com.sun.org.apache.xml.internal.security.utils.XMLUtils
;
import
org.w3c.dom.Document
;
...
...
@@ -181,11 +182,14 @@ public final class Transform extends SignatureElementProxy {
* class of {@link TransformSpi}
* @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
* is already registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the transform
*/
@SuppressWarnings
(
"unchecked"
)
public
static
void
register
(
String
algorithmURI
,
String
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
,
ClassNotFoundException
,
InvalidTransformException
{
JavaUtils
.
checkRegisterPermission
();
// are we already registered?
Class
<?
extends
TransformSpi
>
transformSpi
=
transformSpiHash
.
get
(
algorithmURI
);
if
(
transformSpi
!=
null
)
{
...
...
@@ -206,9 +210,12 @@ public final class Transform extends SignatureElementProxy {
* class of {@link TransformSpi}
* @throws AlgorithmAlreadyRegisteredException if specified algorithmURI
* is already registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register the transform
*/
public
static
void
register
(
String
algorithmURI
,
Class
<?
extends
TransformSpi
>
implementingClass
)
throws
AlgorithmAlreadyRegisteredException
{
JavaUtils
.
checkRegisterPermission
();
// are we already registered?
Class
<?
extends
TransformSpi
>
transformSpi
=
transformSpiHash
.
get
(
algorithmURI
);
if
(
transformSpi
!=
null
)
{
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/utils/ElementProxy.java
浏览文件 @
3f9f9e12
...
...
@@ -468,9 +468,12 @@ public abstract class ElementProxy {
* @param namespace
* @param prefix
* @throws XMLSecurityException
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the default prefix
*/
public
static
void
setDefaultPrefix
(
String
namespace
,
String
prefix
)
throws
XMLSecurityException
{
JavaUtils
.
checkRegisterPermission
();
if
(
prefixMappings
.
containsValue
(
prefix
))
{
String
storedPrefix
=
prefixMappings
.
get
(
namespace
);
if
(!
storedPrefix
.
equals
(
prefix
))
{
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/utils/JavaUtils.java
浏览文件 @
3f9f9e12
...
...
@@ -28,6 +28,7 @@ import java.io.FileNotFoundException;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.security.SecurityPermission
;
/**
* A collection of different, general-purpose methods for JAVA-specific things
...
...
@@ -39,6 +40,10 @@ public class JavaUtils {
private
static
java
.
util
.
logging
.
Logger
log
=
java
.
util
.
logging
.
Logger
.
getLogger
(
JavaUtils
.
class
.
getName
());
private
static
final
SecurityPermission
REGISTER_PERMISSION
=
new
SecurityPermission
(
"com.sun.org.apache.xml.internal.security.register"
);
private
JavaUtils
()
{
// we don't allow instantiation
}
...
...
@@ -145,4 +150,21 @@ public class JavaUtils {
return
retBytes
;
}
/**
* Throws a {@code SecurityException} if a security manager is installed
* and the caller is not allowed to register an implementation of an
* algorithm, transform, or other security sensitive XML Signature function.
*
* @throws SecurityException if a security manager is installed and the
* caller has not been granted the
* {@literal "com.sun.org.apache.xml.internal.security.register"}
* {@code SecurityPermission}
*/
public
static
void
checkRegisterPermission
()
{
SecurityManager
sm
=
System
.
getSecurityManager
();
if
(
sm
!=
null
)
{
sm
.
checkPermission
(
REGISTER_PERMISSION
);
}
}
}
src/share/classes/com/sun/org/apache/xml/internal/security/utils/XMLUtils.java
浏览文件 @
3f9f9e12
...
...
@@ -80,32 +80,44 @@ public class XMLUtils {
/**
* Set the prefix for the digital signature namespace
* @param prefix the new prefix for the digital signature namespace
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the prefix
*/
public
static
void
setDsPrefix
(
String
prefix
)
{
JavaUtils
.
checkRegisterPermission
();
dsPrefix
=
prefix
;
}
/**
* Set the prefix for the digital signature 1.1 namespace
* @param prefix the new prefix for the digital signature 1.1 namespace
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the prefix
*/
public
static
void
setDs11Prefix
(
String
prefix
)
{
JavaUtils
.
checkRegisterPermission
();
ds11Prefix
=
prefix
;
}
/**
* Set the prefix for the encryption namespace
* @param prefix the new prefix for the encryption namespace
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the prefix
*/
public
static
void
setXencPrefix
(
String
prefix
)
{
JavaUtils
.
checkRegisterPermission
();
xencPrefix
=
prefix
;
}
/**
* Set the prefix for the encryption namespace 1.1
* @param prefix the new prefix for the encryption namespace 1.1
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to set the prefix
*/
public
static
void
setXenc11Prefix
(
String
prefix
)
{
JavaUtils
.
checkRegisterPermission
();
xenc11Prefix
=
prefix
;
}
...
...
src/share/classes/com/sun/org/apache/xml/internal/security/utils/resolver/ResourceResolver.java
浏览文件 @
3f9f9e12
...
...
@@ -27,6 +27,7 @@ import java.util.List;
import
java.util.Map
;
import
com.sun.org.apache.xml.internal.security.signature.XMLSignatureInput
;
import
com.sun.org.apache.xml.internal.security.utils.JavaUtils
;
import
com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverDirectHTTP
;
import
com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverFragment
;
import
com.sun.org.apache.xml.internal.security.utils.resolver.implementations.ResolverLocalFilesystem
;
...
...
@@ -199,9 +200,12 @@ public class ResourceResolver {
* the class cannot be registered.
*
* @param className the name of the ResourceResolverSpi class to be registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register a resource resolver
*/
@SuppressWarnings
(
"unchecked"
)
public
static
void
register
(
String
className
)
{
JavaUtils
.
checkRegisterPermission
();
try
{
Class
<
ResourceResolverSpi
>
resourceResolverClass
=
(
Class
<
ResourceResolverSpi
>)
Class
.
forName
(
className
);
...
...
@@ -216,9 +220,12 @@ public class ResourceResolver {
* list. This method logs a warning if the class cannot be registered.
*
* @param className the name of the ResourceResolverSpi class to be registered
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register a resource resolver
*/
@SuppressWarnings
(
"unchecked"
)
public
static
void
registerAtStart
(
String
className
)
{
JavaUtils
.
checkRegisterPermission
();
try
{
Class
<
ResourceResolverSpi
>
resourceResolverClass
=
(
Class
<
ResourceResolverSpi
>)
Class
.
forName
(
className
);
...
...
@@ -233,8 +240,11 @@ public class ResourceResolver {
* cannot be registered.
* @param className
* @param start
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register a resource resolver
*/
public
static
void
register
(
Class
<?
extends
ResourceResolverSpi
>
className
,
boolean
start
)
{
JavaUtils
.
checkRegisterPermission
();
try
{
ResourceResolverSpi
resourceResolverSpi
=
className
.
newInstance
();
register
(
resourceResolverSpi
,
start
);
...
...
@@ -250,8 +260,11 @@ public class ResourceResolver {
* cannot be registered.
* @param resourceResolverSpi
* @param start
* @throws SecurityException if a security manager is installed and the
* caller does not have permission to register a resource resolver
*/
public
static
void
register
(
ResourceResolverSpi
resourceResolverSpi
,
boolean
start
)
{
JavaUtils
.
checkRegisterPermission
();
synchronized
(
resolverList
)
{
if
(
start
)
{
resolverList
.
add
(
0
,
new
ResourceResolver
(
resourceResolverSpi
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录