test/javax/rmi/ssl/SocketFactoryTest.java

Print this page
rev 9212 : 8034000: lack of /othervm option can cause some RMI tests to fail
Reviewed-by: XXX


   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4932837 6582235
  27  * @summary Test SslRMI[Client|Server]SocketFactory equals() and hashCode().


  28  * @author Daniel Fuchs
  29  *
  30  * @run main SocketFactoryTest
  31  */
  32 
  33 import java.io.PrintWriter;
  34 import java.io.IOException;
  35 import java.io.Serializable;
  36 import java.io.ObjectInputStream;
  37 import java.io.ObjectOutputStream;
  38 import java.io.ByteArrayInputStream;
  39 import java.io.ByteArrayOutputStream;
  40 import java.util.Map;
  41 import java.util.HashMap;
  42 import javax.net.ssl.SSLContext;
  43 import javax.rmi.ssl.SslRMIClientSocketFactory;
  44 import javax.rmi.ssl.SslRMIServerSocketFactory;
  45 
  46 public class SocketFactoryTest {
  47 




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4932837 6582235
  27  * @summary Test SslRMI[Client|Server]SocketFactory equals() and hashCode().
  28  *          This test does not affect VM global state, so othervm is
  29  *          not required.
  30  * @author Daniel Fuchs
  31  *
  32  * @run main SocketFactoryTest
  33  */
  34 
  35 import java.io.PrintWriter;
  36 import java.io.IOException;
  37 import java.io.Serializable;
  38 import java.io.ObjectInputStream;
  39 import java.io.ObjectOutputStream;
  40 import java.io.ByteArrayInputStream;
  41 import java.io.ByteArrayOutputStream;
  42 import java.util.Map;
  43 import java.util.HashMap;
  44 import javax.net.ssl.SSLContext;
  45 import javax.rmi.ssl.SslRMIClientSocketFactory;
  46 import javax.rmi.ssl.SslRMIServerSocketFactory;
  47 
  48 public class SocketFactoryTest {
  49