Review request for CR 171917 CachedRowSetImpl.populate does not handle map properly
Lance Andersen - Oracle
Lance.Andersen at oracle.com
Fri May 25 19:50:39 UTC 2012
Attached is the fix for bug 171917 .
The populate() method needs to check for a size of 0 for the map in case a webrowset xml file has an empty map tag, which would result in calling setobject specifying a map and not all databases/drivers support this.
simple 1 line change:
hg diff CachedRowSetImpl.java
diff -r 4580652d9828 src/share/classes/com/sun/rowset/CachedRowSetImpl.java
--- a/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Fri May 04 16:00:47 2012 -0400
+++ b/src/share/classes/com/sun/rowset/CachedRowSetImpl.java Fri May 25 15:45:29 2012 -0400
@@ -659,7 +659,7 @@
* us work with drivers that do not support
* getObject with a map in fairly sensible way
*/
- if (map == null) {
+ if (map == null || map.size() == 0) {
obj = data.getObject(i);
} else {
obj = data.getObject(i, map);
Best
Lance
Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering
1 Network Drive
Burlington, MA 01803
Lance.Andersen at oracle.com
More information about the core-libs-dev
mailing list