Merge

Wed, 03 Jun 2015 20:27:12 -0700

author
asaha
date
Wed, 03 Jun 2015 20:27:12 -0700
changeset 993
fd75ec7ff603
parent 992
1816446ab5ed
parent 943
eb0caffe34c6
child 995
94f4975c6d32

Merge

.hgtags file | annotate | diff | comparison | revisions
src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java file | annotate | diff | comparison | revisions
     1.1 --- a/.hgtags	Thu May 28 20:39:11 2015 -0700
     1.2 +++ b/.hgtags	Wed Jun 03 20:27:12 2015 -0700
     1.3 @@ -434,3 +434,4 @@
     1.4  68b50073c52a2c77aa35f90d6cfdec966effc4ef jdk8u60-b15
     1.5  3b19c17ea11c3831a8a0099d6d7a1a3c7e4897c4 jdk8u60-b16
     1.6  7ef66778231f234b69515202b2dc2287143ecb49 jdk8u60-b17
     1.7 +cf83b578af1935db8474d01b8642e4803a534d3a jdk8u60-b18
     2.1 --- a/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Thu May 28 20:39:11 2015 -0700
     2.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/IIOPInputStream.java	Wed Jun 03 20:27:12 2015 -0700
     2.3 @@ -1,5 +1,5 @@
     2.4  /*
     2.5 - * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     2.6 + * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
     2.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     2.8   *
     2.9   * This code is free software; you can redistribute it and/or modify it
    2.10 @@ -1768,43 +1768,59 @@
    2.11              switch (field.getTypeCode()) {
    2.12                  case 'B':
    2.13                      byte byteValue = orbStream.read_octet();
    2.14 -                    bridge.putByte( o, field.getFieldID(), byteValue ) ;
    2.15 -                    //reflective code: field.getField().setByte( o, byteValue ) ;
    2.16 +                    if (field.getField() != null) {
    2.17 +                        bridge.putByte( o, field.getFieldID(), byteValue ) ;
    2.18 +                        //reflective code: field.getField().setByte( o, byteValue ) ;
    2.19 +                    }
    2.20                      break;
    2.21                  case 'Z':
    2.22                      boolean booleanValue = orbStream.read_boolean();
    2.23 -                    bridge.putBoolean( o, field.getFieldID(), booleanValue ) ;
    2.24 -                    //reflective code: field.getField().setBoolean( o, booleanValue ) ;
    2.25 +                    if (field.getField() != null) {
    2.26 +                        bridge.putBoolean( o, field.getFieldID(), booleanValue ) ;
    2.27 +                        //reflective code: field.getField().setBoolean( o, booleanValue ) ;
    2.28 +                    }
    2.29                      break;
    2.30                  case 'C':
    2.31                      char charValue = orbStream.read_wchar();
    2.32 -                    bridge.putChar( o, field.getFieldID(), charValue ) ;
    2.33 -                    //reflective code: field.getField().setChar( o, charValue ) ;
    2.34 +                    if (field.getField() != null) {
    2.35 +                        bridge.putChar( o, field.getFieldID(), charValue ) ;
    2.36 +                        //reflective code: field.getField().setChar( o, charValue ) ;
    2.37 +                    }
    2.38                      break;
    2.39                  case 'S':
    2.40                      short shortValue = orbStream.read_short();
    2.41 -                    bridge.putShort( o, field.getFieldID(), shortValue ) ;
    2.42 -                    //reflective code: field.getField().setShort( o, shortValue ) ;
    2.43 +                    if (field.getField() != null) {
    2.44 +                        bridge.putShort( o, field.getFieldID(), shortValue ) ;
    2.45 +                        //reflective code: field.getField().setShort( o, shortValue ) ;
    2.46 +                    }
    2.47                      break;
    2.48                  case 'I':
    2.49                      int intValue = orbStream.read_long();
    2.50 -                    bridge.putInt( o, field.getFieldID(), intValue ) ;
    2.51 -                    //reflective code: field.getField().setInt( o, intValue ) ;
    2.52 +                    if (field.getField() != null) {
    2.53 +                        bridge.putInt( o, field.getFieldID(), intValue ) ;
    2.54 +                        //reflective code: field.getField().setInt( o, intValue ) ;
    2.55 +                    }
    2.56                      break;
    2.57                  case 'J':
    2.58                      long longValue = orbStream.read_longlong();
    2.59 -                    bridge.putLong( o, field.getFieldID(), longValue ) ;
    2.60 -                    //reflective code: field.getField().setLong( o, longValue ) ;
    2.61 +                    if (field.getField() != null) {
    2.62 +                        bridge.putLong( o, field.getFieldID(), longValue ) ;
    2.63 +                        //reflective code: field.getField().setLong( o, longValue ) ;
    2.64 +                    }
    2.65                      break;
    2.66                  case 'F' :
    2.67                      float floatValue = orbStream.read_float();
    2.68 -                    bridge.putFloat( o, field.getFieldID(), floatValue ) ;
    2.69 -                    //reflective code: field.getField().setFloat( o, floatValue ) ;
    2.70 +                    if (field.getField() != null) {
    2.71 +                        bridge.putFloat( o, field.getFieldID(), floatValue ) ;
    2.72 +                        //reflective code: field.getField().setFloat( o, floatValue ) ;
    2.73 +                    }
    2.74                      break;
    2.75                  case 'D' :
    2.76                      double doubleValue = orbStream.read_double();
    2.77 -                    bridge.putDouble( o, field.getFieldID(), doubleValue ) ;
    2.78 -                    //reflective code: field.getField().setDouble( o, doubleValue ) ;
    2.79 +                    if (field.getField() != null) {
    2.80 +                        bridge.putDouble( o, field.getFieldID(), doubleValue ) ;
    2.81 +                        //reflective code: field.getField().setDouble( o, doubleValue ) ;
    2.82 +                    }
    2.83                      break;
    2.84                  default:
    2.85                      // XXX I18N, logging needed.
    2.86 @@ -2217,9 +2233,6 @@
    2.87  
    2.88          if (o != null) {
    2.89              for (int i = 0; i < primFields; ++i) {
    2.90 -                if (fields[i].getField() == null)
    2.91 -                    continue;
    2.92 -
    2.93                  inputPrimitiveField(o, cl, fields[i]);
    2.94              }
    2.95          }
     3.1 --- a/src/share/classes/com/sun/corba/se/impl/io/OutputStreamHook.java	Thu May 28 20:39:11 2015 -0700
     3.2 +++ b/src/share/classes/com/sun/corba/se/impl/io/OutputStreamHook.java	Wed Jun 03 20:27:12 2015 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -32,6 +32,7 @@
    3.11  package com.sun.corba.se.impl.io;
    3.12  
    3.13  import java.io.IOException;
    3.14 +import java.io.NotActiveException;
    3.15  import java.io.OutputStream;
    3.16  import java.io.ObjectOutputStream;
    3.17  import java.io.ObjectOutput;
    3.18 @@ -154,7 +155,9 @@
    3.19  
    3.20      public ObjectOutputStream.PutField putFields()
    3.21          throws IOException {
    3.22 -        putFields = new HookPutFields();
    3.23 +        if (putFields == null) {
    3.24 +            putFields = new HookPutFields();
    3.25 +        }
    3.26          return putFields;
    3.27      }
    3.28  
    3.29 @@ -175,8 +178,11 @@
    3.30          throws IOException {
    3.31  
    3.32          writeObjectState.defaultWriteObject(this);
    3.33 -
    3.34 -        putFields.write(this);
    3.35 +        if (putFields != null) {
    3.36 +            putFields.write(this);
    3.37 +        } else {
    3.38 +            throw new NotActiveException("no current PutField object");
    3.39 +        }
    3.40      }
    3.41  
    3.42      abstract org.omg.CORBA_2_3.portable.OutputStream getOrbStream();

mercurial