Skip to content

Commit

Permalink
Throw IndexOutOfBoundsException instead of GcNegativeArraySizeExcepti…
Browse files Browse the repository at this point in the history
…on as per Oracle documentation
  • Loading branch information
polivar3 authored and dicej committed Aug 10, 2020
1 parent 4d21449 commit 9bbd495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avian/classpath-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ void arrayCopy(Thread* t,
throwNew(t, GcIndexOutOfBoundsException::Type);
}
} else if (LIKELY(length < 0)) {
throwNew(t, GcNegativeArraySizeException::Type, "%d", length);
throwNew(t, GcIndexOutOfBoundsException::Type, "%d", length);
return;
} else {
return;
Expand Down

0 comments on commit 9bbd495

Please sign in to comment.