Skip to content
Open
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: 2 additions & 2 deletions guava/src/com/google/common/base/Strings.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static String nullToEmpty(@Nullable String string) {
* <p>Consider normalizing your string references with {@link #nullToEmpty}. If you do, you can
* use {@link String#isEmpty()} instead of this method, and you won't need special null-safe forms
* of methods like {@link String#toUpperCase} either. Or, if you'd like to normalize "in the other
* direction" (converting empty strings to {@code null}), you can use {@link #emptyToNull}.
* direction," converting empty strings to {@code null}, you can use {@link #emptyToNull}.
*
* @param string a string reference to check
* @return {@code true} if the string is null or is the empty string
Expand Down Expand Up @@ -161,7 +161,7 @@ public static String repeat(String string, int count) {
long longSize = (long) len * (long) count;
int size = (int) longSize;
if (size != longSize) {
throw new ArrayIndexOutOfBoundsException("Required array size too large: " + longSize);
throw new IllegalArgumentException("string.length() * count is too large: " + longSize);
}

char[] array = new char[size];
Expand Down