# HG changeset patch # User lana # Date 1349999851 25200 # Node ID e4251351a6dd9bd6051f7fd6ff0bfaac0b00351d # Parent 1866fce310e83677d8320c86bf8833d3c9a6ec8e# Parent d5752c9082a18930db003c99cbc6d331a1a8d61a Merge diff -r 1866fce310e8 -r e4251351a6dd corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java --- a/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java Thu Oct 11 09:49:03 2012 -0700 +++ b/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java Thu Oct 11 16:57:31 2012 -0700 @@ -1631,7 +1631,7 @@ // Write data members... p.pln(); - p.pln("private " + getName(theType) + " target = null;"); + p.pln("volatile private " + getName(theType) + " target = null;"); p.pln(); // Write the ids... @@ -1695,6 +1695,10 @@ if (remoteMethods.length > 0) { p.plnI("try {"); + p.pln(getName(theType) + " target = this.target;"); + p.plnI("if (target == null) {"); + p.pln("throw new java.io.IOException();"); + p.pOln("}"); p.plnI(idExtInputStream + " "+in+" = "); p.pln("(" + idExtInputStream + ") "+_in+";"); p.pO();