use of org.apache.drill.exec.compile.DrillCheckClassAdapter in project drill by axbaretto.
the class ReplaceMethodInvoke method check.
private static final void check(final byte[] b) {
final ClassReader cr = new ClassReader(b);
final ClassWriter cw = writer();
final ClassVisitor cv = new DrillCheckClassAdapter(cw);
cr.accept(cv, 0);
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
DrillCheckClassAdapter.verify(new ClassReader(cw.toByteArray()), false, pw);
final String checkString = sw.toString();
if (!checkString.isEmpty()) {
throw new IllegalStateException(checkString);
}
}
use of org.apache.drill.exec.compile.DrillCheckClassAdapter in project drill by apache.
the class ReplaceMethodInvoke method check.
private static final void check(final byte[] b) {
final ClassReader cr = new ClassReader(b);
final ClassWriter cw = writer();
final ClassVisitor cv = new DrillCheckClassAdapter(cw);
cr.accept(cv, 0);
final StringWriter sw = new StringWriter();
final PrintWriter pw = new PrintWriter(sw);
DrillCheckClassAdapter.verify(new ClassReader(cw.toByteArray()), false, pw);
final String checkString = sw.toString();
if (!checkString.isEmpty()) {
throw new IllegalStateException(checkString);
}
}
Aggregations