本文整理了Java中java.lang.VerifyError
类的一些代码示例,展示了VerifyError
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VerifyError
类的具体详情如下:
包路径:java.lang.VerifyError
类名称:VerifyError
[英]Thrown when the VM notices that an attempt is made to load a class which does not pass the class verification phase.
[中]当VM注意到试图加载未通过类验证阶段的类时引发。
代码示例来源:origin: lenskit/lenskit
task.addMetric(metric);
} else {
throw new VerifyError("cannot build metric for " + mn.toString());
代码示例来源:origin: PrivacyApps/document-viewer
public static void init(final File storage) {
try {
system = new SystemFontProvider();
assets = new AssetsFontProvider();
external = new ExtStorageFontProvider(storage);
system.init();
assets.init();
external.init();
} catch (VerifyError ex) {
ex.printStackTrace();
throw ex;
}
}
代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-debugger-jpda-projects
error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_FixMismatch", ncdfex.getLocalizedMessage());
} catch (VerifyError ver) {
error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_FixVerifierProblems", ver.getLocalizedMessage());
} catch (UnsupportedClassVersionError ucver) {
error = NbBundle.getMessage(SourcePathProviderImpl.class, "MSG_FixUnsupportedVersion", ucver.getLocalizedMessage());
代码示例来源:origin: lsc-project/lsc
throw new LscConfigurationException(e.toString(), e);
} catch (SAXException e) {
throw new LscConfigurationException(e);
代码示例来源:origin: org.armedbear.lisp/abcl
public Class<?> loadClassFromByteArray(String className, byte[] bytes,
int offset, int length)
{
try {
Class<?> c = defineClass(className, bytes, offset, length);
if (c != null) {
resolveClass(c);
return c;
}
}
catch (VerifyError e)
{
error(new LispError("Class verification failed: " + e.getMessage()));
}
catch (Throwable t) {
Debug.trace(t);
}
return null;
}
代码示例来源:origin: bytemanproject/byteman
Helper.errTraceException(ve);
out.println("VerifyError during retransformation : some rules may not have been correctly uninjected!");
ve.printStackTrace(out);
代码示例来源:origin: org.codehaus.mevenide/nb-project
error = "The bytes don't correspond to the class type (the names don't match): "+ncdfex.getLocalizedMessage();
} catch (VerifyError ver) {
error = "A \"verifier\" detects that a class, though well formed, contains an internal inconsistency or security problem: "+ver.getLocalizedMessage();
} catch (UnsupportedClassVersionError ucver) {
error = "The major and minor version numbers in bytes are not supported by the VM. "+ucver.getLocalizedMessage();
代码示例来源:origin: jpcsp/jpcsp
break;
} catch (VerifyError e) {
log.error(String.format("Catched exception '%s' while compiling 0x%08X (0x%08X-0x%08X)", e.toString(), address, context.getCodeBlock().getLowestAddress(), context.getCodeBlock().getHighestAddress()));
break;
} catch (RuntimeException e) {
代码示例来源:origin: org.armedbear.lisp/abcl
@Override
public LispObject execute(LispObject className, LispObject classBytes)
{
String cn = className.getStringValue();
String pn = cn.substring(0,cn.lastIndexOf('.'));
byte[] cb = (byte[]) classBytes.javaInstance();
try {
JavaClassLoader loader = JavaClassLoader.getPersistentInstance(pn);
Class c = loader.loadClassFromByteArray(cn, cb);
if (c != null) {
return T;
}
}
catch (VerifyError e) {
return error(new LispError("class verification failed: " +
e.getMessage()));
}
catch (LinkageError e) {
return error(new LispError("class could not be linked: " +
e.getMessage()));
}
return error(
new LispError("unable to load ".concat(cn)));
}
};
代码示例来源:origin: org.vesalainen.bcc/bcc
private void verifyReferenceOrArray(TypeMirror cw)
{
switch (cw.getKind())
{
case ARRAY:
case DECLARED:
case TYPEVAR:
return;
default:
throw new VerifyError(cw+" not assignable to array");
}
}
代码示例来源:origin: bytemanproject/byteman
Helper.errTraceException(ve);
out.println("VerifyError during retransformation : some rules may not have been correctly uninjected!");
ve.printStackTrace(out);
代码示例来源:origin: org.armedbear.lisp/abcl
@SuppressWarnings("unchecked")
final public static LispObject loadPreloadedFunction(String name) {
LispThread thread = LispThread.currentThread();
LispObject value = AUTOLOADING_CACHE.symbolValue(thread);
if (value instanceof Nil) {
byte[] bytes = readFunctionBytes(new Pathname(name));
return (bytes == null) ? null : loadClassBytes(bytes);
}
Hashtable cache = (Hashtable)value.javaInstance();
byte[] bytes = (byte[])cache.get(name);
if (bytes == null)
return error(new LispError("Function '" + name + "' not preloaded" +
" while preloading requested."));
try {
return loadClassBytes(bytes);
}
catch (VerifyError e)
{
return error(new LispError("Class verification failed: " +
e.getMessage()));
}
catch (Throwable t)
{
Debug.trace(t);
}
return error(new FileError("Can't read file off stream."));
}
代码示例来源:origin: org.vesalainen.bcc/bcc
private void verifyByteOrBoolean(TypeMirror cw)
{
switch (cw.getKind())
{
case BYTE:
case BOOLEAN:
return;
default:
throw new VerifyError(cw+" not byte or boolean");
}
}
代码示例来源:origin: bytemanproject/byteman
Helper.errTraceException(ve);
out.println("VerifyError during retransformation : some rules may not have been correctly injected or uninjected!");
ve.printStackTrace(out);
代码示例来源:origin: org.vesalainen.bcc/bcc
/**
* Returns a element from constant map
* @param index
* @return
*/
Object getIndexedType(int index)
{
Object ae = indexedElementMap.get(index);
if (ae == null)
{
throw new VerifyError("constant pool at "+index+" not proper type");
}
return ae;
}
/**
代码示例来源:origin: bytemanproject/byteman
Helper.errTraceException(ve);
out.println("VerifyError during retransformation : some rules may not have been correctly injected or uninjected!");
ve.printStackTrace(out);
代码示例来源:origin: org.vesalainen.bcc/bcc
private void verify1(TypeMirror cls)
{
if (!c1(cls))
{
throw new VerifyError(cls+" not category 1");
}
}
代码示例来源:origin: baidu/GPT
} catch (java.lang.VerifyError e) {
if (DEBUG) {
e.printStackTrace();
代码示例来源:origin: org.vesalainen.bcc/bcc
private void verifyVirtualClass(TypeMirror objectRef, ExecutableElement method)
{
TypeElement declaringClass = (TypeElement) method.getEnclosingElement();
if (!Typ.isAssignable(objectRef, declaringClass.asType()))
{
throw new VerifyError("class "+objectRef+" not assignable for method class "+declaringClass+" in method "+method);
}
}
代码示例来源:origin: org.vesalainen.bcc/bcc
private VariableElement getIndexedVariable(int i)
{
Object indexedType = cf.getIndexedType(i);
if (indexedType instanceof VariableElement)
{
return (VariableElement) indexedType;
}
throw new VerifyError("indexed object at "+i+" not field");
}
内容来源于网络,如有侵权,请联系作者删除!