Fix failing test and add new test case

This commit is contained in:
Tamas Vajk
2025-03-14 13:07:56 +01:00
parent 9662b47464
commit d4955a0747
2 changed files with 51 additions and 1 deletions

View File

@@ -0,0 +1,46 @@
import org.aspectj.lang.annotation.Pointcut;
public class Class1 {
// COMPLIANT
public void f() {
int i = 0;
}
// COMPLIANT
public void f1() {
// intentionally empty
}
// NON_COMPLIANT
public void f2() { } // $ Alert
// COMPLIANT - exception
@Pointcut()
public void f4() {
}
public abstract class TestInner {
public abstract void f(); // COMPLIANT - intentionally empty
}
public class Derived extends TestInner {
// COMPLIANT: with annotation
@Override
public void f() {
}
// COMPLIANT: native
public native int nativeMethod();
}
public interface TestInterface {
// NON_COMPLIANT
default void method() { } // $ Alert
}
}

View File

@@ -1,2 +1,6 @@
| Test.java:16:15:16:16 | f2 | Empty method found. |
#select
| Class1.java:16:15:16:16 | f2 | Empty method found. |
| Class1.java:43:18:43:23 | method | Empty method found. |
| Test.java:43:18:43:23 | method | Empty method found. |
testFailures
| Test.java:16:24:16:33 | // $ Alert | Missing result: Alert |