本文整理了Java中java.lang.SecurityManager.checkSetFactory()
方法的一些代码示例,展示了SecurityManager.checkSetFactory()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SecurityManager.checkSetFactory()
方法的具体详情如下:
包路径:java.lang.SecurityManager
类名称:SecurityManager
方法名:checkSetFactory
暂无
代码示例来源:origin: wildfly/wildfly
public void checkSetFactory() {
if (doCheck()) {
super.checkSetFactory();
}
}
代码示例来源:origin: frohoff/ysoserial
@Override
public void checkSetFactory() {
getSecurityManager().checkSetFactory();
}
代码示例来源:origin: javax.activation/activation
/**
* Set the default CommandMap. Reset the CommandMap to the default by
* calling this method with <code>null</code>.
*
* @param commandMap The new default CommandMap.
* @exception SecurityException if the caller doesn't have permission
* to change the default
*/
public static void setDefaultCommandMap(CommandMap commandMap) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
// if it's ok with the SecurityManager, it's ok with me...
security.checkSetFactory();
} catch (SecurityException ex) {
// otherwise, we also allow it if this code and the
// factory come from the same class loader (e.g.,
// the JAF classes were loaded with the applet classes).
if (CommandMap.class.getClassLoader() !=
commandMap.getClass().getClassLoader())
throw ex;
}
}
defaultCommandMap = commandMap;
}
代码示例来源:origin: javax.activation/activation
/**
* Sets the default FileTypeMap for the system. This instance
* will be returned to callers of getDefaultFileTypeMap.
*
* @param map The FileTypeMap.
* @exception SecurityException if the caller doesn't have permission
* to change the default
*/
public static void setDefaultFileTypeMap(FileTypeMap map) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
// if it's ok with the SecurityManager, it's ok with me...
security.checkSetFactory();
} catch (SecurityException ex) {
// otherwise, we also allow it if this code and the
// factory come from the same class loader (e.g.,
// the JAF classes were loaded with the applet classes).
if (FileTypeMap.class.getClassLoader() !=
map.getClass().getClassLoader())
throw ex;
}
}
defaultMap = map;
}
代码示例来源:origin: neo4j/neo4j
@Override
public void checkSetFactory()
{
if ( managerExists() )
{
securityManager.checkSetFactory();
}
else
{
super.checkSetFactory();
}
}
代码示例来源:origin: javax.activation/activation
try {
security.checkSetFactory();
} catch (SecurityException ex) {
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Set the default CommandMap. Reset the CommandMap to the default by
* calling this method with <code>null</code>.
*
* @param commandMap The new default CommandMap.
* @exception SecurityException if the caller doesn't have permission
* to change the default
*/
public static void setDefaultCommandMap(CommandMap commandMap) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
// if it's ok with the SecurityManager, it's ok with me...
security.checkSetFactory();
} catch (SecurityException ex) {
// otherwise, we also allow it if this code and the
// factory come from the same class loader (e.g.,
// the JAF classes were loaded with the applet classes).
if (CommandMap.class.getClassLoader() !=
commandMap.getClass().getClassLoader())
throw ex;
}
}
defaultCommandMap = commandMap;
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Sets the default FileTypeMap for the system. This instance
* will be returned to callers of getDefaultFileTypeMap.
*
* @param map The FileTypeMap.
* @exception SecurityException if the caller doesn't have permission
* to change the default
*/
public static void setDefaultFileTypeMap(FileTypeMap map) {
SecurityManager security = System.getSecurityManager();
if (security != null) {
try {
// if it's ok with the SecurityManager, it's ok with me...
security.checkSetFactory();
} catch (SecurityException ex) {
// otherwise, we also allow it if this code and the
// factory come from the same class loader (e.g.,
// the JAF classes were loaded with the applet classes).
if (FileTypeMap.class.getClassLoader() !=
map.getClass().getClassLoader())
throw ex;
}
}
defaultMap = map;
}
代码示例来源:origin: camunda/camunda-bpm-platform
try {
security.checkSetFactory();
} catch (SecurityException ex) {
代码示例来源:origin: camunda/camunda-bpm-platform
SecurityManager security = System.getSecurityManager();
if (security != null)
security.checkSetFactory();
defaultSession = new Session(props, authenticator);
} else {
代码示例来源:origin: com.sun.mail/javax.mail
SecurityManager security = System.getSecurityManager();
if (security != null)
security.checkSetFactory();
defaultSession = new Session(props, authenticator);
} else {
代码示例来源:origin: com.github.stefanbirkner/system-rules
@Override
public void checkSetFactory() {
if (originalSecurityManager != null)
originalSecurityManager.checkSetFactory();
}
代码示例来源:origin: org.fitnesse/fitnesse
@Override
public void checkSetFactory() {
if (delegate != null) {
delegate.checkSetFactory();
}
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-activation_1.1_spec
/**
* Sets the default FileTypeMap for the system.
* @param fileMap the new default FileTypeMap
* @throws SecurityException if the caller does not have "SetFactory" RuntimePermission
*/
public static void setDefaultFileTypeMap(FileTypeMap fileMap) {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkSetFactory();
}
defaultFileTypeMap = fileMap;
}
代码示例来源:origin: rythmengine/rythmengine
@Override
public void checkSetFactory() {
checkRythm();
if (null != osm) osm.checkSetFactory();
if (null != csm) csm.checkSetFactory();
}
}
代码示例来源:origin: org.rythmengine/rythm-engine
@Override
public void checkSetFactory() {
checkRythm();
if (null != osm) osm.checkSetFactory();
if (null != csm) csm.checkSetFactory();
}
}
代码示例来源:origin: freeplane/freeplane
@Override
public void checkSetFactory() {
try{
super.checkSetFactory();
}
catch(AccessControlException e){
throw getException(e, InternationalizedSecurityManager.PERM_GROUP_NETWORK, InternationalizedSecurityManager.PERM_SetFactory);
}
}
代码示例来源:origin: org.wildfly.security/wildfly-security-manager
public void checkSetFactory() {
if (doCheck()) {
super.checkSetFactory();
}
}
代码示例来源:origin: net.sf.jstuff/jstuff-core
@Override
public void checkSetFactory() {
if (wrapped == null) {
super.checkSetFactory();
} else {
wrapped.checkSetFactory();
}
}
代码示例来源:origin: org.wildfly.security/wildfly-elytron-security-manager
public void checkSetFactory() {
if (doCheck()) {
super.checkSetFactory();
}
}
内容来源于网络,如有侵权,请联系作者删除!