Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2022 Contributors to the Eclipse Foundation. All rights reserved.
* Copyright (c) 1997, 2020 Oracle and/or its affiliates.
* Copyright (c) 1998-1999 IBM Corp. All rights reserved.
*
Expand Down Expand Up @@ -34,7 +35,10 @@
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.Properties;
import java.util.HashMap;
import java.util.Random;
import java.util.Vector;
import java.util.concurrent.ConcurrentHashMap;
import org.glassfish.pfl.test.JUnitReportHelper;
import rmic.ObjectByValue;
import org.omg.CORBA.WStringValueHelper;
Expand Down Expand Up @@ -395,6 +399,18 @@ public void run()
ComplexTestObjectXXX xxx = new ComplexTestObjectXXX();
sos.write_value(xxx);

test( "writeRandom" );
Random random = new Random();
sos.write_value(random);

test( "writeHashMap" );
HashMap hmap = new HashMap();
sos.write_value(hmap);

test( "writeConcurrentHashMap" );
ConcurrentHashMap chmap = new ConcurrentHashMap();
sos.write_value(chmap);

//System.out.println("offset = " + ((com.sun.corba.ee.impl.encoding.CDROutputStream)sos).get_offset());
//System.out.println("countit = " + ((com.sun.corba.ee.impl.encoding.CDROutputStream)sos).countit);

Expand Down Expand Up @@ -733,6 +749,21 @@ public void run()
ComplexTestObjectXXX _xxx = (ComplexTestObjectXXX)sis.read_value();
if (!_xxx.equals(xxx))
throw new Error("Any test using xxx failed!");

test( "readRandom" );
Random _random = (Random)sis.read_value();
if (_random == null)
throw new Error("Random test using random failed!");

test( "readHashMap" );
HashMap _hmap = (HashMap)sis.read_value();
if (!_hmap.equals(hmap))
throw new Error("HashMap test using hmap failed!");

test( "readConcurrentHashMap" );
ConcurrentHashMap _chmap = (ConcurrentHashMap)sis.read_value();
if (!_chmap.equals(chmap))
throw new Error("ConcurrentHashMap test using chmap failed!");
} catch (Throwable e) {
helper.fail( e ) ;
status = new Error(e.getMessage());
Expand Down