本文整理了Java中sun.misc.Unsafe.throwException()
方法的一些代码示例,展示了Unsafe.throwException()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unsafe.throwException()
方法的具体详情如下:
包路径:sun.misc.Unsafe
类名称:Unsafe
方法名:throwException
[英]Throw the exception without telling the verifier.
[中]在不告诉验证器的情况下抛出异常。
代码示例来源:origin: netty/netty
static void throwException(Throwable cause) {
// JVM has been observed to crash when passing a null argument. See https://github.com/netty/netty/issues/4131.
UNSAFE.throwException(checkNotNull(cause, "cause"));
}
代码示例来源:origin: redisson/redisson
static void throwException(Throwable cause) {
// JVM has been observed to crash when passing a null argument. See https://github.com/netty/netty/issues/4131.
UNSAFE.throwException(checkNotNull(cause, "cause"));
}
代码示例来源:origin: h2oai/h2o-2
/**
* Throws exception, if any, associated with the given status.
*/
private void reportException(int s) {
Throwable ex = ((s == CANCELLED) ? new CancellationException() :
(s == EXCEPTIONAL) ? getThrowableException() :
null);
if (ex != null)
U.throwException(ex);
}
代码示例来源:origin: wildfly/wildfly
static void throwException(Throwable cause) {
// JVM has been observed to crash when passing a null argument. See https://github.com/netty/netty/issues/4131.
UNSAFE.throwException(checkNotNull(cause, "cause"));
}
代码示例来源:origin: fengjiachun/Jupiter
/**
* Raises an exception bypassing compiler checks for checked exceptions.
*/
public static void throwException(Throwable t) {
Unsafe unsafe = UnsafeUtil.getUnsafe();
if (unsafe != null) {
unsafe.throwException(t);
} else {
ThrowUtil.<RuntimeException>throwException0(t);
}
}
代码示例来源:origin: fengjiachun/Jupiter
/**
* Raises an exception bypassing compiler checks for checked exceptions.
*/
public static void throwException(Throwable t) {
Unsafe unsafe = UnsafeUtil.getUnsafe();
if (unsafe != null) {
unsafe.throwException(t);
} else {
ThrowUtil.<RuntimeException>throwException0(t);
}
}
代码示例来源:origin: h2oai/h2o-2
U.throwException(ex);
return tasks;
代码示例来源:origin: h2oai/h2o-2
U.throwException(ex);
代码示例来源:origin: h2oai/h2o-2
U.throwException(ex);
代码示例来源:origin: stackoverflow.com
Unsafe unsafe = getUnsafe();
unsafe.throwException(new Exception());
代码示例来源:origin: io.netty/netty-common
static void throwException(Throwable cause) {
// JVM has been observed to crash when passing a null argument. See https://github.com/netty/netty/issues/4131.
UNSAFE.throwException(checkNotNull(cause, "cause"));
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
/** Throw the exception.
* The exception may be an undeclared checked exception.
*/
public final void throwException(Throwable ee)
{
unsafe.throwException( ee ) ;
}
代码示例来源:origin: com.chaschev/chutils
public static void throwUnchecked(Throwable e) {
if (e instanceof RuntimeException) {
throw (RuntimeException)e;
}
UNSAFE.throwException(e);
}
代码示例来源:origin: org.apache.spark/spark-sketch_2.11
/**
* Raises an exception bypassing compiler checks for checked exceptions.
*/
public static void throwException(Throwable t) {
_UNSAFE.throwException(t);
}
代码示例来源:origin: actiontech/dble
/**
* Raises an exception bypassing compiler checks for checked exceptions.
*/
public static void throwException(Throwable t) {
UNSAFE.throwException(t);
}
代码示例来源:origin: org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec
/**
* Throw the exception. The exception may be an undeclared checked exception.
*/
public final void throwException(Throwable ee)
{
unsafe.throwException(ee);
}
代码示例来源:origin: org.jboss.openjdk-orb/openjdk-orb
/** Throw the exception.
* The exception may be an undeclared checked exception.
*/
public final void throwException(Throwable ee)
{
unsafe.throwException( ee ) ;
}
代码示例来源:origin: io.snappydata/snappy-spark-sketch
/**
* Raises an exception bypassing compiler checks for checked exceptions.
*/
public static void throwException(Throwable t) {
_UNSAFE.throwException(t);
}
代码示例来源:origin: net.openhft/lang
/**
* Utility method to support throwing checked exceptions out of the streams API
*
* @param t the exception to rethrow
* @return the exception
*/
public static RuntimeException rethrow(Throwable t) {
NativeBytes.UNSAFE.throwException(t);
throw new AssertionError();
}
代码示例来源:origin: apache/activemq-artemis
static void throwException(Throwable cause) {
// JVM has been observed to crash when passing a null argument. See https://github.com/netty/netty/issues/4131.
UNSAFE.throwException(checkNotNull(cause, "cause"));
}
内容来源于网络,如有侵权,请联系作者删除!