aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java
index 638c8e1477..c176f3ca96 100644
--- a/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java
+++ b/src/main/java/com/google/devtools/build/lib/syntax/SkylarkType.java
@@ -139,7 +139,7 @@ public abstract class SkylarkType implements Serializable {
return TOP;
}
- private static final class Empty {}; // Empty type, used as basis for Bottom
+ private static final class Empty {} // Empty type, used as basis for Bottom
// Notable types
@@ -333,7 +333,7 @@ public abstract class SkylarkType implements Serializable {
if (generic == BOTTOM) {
return BOTTOM;
}
- SkylarkType arg = intersection(argType, ((Combination) other).getArgType());
+ SkylarkType arg = intersection(argType, other.getArgType());
if (arg == BOTTOM) {
return BOTTOM;
}
@@ -379,7 +379,7 @@ public abstract class SkylarkType implements Serializable {
}
private static final Interner<Combination> combinationInterner =
- BlazeInterners.<Combination>newWeakInterner();
+ BlazeInterners.newWeakInterner();
public static SkylarkType of(SkylarkType generic, SkylarkType argument) {
// assume all combinations with TOP are the same as the simple type, and canonicalize.
@@ -441,7 +441,7 @@ public abstract class SkylarkType implements Serializable {
return list;
}
@Override public SkylarkType intersectWith(SkylarkType other) {
- List<SkylarkType> otherTypes = addElements(new ArrayList<SkylarkType>(), other);
+ List<SkylarkType> otherTypes = addElements(new ArrayList<>(), other);
List<SkylarkType> results = new ArrayList<>();
for (SkylarkType element : types) {
for (SkylarkType otherElement : otherTypes) {
@@ -487,14 +487,14 @@ public abstract class SkylarkType implements Serializable {
} else if (canonical.size() == 1) {
return canonical.get(0);
} else {
- return new Union(ImmutableList.<SkylarkType>copyOf(canonical));
+ return new Union(ImmutableList.copyOf(canonical));
}
}
public static SkylarkType of(SkylarkType... types) {
return of(Arrays.asList(types));
}
public static SkylarkType of(SkylarkType t1, SkylarkType t2) {
- return of(ImmutableList.<SkylarkType>of(t1, t2));
+ return of(ImmutableList.of(t1, t2));
}
public static SkylarkType of(Class<?> t1, Class<?> t2) {
return of(Simple.forClass(t1), Simple.forClass(t2));