Skip to content

Commit

Permalink
Merge pull request #1598 from ashrko619/ash-fix
Browse files Browse the repository at this point in the history
Fixed exception messages in Array
  • Loading branch information
danieldietrich authored Oct 2, 2016
2 parents cbf0ed7 + 9d5ac62 commit abcde8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javaslang/src/main/java/javaslang/collection/Array.java
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public int indexOf(T element, int from) {
@Override
public Array<T> init() {
if (isEmpty()) {
throw new UnsupportedOperationException("init of empty vector");
throw new UnsupportedOperationException("init of empty Array");
}
return dropRight(1);
}
Expand All @@ -764,7 +764,7 @@ private Object readResolve() {
@Override
public Array<T> insert(int index, T element) {
if (index < 0 || index > length()) {
throw new IndexOutOfBoundsException("insert(" + index + ", e) on Vector of length " + length());
throw new IndexOutOfBoundsException("insert(" + index + ", e) on Array of length " + length());
}
final Object[] arr = new Object[delegate.length + 1];
System.arraycopy(delegate, 0, arr, 0, index);
Expand Down

0 comments on commit abcde8d

Please sign in to comment.