java.security.AccessControlException.getMessage()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(184)

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

AccessControlException.getMessage介绍

暂无

代码示例

代码示例来源:origin: spring-projects/spring-framework

@Override
  @Nullable
  protected String getSystemAttribute(String attributeName) {
    try {
      return System.getenv(attributeName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info("Caught AccessControlException when accessing system environment variable '" +
            attributeName + "'; its value will be returned [null]. Reason: " + ex.getMessage());
      }
      return null;
    }
  }
};

代码示例来源:origin: spring-projects/spring-framework

@Override
  @Nullable
  protected String getSystemAttribute(String attributeName) {
    try {
      return System.getProperty(attributeName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info("Caught AccessControlException when accessing system property '" +
            attributeName + "'; its value will be returned [null]. Reason: " + ex.getMessage());
      }
      return null;
    }
  }
};

代码示例来源:origin: org.springframework/spring-core

@Override
  @Nullable
  protected String getSystemAttribute(String attributeName) {
    try {
      return System.getenv(attributeName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info("Caught AccessControlException when accessing system environment variable '" +
            attributeName + "'; its value will be returned [null]. Reason: " + ex.getMessage());
      }
      return null;
    }
  }
};

代码示例来源:origin: org.springframework/spring-core

@Override
  @Nullable
  protected String getSystemAttribute(String attributeName) {
    try {
      return System.getProperty(attributeName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info("Caught AccessControlException when accessing system property '" +
            attributeName + "'; its value will be returned [null]. Reason: " + ex.getMessage());
      }
      return null;
    }
  }
};

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

private void ajaxFetchFlowDetails(final Project project,
  final HashMap<String, Object> ret, final HttpServletRequest req)
  throws ServletException {
 final String flowName = getParam(req, "flow");
 try {
  final Flow flow = project.getFlow(flowName);
  if (flow == null) {
   ret.put("error", "Flow " + flowName + " not found.");
   return;
  }
  ret.put("jobTypes", getFlowJobTypes(flow));
  if (flow.getCondition() != null) {
   ret.put("condition", flow.getCondition());
  }
 } catch (final AccessControlException e) {
  ret.put("error", e.getMessage());
 }
}

代码示例来源:origin: javaee-samples/javaee7-samples

check.append("BeanRoot - bypass for EJB.txt; ");
} catch (AccessControlException e) {
  check.append("BeanRoot - failed for EJB.txt; " + e.getMessage());

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

page.add("errorMsg", e.getMessage());
} catch (final ProjectManagerException e) {
 page.add("errorMsg", e.getMessage());

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

page.add("errorMsg", e.getMessage());
} catch (final ProjectManagerException e) {
 page.add("errorMsg", e.getMessage());

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

page.add("errorMsg", e.getMessage());

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
  protected String getSystemAttribute(String propertyName) {
    try {
      return System.getProperty(propertyName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info(format("Caught AccessControlException when " +
            "accessing system property [%s]; its value will be " +
            "returned [null]. Reason: %s",
            propertyName, ex.getMessage()));
      }
      return null;
    }
  }
};

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

page.add("errorMsg", e.getMessage());

代码示例来源:origin: camunda/camunda-bpm-platform

@Override
  protected String getSystemAttribute(String variableName) {
    try {
      return System.getenv(variableName);
    }
    catch (AccessControlException ex) {
      if (logger.isInfoEnabled()) {
        logger.info(format("Caught AccessControlException when " +
            "accessing system environment variable [%s]; its " +
            "value will be returned [null]. Reason: %s",
            variableName, ex.getMessage()));
      }
      return null;
    }
  }
};

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

page.add("errorMsg", e.getMessage());

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

page.add("errorMsg", e.getMessage());

代码示例来源:origin: camunda/camunda-bpm-platform

log.warning("Original error was: " + ace.getMessage());

代码示例来源:origin: io.snappydata/snappydata-store-core

private static void checkPermission(SystemPermission permission)
{
  try {
    if (System.getSecurityManager() != null)
      AccessController.checkPermission(permission);
  } catch (AccessControlException e) {
    // Need to throw a simplified version as AccessControlException
    // will have a reference to Derby's SystemPermission which most likely
    // will not be available on the client.
    throw new SecurityException(e.getMessage());
  }  
}

代码示例来源:origin: io.snappydata/gemfirexd

private static void checkPermission(SystemPermission permission)
{
  try {
    if (System.getSecurityManager() != null)
      AccessController.checkPermission(permission);
  } catch (AccessControlException e) {
    // Need to throw a simplified version as AccessControlException
    // will have a reference to Derby's SystemPermission which most likely
    // will not be available on the client.
    throw new SecurityException(e.getMessage());
  }  
}

代码示例来源:origin: io.snappydata/gemfirexd-core

private static void checkPermission(SystemPermission permission)
{
  try {
    if (System.getSecurityManager() != null)
      AccessController.checkPermission(permission);
  } catch (AccessControlException e) {
    // Need to throw a simplified version as AccessControlException
    // will have a reference to Derby's SystemPermission which most likely
    // will not be available on the client.
    throw new SecurityException(e.getMessage());
  }  
}

代码示例来源:origin: com.couchbase.mock/CouchbaseMock

@NotNull
@Override
public CommandStatus execute(@NotNull CouchbaseMock mock, @NotNull Command command, @NotNull JsonObject payload) {
  super.execute(mock, command, payload);
  try {
    executeReal(payload, command);
  } catch (AccessControlException e) {
    error = e.getMessage();
  }
  return getResponse();
}

代码示例来源:origin: couchbase/CouchbaseMock

@NotNull
@Override
public CommandStatus execute(@NotNull CouchbaseMock mock, @NotNull Command command, @NotNull JsonObject payload) {
  super.execute(mock, command, payload);
  try {
    executeReal(payload, command);
  } catch (AccessControlException e) {
    error = e.getMessage();
  }
  return getResponse();
}

相关文章