本文整理了Java中java.lang.NullPointerException.setStackTrace()
方法的一些代码示例,展示了NullPointerException.setStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NullPointerException.setStackTrace()
方法的具体详情如下:
包路径:java.lang.NullPointerException
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!