--- a/jdk/src/share/classes/java/io/ObjectInputStream.java Mon Mar 10 14:32:51 2008 -0700
+++ b/jdk/src/share/classes/java/io/ObjectInputStream.java Mon Mar 10 15:07:09 2008 -0700
@@ -212,7 +212,8 @@
private static final Object unsharedMarker = new Object();
/** table mapping primitive type names to corresponding class objects */
- private static final HashMap primClasses = new HashMap(8, 1.0F);
+ private static final HashMap<String, Class<?>> primClasses
+ = new HashMap<String, Class<?>>(8, 1.0F);
static {
primClasses.put("boolean", boolean.class);
primClasses.put("byte", byte.class);
@@ -620,7 +621,7 @@
try {
return Class.forName(name, false, latestUserDefinedLoader());
} catch (ClassNotFoundException ex) {
- Class cl = (Class) primClasses.get(name);
+ Class<?> cl = primClasses.get(name);
if (cl != null) {
return cl;
} else {
@@ -1254,11 +1255,11 @@
* override security-sensitive non-final methods. Returns true if subclass
* is "safe", false otherwise.
*/
- private static boolean auditSubclass(final Class subcl) {
+ private static boolean auditSubclass(final Class<?> subcl) {
Boolean result = AccessController.doPrivileged(
new PrivilegedAction<Boolean>() {
public Boolean run() {
- for (Class cl = subcl;
+ for (Class<?> cl = subcl;
cl != ObjectInputStream.class;
cl = cl.getSuperclass())
{
@@ -2217,9 +2218,9 @@
try {
while (list != null) {
AccessController.doPrivileged(
- new PrivilegedExceptionAction()
+ new PrivilegedExceptionAction<Void>()
{
- public Object run() throws InvalidObjectException {
+ public Void run() throws InvalidObjectException {
list.obj.validateObject();
return null;
}