exception messages to upper case

This commit is contained in:
Stepan Koltsov
2012-05-19 19:52:53 +04:00
parent 527ce1ad93
commit f9515e1619
@@ -11,11 +11,11 @@ private class ImmutableArrayList<T>(
{ {
// impossible // impossible
if (offset < 0) { if (offset < 0) {
throw IllegalArgumentException("negative offset ($offset)") throw IllegalArgumentException("Negative offset ($offset)")
} }
// impossible // impossible
if (length < 0) { if (length < 0) {
throw IllegalArgumentException("negative length ($length)") throw IllegalArgumentException("Negative length ($length)")
} }
// possible when builder is used from different threads // possible when builder is used from different threads
if (offset + length > array.size) { if (offset + length > array.size) {
@@ -25,7 +25,7 @@ private class ImmutableArrayList<T>(
protected fun indexInArray(index: Int): Int { protected fun indexInArray(index: Int): Int {
if (index < 0) { if (index < 0) {
throw IndexOutOfBoundsException("negative index ($index)") throw IndexOutOfBoundsException("Negative index ($index)")
} }
if (index >= length) { if (index >= length) {
throw IndexOutOfBoundsException("index ($index) >= length ($length)") throw IndexOutOfBoundsException("index ($index) >= length ($length)")
@@ -39,7 +39,7 @@ private class ImmutableArrayList<T>(
public override fun subList(fromIndex: Int, toIndex: Int) : List<T> { public override fun subList(fromIndex: Int, toIndex: Int) : List<T> {
if (fromIndex < 0) { if (fromIndex < 0) {
throw IndexOutOfBoundsException("negative from index ($fromIndex)") throw IndexOutOfBoundsException("Negative from index ($fromIndex)")
} }
if (toIndex < fromIndex) { if (toIndex < fromIndex) {
throw IndexOutOfBoundsException("toIndex ($toIndex) < fromIndex ($fromIndex)") throw IndexOutOfBoundsException("toIndex ($toIndex) < fromIndex ($fromIndex)")