Use Java 7+ diamond operator in compiler modules
This commit is contained in:
@@ -53,7 +53,7 @@ public class GenerateKeywordStrings {
|
||||
p.println("public static final Set<String> KEYWORDS = new HashSet<String>(Arrays.asList(");
|
||||
p.pushIndent();
|
||||
|
||||
List<String> strings = new ArrayList<String>();
|
||||
List<String> strings = new ArrayList<>();
|
||||
for (IElementType type : KtTokens.KEYWORDS.getTypes()) {
|
||||
assert type instanceof KtKeywordToken : "Not a keyword in KtTokens.KEYWORDS: " + type;
|
||||
KtKeywordToken keyword = (KtKeywordToken) type;
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ public class SimpleTestClassModel implements TestClassModel {
|
||||
this.testClassName = testClassName;
|
||||
this.targetBackend = targetBackend;
|
||||
this.checkFilenameStartsLowerCase = checkFilenameStartsLowerCase;
|
||||
this.excludeDirs = excludeDirs.isEmpty() ? Collections.<String>emptySet() : new LinkedHashSet<String>(excludeDirs);
|
||||
this.excludeDirs = excludeDirs.isEmpty() ? Collections.emptySet() : new LinkedHashSet<>(excludeDirs);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -106,7 +106,7 @@ public class SimpleTestClassModel implements TestClassModel {
|
||||
private Set<String> excludesStripOneDirectory(@NotNull String directoryName) {
|
||||
if (excludeDirs.isEmpty()) return excludeDirs;
|
||||
|
||||
Set<String> result = new LinkedHashSet<String>();
|
||||
Set<String> result = new LinkedHashSet<>();
|
||||
for (String excludeDir : excludeDirs) {
|
||||
int firstSlash = excludeDir.indexOf('/');
|
||||
if (firstSlash >= 0 && excludeDir.substring(0, firstSlash).equals(directoryName)) {
|
||||
|
||||
Reference in New Issue
Block a user