Aller au contenu

Not Implemented Stub (ARCH4191)

Ce contenu n’est pas encore disponible dans votre langue.

Key java.quality.not-implemented-stub · Severity warning · Category quality

Unfinished stubs like throw new UnsupportedOperationException() blow up at runtime in shippable code. Provide a real implementation before merge.

public double calculateDiscount(Order o) {
throw new UnsupportedOperationException("not implemented");
}
public double calculateDiscount(Order o) {
return o.total() > 1000 ? o.total() * 0.1 : 0;
}

Complete the stub with real behavior, or remove the member if it is not needed.