Fixed false-positive in GenericWhitespaceCheck issue #51
This commit is contained in:
parent
95fd156d31
commit
cf5686783f
|
|
@ -161,10 +161,7 @@ public class GenericWhitespaceCheck extends Check
|
|||
log(aAST.getLineNo(), after, "ws.followed", ">");
|
||||
}
|
||||
}
|
||||
else if ((line.charAt(after) != '>')
|
||||
&& (line.charAt(after) != ',')
|
||||
&& (line.charAt(after) != '['))
|
||||
{
|
||||
else if (line.charAt(after) == ' ') {
|
||||
log(aAST.getLineNo(), after, "ws.followed", ">");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,4 +83,14 @@ public class GenericWhitespaceCheckTest
|
|||
final String[] expected = {};
|
||||
verify(mCheckConfig, getPath("whitespace/Gh47.java"), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInnerClass() throws Exception
|
||||
{
|
||||
final String[] expected = {
|
||||
|
||||
};
|
||||
verify(mCheckConfig, getPath("whitespace/"
|
||||
+ "InputGenericWhitespaceInnerClassCheck.java"), expected);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
package com.puppycrawl.tools.checkstyle.whitespace;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class InputGenericWhitespaceInnerClassCheck<T>
|
||||
{
|
||||
private List<InputGenericWhitespaceInnerClassCheck<? extends T>.InnerClass> field;
|
||||
|
||||
public class InnerClass {
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue