diff options
author | Roman Ivanov <ivanov-jr@mail.ru> | 2016-05-18 05:48:26 -0700 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2016-05-18 05:48:26 -0700 |
commit | 847a09d68f29a0551c76db66f2fed9cc3e5a57c5 (patch) | |
tree | 5af42148f0c0f90802e3fa96e064bfe7f833b9e1 /src/main | |
parent | 20506e1ceb2de74c9a85367135be714f8208643f (diff) | |
download | checkstyle-847a09d68f29a0551c76db66f2fed9cc3e5a57c5.tar.gz |
Issue #3164: AnnotationLocation: unclear behavior when annotation is among modifiers
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java index ea29cea4a..940ccf5a6 100644 --- a/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java +++ b/src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationLocationCheck.java @@ -29,6 +29,13 @@ import com.puppycrawl.tools.checkstyle.utils.CommonUtils; * By default, Check enforce to locate annotations immediately after * documentation block and before target element, annotation should be located * on separate line from target element. + * <p> + * Attention: Annotations among modifiers are ignored (looks like false-negative) + * as there might be a problem with annotations for return types + * <pre>public @Nullable Long getStartTimeOrNull() { ... }</pre>. + * Such annotations are better to keep close to type. + * Due to limitations Checkstyle can not examin target of annotation. + * </p> * * <p> * Example: |