Skip to content

Commit 7476f19

Browse files
committed
Adjust query help
1 parent 349f489 commit 7476f19

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

java/ql/src/Language Abuse/EmptyMethod.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
# J-D-002: An empty method serves no purpose and may indicate programmer error
2-
3-
An empty method serves no purpose and may indicate programmer error.
4-
51
## Overview
62

7-
An empty method may indicate that an implmentation was intended to be provided but was accidentally omitted. When using the method, it will not be clear that it does not provide an implentation and with dynamic dispatch, resolving to a blank method may result in unexpected program behaviour.
3+
An empty method may indicate that an implementation was intended to be provided but was accidentally omitted. When using the method, it will not be clear that it does not provide an implentation and with dynamic dispatch, resolving to a blank method may result in unexpected program behaviour.
84

95
## Recommendation
106

@@ -32,8 +28,8 @@ public class Test {
3228

3329
## Implementation Notes
3430

35-
The rule excludes reporting methods annotated with `org.springframework.aop.Pointcut` or `org.aspectj.lang.annotation.Pointcut`. Such annotations are commonly paired with empty methods and are considered an acceptable use case for an empty method.
31+
The rule excludes reporting methods that are annotated or marked as `default`.
3632

3733
## References
3834
- [java.util.Collections.add](https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/Collection.html#add(E))
39-
- [Template pattern is a valid empty method use](https://en.wikipedia.org/wiki/Template_method_pattern)
35+
- [Template pattern is a valid empty method use](https://en.wikipedia.org/wiki/Template_method_pattern)

0 commit comments

Comments
 (0)