java.lang.SecurityManager.checkPropertyAccess()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(166)

本文整理了Java中java.lang.SecurityManager.checkPropertyAccess()方法的一些代码示例,展示了SecurityManager.checkPropertyAccess()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SecurityManager.checkPropertyAccess()方法的具体详情如下:
包路径:java.lang.SecurityManager
类名称:SecurityManager
方法名:checkPropertyAccess

SecurityManager.checkPropertyAccess介绍

暂无

代码示例

代码示例来源:origin: frohoff/ysoserial

@Override
public void checkPropertyAccess(String key) {
  getSecurityManager().checkPropertyAccess(key);
}

代码示例来源:origin: neo4j/neo4j

@Override
public void checkPropertyAccess( String key )
{
  if ( managerExists() )
  {
    securityManager.checkPropertyAccess( key );
  }
  else
  {
    super.checkPropertyAccess( key );
  }
}

代码示例来源:origin: wildfly/wildfly

super.checkPropertyAccess(key);
return;
super.checkPropertyAccess(key);
return;
super.checkPropertyAccess(key);
return;

代码示例来源:origin: org.elasticsearch/elasticsearch

/**
 * Returns a read-only view of all system properties
 */
public static Dictionary<Object,Object> getSystemProperties() {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
    sm.checkPropertyAccess("*");
  }
  return SYSTEM_PROPERTIES;
}

代码示例来源:origin: org.elasticsearch/elasticsearch

public static JvmInfo jvmInfo() {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(new ManagementPermission("monitor"));
    sm.checkPropertyAccess("*");
  }
  return INSTANCE;
}

代码示例来源:origin: stefanbirkner/system-rules

@Override
public void checkPropertyAccess(String key) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkPropertyAccess(key);
}

代码示例来源:origin: com.github.stefanbirkner/system-rules

@Override
public void checkPropertyAccess(String key) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkPropertyAccess(key);
}

代码示例来源:origin: org.fitnesse/fitnesse

@Override
public void checkPropertyAccess(String key) {
 if (delegate != null) {
  delegate.checkPropertyAccess(key);
 }
}

代码示例来源:origin: com.github.tcnh/fitnesse

@Override
public void checkPropertyAccess(String key) {
 if (delegate != null) {
  delegate.checkPropertyAccess(key);
 }
}

代码示例来源:origin: Nextdoor/bender

@Override
public void checkPropertyAccess(String key) {
  if (originalSecurityManager != null)
    originalSecurityManager.checkPropertyAccess(key);
}

代码示例来源:origin: org.eclipse/org.eclipse.ant.core

public void checkPropertyAccess(String key) {
  if (fSecurityManager != null) {
    fSecurityManager.checkPropertyAccess(key);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

/**
 * Returns a read-only view of all system properties
 */
public static Dictionary<Object,Object> getSystemProperties() {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
    sm.checkPropertyAccess("*");
  }
  return SYSTEM_PROPERTIES;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

/**
 * Returns a read-only view of all system properties
 */
public static Dictionary<Object,Object> getSystemProperties() {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
    sm.checkPropertyAccess("*");
  }
  return SYSTEM_PROPERTIES;
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

public static JvmInfo jvmInfo() {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(new ManagementPermission("monitor"));
    sm.checkPropertyAccess("*");
  }
  return INSTANCE;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

public static String getProperty(String key, String defaultValue) {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null)
    sm.checkPropertyAccess(key);
  return internalGetProperties(null).getProperty(key, defaultValue);
}

代码示例来源:origin: net.sf.jstuff/jstuff-core

@Override
public void checkPropertyAccess(final String key) {
 if (wrapped == null) {
   super.checkPropertyAccess(key);
 } else {
   wrapped.checkPropertyAccess(key);
 }
}

代码示例来源:origin: org.eclipse/org.eclipse.osgi

public static String getProperty(String key, String defaultValue) {
  SecurityManager sm = System.getSecurityManager();
  if (sm != null)
    sm.checkPropertyAccess(key);
  return internalGetProperties(null).getProperty(key, defaultValue);
}

代码示例来源:origin: org.jboss/jboss-common-core

/**
* Remove a property.
*
* @param name    Property name.
* @return        Removed property value or <tt>null</tt>.
*/
public static String removeProperty(final String name)
{
 SecurityManager sm = System.getSecurityManager();
 if (sm != null)
   sm.checkPropertyAccess(name);
 return props.removeProperty(name);
}

代码示例来源:origin: org.jboss/jboss-common-core

/**
* Check if this map contains a given property.
*
* @param name    Property name.
* @return        True if contains property.
*/
public static boolean containsProperty(final String name)
{
 SecurityManager sm = System.getSecurityManager();
 if (sm != null)
   sm.checkPropertyAccess(name);
 return props.containsProperty(name);
}

代码示例来源:origin: com.aliyun.odps/odps-common-local

@Override
public void checkPropertyAccess(String key) {
 super.checkPropertyAccess(key);
 if (blockedPropertyKeys.contains(key)) {
  try {
   checkPermission(new RuntimePermission("readSystemProperty"));
  } catch (SecurityException e) {
   throw new SecurityException("ODPS-0730001: " + e.getMessage());
  }
 }
}

相关文章