jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java
changeset 11129 f9ad1aadf3fa
parent 5506 202f599c92aa
child 11683 5e02efd89af6
--- a/jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java	Fri Dec 02 16:29:19 2011 -0800
+++ b/jdk/src/share/classes/javax/sql/rowset/serial/SQLInputImpl.java	Fri Dec 02 19:33:54 2011 -0500
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, 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
@@ -22,13 +22,9 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-
 package javax.sql.rowset.serial;
 
 import java.sql.*;
-import javax.sql.*;
-import java.io.*;
-import java.math.*;
 import java.util.Map;
 
 /**
@@ -91,7 +87,7 @@
      * <code>SQLData</code> (the Java class that defines how the UDT
      * will be mapped).
      */
-    private Map map;
+    private Map<String,Class<?>> map;
 
 
     /**
@@ -279,7 +275,7 @@
 
         if (attrib == null) {
             lastValueWasNull = true;
-            return (int)0;
+            return 0;
         } else {
             lastValueWasNull = false;
             return attrib.intValue();
@@ -591,7 +587,7 @@
      * position; or if there are no further values in the stream.
      */
     public Object readObject() throws SQLException {
-        Object attrib = (Object)getNextAttribute();
+        Object attrib = getNextAttribute();
 
         if (attrib == null) {
             lastValueWasNull = true;
@@ -601,7 +597,7 @@
             if (attrib instanceof Struct) {
                 Struct s = (Struct)attrib;
                 // look up the class in the map
-                Class c = (Class)map.get(s.getSQLTypeName());
+                Class<?> c = map.get(s.getSQLTypeName());
                 if (c != null) {
                     // create new instance of the class
                     SQLData obj = null;
@@ -620,10 +616,10 @@
                     SQLInputImpl sqlInput = new SQLInputImpl(attribs, map);
                     // read the values...
                     obj.readSQL(sqlInput, s.getSQLTypeName());
-                    return (Object)obj;
+                    return obj;
                 }
             }
-            return (Object)attrib;
+            return attrib;
         }
     }