--- a/jdk/src/share/classes/javax/sql/rowset/serial/SerialBlob.java Wed Dec 08 20:11:31 2010 -0800
+++ b/jdk/src/share/classes/javax/sql/rowset/serial/SerialBlob.java Thu Dec 09 13:01:14 2010 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -166,8 +166,9 @@
length = (int)len;
}
- if (pos < 1 || length - pos < 0 ) {
- throw new SerialException("Invalid arguments: position cannot be less that 1");
+ if (pos < 1 || len - pos < 0 ) {
+ throw new SerialException("Invalid arguments: position cannot be "
+ + "less than 1 or greater than the length of the SerialBlob");
}
pos--; // correct pos to array index