Skip to content

Commit 61c9203

Browse files
committed
Remove detecting for certain method types.
1 parent 89ee466 commit 61c9203

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

‎src/main/java/org/ikvm/javarefplugin/MethodBodyStripper.java‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,13 @@ public void visitMethodDef(JCTree.JCMethodDecl tree) {
5050

5151
private boolean shouldKeepBody(JCTree.JCMethodDecl tree) {
5252
long flags = tree.mods.flags;
53-
if ((flags & (Flags.ABSTRACT | Flags.NATIVE)) != 0) {
54-
return true;
55-
}
56-
57-
return (flags & Flags.SYNTHETIC) != 0 && !isInitializer(tree);
53+
return (flags & (Flags.ABSTRACT | Flags.NATIVE)) != 0;
5854
}
5955

6056
private boolean isConstructor(JCTree.JCMethodDecl tree) {
6157
return tree.name == names.init;
6258
}
6359

64-
private boolean isClassInitializer(JCTree.JCMethodDecl tree) {
65-
return tree.name == names.clinit;
66-
}
67-
68-
private boolean isInitializer(JCTree.JCMethodDecl tree) {
69-
return isConstructor(tree) || isClassInitializer(tree);
70-
}
7160

7261
private List<JCTree.JCStatement> replacementStatements(JCTree.JCMethodDecl tree) {
7362
ListBuffer<JCTree.JCStatement> statements = new ListBuffer<>();

‎src/test/java/org/ikvm/javarefplugin/JavaRefPluginTest.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ private static int classFileMajorVersion(Class<?> type) throws IOException {
413413
}
414414
}
415415

416+
416417
private static final class CompilationResult {
417418
private final Path classesDirectory;
418419
private final URLClassLoader classLoader;

0 commit comments

Comments
 (0)