jdk/src/java.rmi/share/classes/sun/rmi/server/UnicastServerRef.java
changeset 45984 75fef64e21fa
parent 41231 3f8807f6fec3
child 45989 e4f526fd8e09
equal deleted inserted replaced
45983:4bcee8b28e89 45984:75fef64e21fa
     1 /*
     1 /*
     2  * Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    55 import java.util.Map;
    55 import java.util.Map;
    56 import java.util.WeakHashMap;
    56 import java.util.WeakHashMap;
    57 import java.util.concurrent.atomic.AtomicInteger;
    57 import java.util.concurrent.atomic.AtomicInteger;
    58 import sun.rmi.runtime.Log;
    58 import sun.rmi.runtime.Log;
    59 import sun.rmi.transport.LiveRef;
    59 import sun.rmi.transport.LiveRef;
       
    60 import sun.rmi.transport.StreamRemoteCall;
    60 import sun.rmi.transport.Target;
    61 import sun.rmi.transport.Target;
    61 import sun.rmi.transport.tcp.TCPTransport;
    62 import sun.rmi.transport.tcp.TCPTransport;
    62 
    63 
    63 /**
    64 /**
    64  * UnicastServerRef implements the remote reference layer server-side
    65  * UnicastServerRef implements the remote reference layer server-side
   326             Object[] params = null;
   327             Object[] params = null;
   327 
   328 
   328             try {
   329             try {
   329                 unmarshalCustomCallData(in);
   330                 unmarshalCustomCallData(in);
   330                 params = unmarshalParameters(obj, method, marshalStream);
   331                 params = unmarshalParameters(obj, method, marshalStream);
   331             } catch (java.io.IOException e) {
   332             } catch (java.io.IOException | ClassNotFoundException e) {
   332                 throw new UnmarshalException(
   333                 // disable saving any refs in the inputStream for GC
   333                     "error unmarshalling arguments", e);
   334                 ((StreamRemoteCall) call).discardPendingRefs();
   334             } catch (ClassNotFoundException e) {
       
   335                 throw new UnmarshalException(
   335                 throw new UnmarshalException(
   336                     "error unmarshalling arguments", e);
   336                     "error unmarshalling arguments", e);
   337             } finally {
   337             } finally {
   338                 call.releaseInputStream();
   338                 call.releaseInputStream();
   339             }
   339             }