Skip to content

Commit

Permalink
Mark the auto-generated RESTEasy constructor as synthetic
Browse files Browse the repository at this point in the history
This is mainly done in order to allow code coverage tools
to skip the constructor

Relates to: #18559
  • Loading branch information
geoand committed Sep 12, 2021
1 parent b50a4de commit 911610e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,8 @@ public ClassVisitor apply(String className, ClassVisitor classVisitor) {
public void visit(int version, int access, String name, String signature, String superName,
String[] interfaces) {
super.visit(version, access, name, signature, superName, interfaces);
MethodVisitor ctor = visitMethod(Modifier.PUBLIC, "<init>", "()V", null,
MethodVisitor ctor = visitMethod(Opcodes.ACC_PUBLIC | Opcodes.ACC_SYNTHETIC, "<init>",
"()V", null,
null);
ctor.visitCode();
ctor.visitVarInsn(Opcodes.ALOAD, 0);
Expand Down

0 comments on commit 911610e

Please sign in to comment.