diff --git a/rules/S1186/java/rule.adoc b/rules/S1186/java/rule.adoc index 0e49c77794e..9452e771d8e 100644 --- a/rules/S1186/java/rule.adoc +++ b/rules/S1186/java/rule.adoc @@ -8,6 +8,7 @@ include::../description.adoc[] This does not raise an issue in the following cases: +* Methods with a comment to explain why they are empty * Non-public default (no-argument) constructors * Public default (no-argument) constructors when there are other constructors in the class * Empty methods in abstract classes @@ -23,6 +24,8 @@ public abstract class Animal { == How to fix it +To fix this issue, either make the method do something, throw an exception, or add a comment to explain why it is empty. + === Code examples ==== Noncompliant code example