src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java

changeset 402
27d87f0031bf
parent 370
5222b7d658d4
child 512
81d694b1ab2f
equal deleted inserted replaced
398:18462a19f7bd 402:27d87f0031bf
1629 1629
1630 p.plnI(" {"); 1630 p.plnI(" {");
1631 1631
1632 // Write data members... 1632 // Write data members...
1633 p.pln(); 1633 p.pln();
1634 p.pln("private " + getName(theType) + " target = null;"); 1634 p.pln("volatile private " + getName(theType) + " target = null;");
1635 p.pln(); 1635 p.pln();
1636 1636
1637 // Write the ids... 1637 // Write the ids...
1638 writeIds( p, theType, true ) ; 1638 writeIds( p, theType, true ) ;
1639 1639
1693 p.plnI("public OutputStream _invoke(String "+method+", InputStream "+_in+", " + 1693 p.plnI("public OutputStream _invoke(String "+method+", InputStream "+_in+", " +
1694 "ResponseHandler "+reply+") throws SystemException {"); 1694 "ResponseHandler "+reply+") throws SystemException {");
1695 1695
1696 if (remoteMethods.length > 0) { 1696 if (remoteMethods.length > 0) {
1697 p.plnI("try {"); 1697 p.plnI("try {");
1698 p.pln(getName(theType) + " target = this.target;");
1699 p.plnI("if (target == null) {");
1700 p.pln("throw new java.io.IOException();");
1701 p.pOln("}");
1698 p.plnI(idExtInputStream + " "+in+" = "); 1702 p.plnI(idExtInputStream + " "+in+" = ");
1699 p.pln("(" + idExtInputStream + ") "+_in+";"); 1703 p.pln("(" + idExtInputStream + ") "+_in+";");
1700 p.pO(); 1704 p.pO();
1701 1705
1702 // See if we should use a hash table style 1706 // See if we should use a hash table style

mercurial