Corrections from PR #1032
This commit is contained in:
@@ -208,13 +208,15 @@ adverse impacts on performance.
|
||||
<![CDATA[
|
||||
//FieldDeclaration/Type/PrimitiveType[@Image = 'short']
|
||||
|
|
||||
//ClassOrInterfaceBodyDeclaration[not(Annotation/MarkerAnnotation/Name[@Image='Override'])]
|
||||
//ClassOrInterfaceBodyDeclaration[not(Annotation/MarkerAnnotation/Name[typeof(@Image, 'java.lang.Override', 'Override')])]
|
||||
/MethodDeclaration/ResultType/Type/PrimitiveType[@Image = 'short']
|
||||
|
|
||||
//ClassOrInterfaceBodyDeclaration[not(Annotation/MarkerAnnotation/Name[@Image='Override'])]
|
||||
//ClassOrInterfaceBodyDeclaration[not(Annotation/MarkerAnnotation/Name[typeof(@Image, 'java.lang.Override', 'Override')])]
|
||||
/MethodDeclaration/MethodDeclarator/FormalParameters/FormalParameter/Type/PrimitiveType[@Image = 'short']
|
||||
|
|
||||
//LocalVariableDeclaration/Type/PrimitiveType[@Image = 'short']
|
||||
|
|
||||
//AnnotationMethodDeclaration/Type/PrimitiveType[@Image = 'short']
|
||||
]]>
|
||||
</value>
|
||||
</property>
|
||||
|
||||
@@ -133,6 +133,16 @@ public class ShortTest implements NodeFilter {
|
||||
public short acceptNode(@Nullable Node node) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
<test-code>
|
||||
<description>short as annotation property</description>
|
||||
<expected-problems>1</expected-problems>
|
||||
<code><![CDATA[
|
||||
public @interface MyAnnotation {
|
||||
short dontUseShort();
|
||||
}
|
||||
]]></code>
|
||||
</test-code>
|
||||
|
||||
Reference in New Issue
Block a user