-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #10924: Update GenericWhitespaceCheck to use code points
- Loading branch information
Showing
3 changed files
with
90 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
...tools/checkstyle/checks/whitespace/genericwhitespace/InputGenericWhitespaceWithEmoji.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
GenericWhitespace | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.whitespace.genericwhitespace; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.function.Supplier; | ||
|
||
public class InputGenericWhitespaceWithEmoji { | ||
|
||
/* 👇🏻dsad */public static class SomeClass { /* 😂 */ // ok | ||
|
||
public static class Nested<V> { | ||
|
||
private Nested() { | ||
|
||
} | ||
} | ||
} | ||
public <V> void methodName(V value) { | ||
|
||
/* 👉🏻 😆 */ Supplier<?> t = InputGenericWhitespaceMethodRef1.Nested2<V>::new; | ||
|
||
// 🎄 da | ||
List<List<String>[]> | ||
/*😂 🤛🏻 asd*/ listOfListOFArrays; | ||
|
||
} | ||
|
||
interface NumberEnum<T | ||
> { /*inner😆 enum*/} // violation ''>' is preceded with whitespace' | ||
|
||
public int getConstructor(Class<?>... parameterTypes) | ||
{ | ||
Collections.<Object>emptySet(); | ||
Collections. /*da sd😆sd*/ <Object> emptySet(); // 2 violations | ||
return 666; | ||
} | ||
Object ok2 = new <String>Outer.Inner(); | ||
Object notOkStart = new<String>Outer.Inner(); // violation ''<' is not preceded with whitespace' | ||
/* 😆asd*/ public static class IntEnumValueType3 <E extends Enum<E>> { | ||
// violation above ''<' is preceded with whitespace' | ||
} | ||
|
||
} |