java.lang.NullPointerException.setStackTrace()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(9.0k)|赞(0)|评价(0)|浏览(238)

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

NullPointerException.setStackTrace介绍

暂无

代码示例

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

@Override
public final NullPointerException nullParamNPE(final String name) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullParamNPE$str(), name));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidPermissionAction = "COM00007: Invalid permission action '%s'";

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

@Override
public final NullPointerException sendChallengeReturnedNull(final AuthenticationMechanism mechanism) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), sendChallengeReturnedNull$str(), mechanism));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String bodyIsSetAndNotReadyForFlush = "UT000155: Framed channel body was set when it was not ready for flush";

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

@Override
public final NullPointerException nullTransaction() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullTransaction$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

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

@Override
public final NullPointerException sendChallengeReturnedNull(final AuthenticationMechanism mechanism) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), sendChallengeReturnedNull$str(), mechanism));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String bodyIsSetAndNotReadyForFlush = "UT000155: Framed channel body was set when it was not ready for flush";

代码示例来源:origin: io.undertow/undertow-servlet

@Override
public final NullPointerException paramCannotBeNullNPE(final String name) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), paramCannotBeNullNPE$str(), name));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String trailersNotSupported = "UT010060: Trailers not supported for this request due to %s";

代码示例来源:origin: io.undertow/undertow-servlet

@Override
public final NullPointerException listenerCannotBeNull() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), listenerCannotBeNull$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String sslCannotBeCombinedWithAnyOtherMethod = "UT010045: SSL cannot be combined with any other method";

代码示例来源:origin: io.undertow/undertow-servlet

@Override
public final NullPointerException headerNameWasNull() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), headerNameWasNull$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String noConfidentialPortAvailable = "UT010053: No confidential port is available to redirect the current request.";

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

@Override
public final NullPointerException nullEndpointClass() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullEndpointClass$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String classLoaderResolutionFailed = "WFLYWS0025: Cannot resolve module or classloader for deployment %s";

代码示例来源:origin: io.undertow.jastow/jastow

@Override
public final NullPointerException nullAttributeName() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullAttributeName$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String failedSettingBeanIndexedProperty = "JBWEB004041: Cannot set indexed property";

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

@Override
public final NullPointerException nullEndpointClass() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullEndpointClass$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String classLoaderResolutionFailed = "WFLYWS0025: Cannot resolve module or classloader for deployment %s";

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public final NullPointerException nullParamNPE(final String name) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullParamNPE$str(), name));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidPermissionAction = "COM00007: Invalid permission action '%s'";

代码示例来源:origin: org.wildfly/wildfly-webservices-server-integration

@Override
public final NullPointerException nullEndpointName() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullEndpointName$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String nullEndpointClass = "WFLYWS0024: Null endpoint class";

代码示例来源:origin: io.undertow/undertow-servlet

@Override
public final NullPointerException nullName() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullName$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidRequestResponseType = "UT010048: Can only handle HTTP type of request / response: %s / %s";

代码示例来源:origin: org.wildfly.transaction/wildfly-transaction-client

@Override
public final NullPointerException nullTransaction() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullTransaction$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

代码示例来源:origin: io.undertow.jastow/jastow

@Override
public final NullPointerException elResolverNullContext() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), elResolverNullContext$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String errorResolvingVariable = "JBWEB004224: Error resolving variable %s due to %s";

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
public final NullPointerException nullTransaction() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullTransaction$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
@Override

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

@Override
public final NullPointerException nullParamNPE(final String name) {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullParamNPE$str(), name));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidPermissionAction = "COM00007: Invalid permission action '%s'";

代码示例来源:origin: io.undertow.jastow/jastow

@Override
public final NullPointerException nullThrowable() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullThrowable$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidFunctionMapping = "JBWEB004241: Invalid function mapping - no such method: %s";

代码示例来源:origin: org.jboss.eap/wildfly-webservices-server-integration

@Override
public final NullPointerException nullEndpointName() {
  final NullPointerException result = new NullPointerException(String.format(getLoggingLocale(), nullEndpointName$str()));
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String nullEndpointClass = "WFLYWS0024: Null endpoint class";

代码示例来源:origin: EvoSuite/evosuite

@Override
  public void setStackTrace(StackTraceElement[] stackTrace) {
    if(!MockFramework.isEnabled()){
      super.setStackTrace(stackTrace);
      return;
    }
    getDelegate().setStackTrace(stackTrace);
  }
}

相关文章