Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify some code #3580

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions guava/src/com/google/common/cache/LocalCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -3918,9 +3918,7 @@ public boolean isEmpty() {
}
sum -= segments[i].modCount;
}
if (sum != 0L) {
return false;
}
return sum == 0L;
}
return true;
}
Expand Down
4 changes: 1 addition & 3 deletions guava/src/com/google/common/collect/MapMakerInternalMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -2315,9 +2315,7 @@ public boolean isEmpty() {
}
sum -= segments[i].modCount;
}
if (sum != 0L) {
return false;
}
return sum == 0L;
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/reflect/Parameter.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType)
// @Override on JDK8
@Override
public Annotation[] getDeclaredAnnotations() {
return annotations.toArray(new Annotation[annotations.size()]);
return annotations.toArray(new Annotation[0]);
}

/** @since 18.0 */
Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/reflect/Types.java
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public String toString() {
}

private static Type[] toArray(Collection<Type> types) {
return types.toArray(new Type[types.size()]);
return types.toArray(new Type[0]);
}

private static Iterable<Type> filterUpperBounds(Iterable<Type> bounds) {
Expand Down