summaryrefslogtreecommitdiffstats
path: root/luni/src/main/java/java/nio/ShortBuffer.java
diff options
context:
space:
mode:
Diffstat (limited to 'luni/src/main/java/java/nio/ShortBuffer.java')
-rw-r--r--luni/src/main/java/java/nio/ShortBuffer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/luni/src/main/java/java/nio/ShortBuffer.java b/luni/src/main/java/java/nio/ShortBuffer.java
index 052cf6b..d12a49e 100644
--- a/luni/src/main/java/java/nio/ShortBuffer.java
+++ b/luni/src/main/java/java/nio/ShortBuffer.java
@@ -46,7 +46,7 @@ public abstract class ShortBuffer extends Buffer implements
*/
public static ShortBuffer allocate(int capacity) {
if (capacity < 0) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("capacity < 0: " + capacity);
}
return new ReadWriteShortArrayBuffer(capacity);
}
@@ -426,7 +426,7 @@ public abstract class ShortBuffer extends Buffer implements
*/
public ShortBuffer put(ShortBuffer src) {
if (src == this) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("src == this");
}
if (src.remaining() > remaining()) {
throw new BufferOverflowException();