changeset 314:7da69e7175a7 jdk8-b15

Merge
author lana
date Fri, 18 Nov 2011 11:01:41 -0800
parents 44c269731425 99925e8d1b86
children 82dc033975bb 75529c21094f
files
diffstat 2 files changed, 11 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Fri Nov 11 10:16:17 2011 +0000
+++ b/.hgtags	Fri Nov 18 11:01:41 2011 -0800
@@ -134,3 +134,5 @@
 cda87f7fefcee3b89742a57ce5ad9b03a54c210d jdk8-b10
 0199e4fef5cc2bd234c65b93220459ef7a3bb3b1 jdk8-b11
 31d70911b712c6b4e580a3110363d5f044cfed7a jdk8-b12
+5b9d9b839d3d7fe02347827221c97c6d242a6f96 jdk8-b13
+e59c47de1ad8982ff3b0e843773a6902b36c2337 jdk8-b14
--- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Fri Nov 11 10:16:17 2011 +0000
+++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Fri Nov 18 11:01:41 2011 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -2243,6 +2243,10 @@
                 }
 
                 try {
+                    Class fieldCl = fields[i].getClazz();
+                    if (objectValue != null && !fieldCl.isInstance(objectValue)) {
+                        throw new IllegalArgumentException();
+                    }
                     bridge.putObject( o, fields[i].getFieldID(), objectValue ) ;
                     // reflective code: fields[i].getField().set( o, objectValue ) ;
                 } catch (IllegalArgumentException e) {
@@ -2553,6 +2557,10 @@
     {
         try {
             Field fld = c.getDeclaredField( fieldName ) ;
+            Class fieldCl = fld.getType();
+            if(v != null && !fieldCl.isInstance(v)) {
+                throw new Exception();
+            }
             long key = bridge.objectFieldOffset( fld ) ;
             bridge.putObject( o, key, v ) ;
         } catch (Exception e) {