提交 d748a4ab 编写于 作者: M msheppar

8146975: NullPointerException in IIOPInputStream.inputClassFields

Reviewed-by: chegar, rriggs, coffeys
上级 71a95ad3
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.util.ArrayList;
import javax.naming.InitialContext;
import javax.naming.Context;
import javax.naming.NameNotFoundException;
import javax.rmi.PortableRemoteObject;
public class HelloClient implements Runnable {
static final int MAX_RETRY = 10;
static final int ONE_SECOND = 1000;
private static boolean responseReceived;
public static void main(String args[]) throws Exception {
executeRmiClientCall();
}
@Override
public void run() {
try {
executeRmiClientCall();
} catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e);
}
}
public static boolean isResponseReceived () {
return responseReceived;
}
public static void executeRmiClientCall() throws Exception {
Context ic;
Object objref;
HelloInterface helloSvc;
String response;
Object testResponse;
int retryCount = 0;
ArrayList<Test> listParam = new ArrayList<Test>();
listParam.add(null);
System.out.println("HelloClient.main: enter ...");
while (retryCount < MAX_RETRY) {
try {
ic = new InitialContext();
System.out.println("HelloClient.main: HelloService lookup ...");
// STEP 1: Get the Object reference from the Name Service
// using JNDI call.
objref = ic.lookup("HelloService");
System.out.println("HelloClient: Obtained a ref. to Hello server.");
// STEP 2: Narrow the object reference to the concrete type and
// invoke the method.
helloSvc = (HelloInterface) PortableRemoteObject.narrow(objref,
HelloInterface.class);
Test3 test3 = new Test3(listParam);
Test3 test3Response = helloSvc.sayHelloWithTest3(test3);
System.out.println("Server says: Test3 response == " + test3Response);
Test3 test3WithNullList = new Test3(null);
test3Response = helloSvc.sayHelloWithTest3(test3WithNullList);
System.out.println("Server says: Test3 response == "
+ test3Response);
Test4 test4 = new Test4(listParam);
Test3 test4Response = helloSvc.sayHelloWithTest3(test4);
System.out.println("Server says: Test3 response == " + test4Response);
responseReceived = true;
break;
} catch (NameNotFoundException nnfEx) {
System.err.println("NameNotFoundException Caught .... try again");
retryCount++;
try {
Thread.sleep(ONE_SECOND);
} catch (InterruptedException e) {
e.printStackTrace();
}
continue;
} catch (Exception e) {
System.err.println("Exception " + e + "Caught");
e.printStackTrace();
throw new RuntimeException(e);
}
}
System.err.println("HelloClient terminating ");
try {
Thread.sleep(ONE_SECOND);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.rmi.RemoteException;
import javax.rmi.PortableRemoteObject;
public class HelloImpl extends PortableRemoteObject implements HelloInterface {
public HelloImpl() throws java.rmi.RemoteException {
super(); // invoke rmi linking and remote object initialization
}
@Override
public Test3 sayHelloWithTest3(Test3 test) throws RemoteException {
System.out.println("sayHelloToTest3: ENTER " );
return test;
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.rmi.Remote;
public interface HelloInterface extends Remote {
public Test3 sayHelloWithTest3( Test3 test ) throws java.rmi.RemoteException;
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import javax.naming.InitialContext;
import javax.naming.Context;
public class HelloServer {
static final int MAX_RETRY = 10;
static final int ONE_SECOND = 1000;
public static void main(String[] args) {
int retryCount = 0;
while (retryCount < MAX_RETRY) {
try {
//HelloServer.set("SETTING TEST ITL");
// Step 1: Instantiate the Hello servant
HelloImpl helloRef = new HelloImpl();
// Step 2: Publish the reference in the Naming Service
// using JNDI API
Context initialNamingContext = new InitialContext();
initialNamingContext.rebind("HelloService", helloRef);
System.out.println("Hello Server: Ready...");
break;
} catch (Exception e) {
System.out.println("Server initialization problem: " + e);
e.printStackTrace();
retryCount++;
try {
Thread.sleep(ONE_SECOND);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
}
}
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8146975
* @summary test RMI-IIOP with value object return
* @library /lib/testlibrary
* @build jdk.testlibrary.*
* @compile Test.java Test2.java Test3.java Test4.java
* HelloInterface.java HelloServer.java HelloClient.java
* HelloImpl.java _HelloImpl_Tie.java _HelloInterface_Stub.java
* RmiIiopReturnValueTest.java
* @run main/othervm -Djava.naming.provider.url=iiop://localhost:5050
* -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
* RmiIiopReturnValueTest -port 5049
* @run main/othervm/secure=java.lang.SecurityManager/policy=jtreg.test.policy
* -Djava.naming.provider.url=iiop://localhost:5050
* -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
* RmiIiopReturnValueTest -port 5049
*/
import java.io.DataInputStream;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.CountDownLatch;
import jdk.testlibrary.JDKToolFinder;
import jdk.testlibrary.JDKToolLauncher;
public class RmiIiopReturnValueTest {
static final String ORBD = JDKToolFinder.getTestJDKTool("orbd");
static final String JAVA = JDKToolFinder.getTestJDKTool("java");
static final JDKToolLauncher orbdLauncher = JDKToolLauncher.createUsingTestJDK("orbd");
static final String CLASSPATH = System.getProperty("java.class.path");
static final int FIVE_SECONDS = 5000;
private static Throwable clientException;
private static boolean exceptionInClient;
private static Process orbdProcess;
private static Process rmiServerProcess;
public static void main(String[] args) throws Exception {
startTestComponents();
stopTestComponents();
System.err.println("Test completed OK ");
}
static void startTestComponents () throws Exception {
startOrbd();
Thread.sleep(FIVE_SECONDS);
startRmiIiopServer();
Thread.sleep(FIVE_SECONDS);
executeRmiIiopClient();
}
private static void stopTestComponents() throws Exception {
stopRmiIiopServer();
stopOrbd();
if (exceptionInClient) {
throw new RuntimeException(clientException);
} else if (!isResponseReceived()) {
throw new RuntimeException("Expected Response not received");
}
}
static void startOrbd() throws Exception {
System.out.println("\nStarting orbd with NS port 5050 and activation port 5049 ");
//orbd -ORBInitialHost localhost -ORBInitialPort 5050 -port 5049
orbdLauncher.addToolArg("-ORBInitialHost").addToolArg("localhost")
.addToolArg("-ORBInitialPort").addToolArg("5050")
.addToolArg("-port").addToolArg("5049");
System.out.println("RmiIiopReturnValueTest: Executing: " + Arrays.asList(orbdLauncher.getCommand()));
ProcessBuilder pb = new ProcessBuilder(orbdLauncher.getCommand());
pb.redirectError(ProcessBuilder.Redirect.INHERIT);
orbdProcess = pb.start();
}
static void startRmiIiopServer() throws Exception {
System.out.println("\nStarting RmiIiopServer");
// java -cp .
// -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory
// -Djava.naming.provider.url=iiop://localhost:5050 HelloServer -port 5049
List<String> commands = new ArrayList<>();
commands.add(RmiIiopReturnValueTest.JAVA);
commands.add("-Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory");
commands.add("-Djava.naming.provider.url=iiop://localhost:5050");
commands.add("-cp");
commands.add(RmiIiopReturnValueTest.CLASSPATH);
commands.add("HelloServer");
commands.add("-port");
commands.add("5049");
System.out.println("RmiIiopReturnValueTest: Executing: " + commands);
ProcessBuilder pb = new ProcessBuilder(commands);
pb.redirectError(ProcessBuilder.Redirect.INHERIT);
rmiServerProcess = pb.start();
}
static boolean isResponseReceived() {
return HelloClient.isResponseReceived();
}
static void stopRmiIiopServer() throws Exception {
if (rmiServerProcess != null) {
System.out.println("RmiIiopReturnValueTest.stopRmiIiopServer: destroy rmiServerProcess");
rmiServerProcess.destroyForcibly();
rmiServerProcess.waitFor();
System.out.println("serverProcess exitCode:"
+ rmiServerProcess.exitValue());
}
}
static void stopOrbd() throws Exception {
System.out.println("RmiIiopReturnValueTest.stopOrbd: destroy orbdProcess ");
orbdProcess.destroyForcibly();
orbdProcess.waitFor();
System.out.println("orbd exitCode:"
+ orbdProcess.exitValue());
}
static void executeRmiIiopClient() throws Exception {
System.out.println("RmiIiopReturnValueTest.executeRmiIiopClient: HelloClient.executeRmiClientCall");
try {
HelloClient.executeRmiClientCall();
} catch (Throwable t) {
clientException = t;
exceptionInClient = true;
}
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.Serializable;
public class Test implements Serializable {
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.Serializable;
public class Test2 implements Serializable {
private int testValue;
private String name;
private Test aTest;
public Test2 (String name, int value, Test test) {
this.name = name;
this.aTest = test;
this.testValue = value;
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.Serializable;
import java.util.List;
public class Test3 implements Serializable {
private List<Test> list;
public Test3(List<Test> list) {
this.list = list;
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.util.List;
public class Test4 extends Test3 {
private int aNumber = 1;
public Test4(List<Test> list) {
super(list);
}
/**
*
*/
private static final long serialVersionUID = 1L;
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Tie class generated by rmic, do not edit.
// Contents subject to change without notice.
import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import javax.rmi.CORBA.Tie;
import javax.rmi.CORBA.Util;
import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.UnknownException;
import org.omg.CORBA_2_3.portable.ObjectImpl;
public class _HelloImpl_Tie extends ObjectImpl implements Tie {
volatile private HelloImpl target = null;
private static final String[] _type_ids = {
"RMI:HelloInterface:0000000000000000"
};
public void setTarget(Remote target) {
this.target = (HelloImpl) target;
}
public Remote getTarget() {
return target;
}
public org.omg.CORBA.Object thisObject() {
return this;
}
public void deactivate() {
_orb().disconnect(this);
_set_delegate(null);
target = null;
}
public ORB orb() {
return _orb();
}
public void orb(ORB orb) {
orb.connect(this);
}
public String[] _ids() {
return (String[]) _type_ids.clone();
}
public OutputStream _invoke(String method, InputStream _in, ResponseHandler reply) throws SystemException {
try {
HelloImpl target = this.target;
if (target == null) {
throw new java.io.IOException();
}
org.omg.CORBA_2_3.portable.InputStream in =
(org.omg.CORBA_2_3.portable.InputStream) _in;
if (method.equals("sayHelloWithTest3")) {
Test3 arg0 = (Test3) in.read_value(Test3.class);
Test3 result = target.sayHelloWithTest3(arg0);
org.omg.CORBA_2_3.portable.OutputStream out =
(org.omg.CORBA_2_3.portable.OutputStream) reply.createReply();
out.write_value(result,Test3.class);
return out;
}
throw new BAD_OPERATION();
} catch (SystemException ex) {
throw ex;
} catch (Throwable ex) {
throw new UnknownException(ex);
}
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// Stub class generated by rmic, do not edit.
// Contents subject to change without notice.
import java.io.Serializable;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.rmi.UnexpectedException;
import javax.rmi.CORBA.Stub;
import javax.rmi.CORBA.Util;
import org.omg.CORBA.ORB;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.InputStream;
import org.omg.CORBA.portable.OutputStream;
import org.omg.CORBA.portable.RemarshalException;
import org.omg.CORBA.portable.ResponseHandler;
import org.omg.CORBA.portable.ServantObject;
public class _HelloInterface_Stub extends Stub implements HelloInterface {
private static final String[] _type_ids = {
"RMI:HelloInterface:0000000000000000"
};
public String[] _ids() {
return (String[]) _type_ids.clone();
}
public Test3 sayHelloWithTest3(Test3 arg0) throws java.rmi.RemoteException {
if (!Util.isLocal(this)) {
try {
org.omg.CORBA_2_3.portable.InputStream in = null;
try {
org.omg.CORBA_2_3.portable.OutputStream out =
(org.omg.CORBA_2_3.portable.OutputStream)
_request("sayHelloWithTest3", true);
out.write_value(arg0,Test3.class);
in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
return (Test3) in.read_value(Test3.class);
} catch (ApplicationException ex) {
in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
String $_id = in.read_string();
throw new UnexpectedException($_id);
} catch (RemarshalException ex) {
return sayHelloWithTest3(arg0);
} finally {
_releaseReply(in);
}
} catch (SystemException ex) {
throw Util.mapSystemException(ex);
}
} else {
ServantObject so = _servant_preinvoke("sayHelloWithTest3",HelloInterface.class);
if (so == null) {
return sayHelloWithTest3(arg0);
}
try {
Test3 arg0Copy = (Test3) Util.copyObject(arg0,_orb());
Test3 result = ((HelloInterface)so.servant).sayHelloWithTest3(arg0Copy);
return (Test3)Util.copyObject(result,_orb());
} catch (Throwable ex) {
Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
throw Util.wrapException(exCopy);
} finally {
_servant_postinvoke(so);
}
}
}
}
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
grant {
permission java.io.FilePermission "*", "read";
permission java.io.FilePermission "./-", "read,write,execute";
permission java.net.SocketPermission "*:*", "connect, accept, listen, resolve";
permission java.lang.RuntimePermission "accessClassInPackage.com.sun.corba.se.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.util";
permission java.io.SerializablePermission "enableSubclassImplementation";
permission java.util.PropertyPermission "*", "read, write";
permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute";
};
......@@ -28,7 +28,11 @@
* @library /lib/testlibrary
* @build jdk.testlibrary.*
* @build Test HelloInterface HelloServer HelloClient HelloImpl _HelloImpl_Tie _HelloInterface_Stub ConcurrentHashMapTest
* @run main/othervm -Djava.naming.provider.url=iiop://localhost:1050 -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory ConcurrentHashMapTest
* @run main/othervm -Djava.naming.provider.url=iiop://localhost:1050
* -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory ConcurrentHashMapTest
* @run main/othervm/secure=java.lang.SecurityManager/policy=jtreg.test.policy
* -Djava.naming.provider.url=iiop://localhost:1050
* -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory ConcurrentHashMapTest
*/
......
/*
* Copyright (c) 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
grant {
permission java.io.FilePermission "*", "read";
permission java.io.FilePermission "./-", "read,write,execute";
permission java.net.SocketPermission "*:*", "connect, accept, listen, resolve";
permission java.lang.RuntimePermission "accessClassInPackage.com.sun.corba.se.*";
permission java.lang.RuntimePermission "accessClassInPackage.sun.security.util";
permission java.io.SerializablePermission "enableSubclassImplementation";
permission java.util.PropertyPermission "*", "read, write";
permission java.io.FilePermission "<<ALL FILES>>", "read,write,execute";
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册