There are several reasons for a method not to have a method body:
UnsupportedOperationException should be thrown.
public void doSomething() {
}
public void doSomethingElse() {
}
@Override
public void doSomething() {
// Do nothing because of X and Y.
}
@Override
public void doSomethingElse() {
throw new UnsupportedOperationException();
}
This does not raise an issue in the following cases:
@org.aspectj.lang.annotation.Pointcut()
public abstract class Animal {
void speak() { // default implementation ignored
}
}