Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
WhitespaceAfterCheck: problem with multiline typecast #3850
/var/tmp $ javac an/extremelylongpackagenamethat/hasmultiplecomponents/Test.java
/var/tmp $ cat config.xml
/var/tmp $ java -jar checkstyle-7.5.1-all.jar -c config.xml an/extremelylongpackagenamethat/hasmultiplecomponents/Test.java
Describe what you expect in detail.
I expect no warning. There is whitespace after the cast. The check seems to get confused by the fact that there is a line break in the cast. I have to have a line break in order to keep the line under 80 characters.
@romani This looks valid. When we first receive the token, we capture the line we are dealing with and this is the line we use to validate against for whitespaces.
Had the user had 1 extra space in the place we are looking on the previous line (line 7), no violation would have shown.