mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 16:44:36 +02:00
8068721: RMI-IIOP communication fails when ConcurrentHashMap is passed to remote method
Reviewed-by: chegar, alanb
This commit is contained in:
parent
ec05163d91
commit
5d1e4e2ba1
2 changed files with 43 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -1768,43 +1768,59 @@ public class IIOPInputStream
|
||||||
switch (field.getTypeCode()) {
|
switch (field.getTypeCode()) {
|
||||||
case 'B':
|
case 'B':
|
||||||
byte byteValue = orbStream.read_octet();
|
byte byteValue = orbStream.read_octet();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putByte( o, field.getFieldID(), byteValue ) ;
|
bridge.putByte( o, field.getFieldID(), byteValue ) ;
|
||||||
//reflective code: field.getField().setByte( o, byteValue ) ;
|
//reflective code: field.getField().setByte( o, byteValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'Z':
|
case 'Z':
|
||||||
boolean booleanValue = orbStream.read_boolean();
|
boolean booleanValue = orbStream.read_boolean();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putBoolean( o, field.getFieldID(), booleanValue ) ;
|
bridge.putBoolean( o, field.getFieldID(), booleanValue ) ;
|
||||||
//reflective code: field.getField().setBoolean( o, booleanValue ) ;
|
//reflective code: field.getField().setBoolean( o, booleanValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
char charValue = orbStream.read_wchar();
|
char charValue = orbStream.read_wchar();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putChar( o, field.getFieldID(), charValue ) ;
|
bridge.putChar( o, field.getFieldID(), charValue ) ;
|
||||||
//reflective code: field.getField().setChar( o, charValue ) ;
|
//reflective code: field.getField().setChar( o, charValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'S':
|
case 'S':
|
||||||
short shortValue = orbStream.read_short();
|
short shortValue = orbStream.read_short();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putShort( o, field.getFieldID(), shortValue ) ;
|
bridge.putShort( o, field.getFieldID(), shortValue ) ;
|
||||||
//reflective code: field.getField().setShort( o, shortValue ) ;
|
//reflective code: field.getField().setShort( o, shortValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'I':
|
case 'I':
|
||||||
int intValue = orbStream.read_long();
|
int intValue = orbStream.read_long();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putInt( o, field.getFieldID(), intValue ) ;
|
bridge.putInt( o, field.getFieldID(), intValue ) ;
|
||||||
//reflective code: field.getField().setInt( o, intValue ) ;
|
//reflective code: field.getField().setInt( o, intValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'J':
|
case 'J':
|
||||||
long longValue = orbStream.read_longlong();
|
long longValue = orbStream.read_longlong();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putLong( o, field.getFieldID(), longValue ) ;
|
bridge.putLong( o, field.getFieldID(), longValue ) ;
|
||||||
//reflective code: field.getField().setLong( o, longValue ) ;
|
//reflective code: field.getField().setLong( o, longValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'F' :
|
case 'F' :
|
||||||
float floatValue = orbStream.read_float();
|
float floatValue = orbStream.read_float();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putFloat( o, field.getFieldID(), floatValue ) ;
|
bridge.putFloat( o, field.getFieldID(), floatValue ) ;
|
||||||
//reflective code: field.getField().setFloat( o, floatValue ) ;
|
//reflective code: field.getField().setFloat( o, floatValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'D' :
|
case 'D' :
|
||||||
double doubleValue = orbStream.read_double();
|
double doubleValue = orbStream.read_double();
|
||||||
|
if (field.getField() != null) {
|
||||||
bridge.putDouble( o, field.getFieldID(), doubleValue ) ;
|
bridge.putDouble( o, field.getFieldID(), doubleValue ) ;
|
||||||
//reflective code: field.getField().setDouble( o, doubleValue ) ;
|
//reflective code: field.getField().setDouble( o, doubleValue ) ;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// XXX I18N, logging needed.
|
// XXX I18N, logging needed.
|
||||||
|
@ -2217,9 +2233,6 @@ public class IIOPInputStream
|
||||||
|
|
||||||
if (o != null) {
|
if (o != null) {
|
||||||
for (int i = 0; i < primFields; ++i) {
|
for (int i = 0; i < primFields; ++i) {
|
||||||
if (fields[i].getField() == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
inputPrimitiveField(o, cl, fields[i]);
|
inputPrimitiveField(o, cl, fields[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
package com.sun.corba.se.impl.io;
|
package com.sun.corba.se.impl.io;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.NotActiveException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.ObjectOutputStream;
|
import java.io.ObjectOutputStream;
|
||||||
import java.io.ObjectOutput;
|
import java.io.ObjectOutput;
|
||||||
|
@ -154,7 +155,9 @@ public abstract class OutputStreamHook extends ObjectOutputStream
|
||||||
|
|
||||||
public ObjectOutputStream.PutField putFields()
|
public ObjectOutputStream.PutField putFields()
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if (putFields == null) {
|
||||||
putFields = new HookPutFields();
|
putFields = new HookPutFields();
|
||||||
|
}
|
||||||
return putFields;
|
return putFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,8 +178,11 @@ public abstract class OutputStreamHook extends ObjectOutputStream
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
|
||||||
writeObjectState.defaultWriteObject(this);
|
writeObjectState.defaultWriteObject(this);
|
||||||
|
if (putFields != null) {
|
||||||
putFields.write(this);
|
putFields.write(this);
|
||||||
|
} else {
|
||||||
|
throw new NotActiveException("no current PutField object");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract org.omg.CORBA_2_3.portable.OutputStream getOrbStream();
|
abstract org.omg.CORBA_2_3.portable.OutputStream getOrbStream();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue