Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
J. Duke committed Jul 5, 2017
2 parents 7abee88 + 17b3540 commit a42f12b
Show file tree
Hide file tree
Showing 224 changed files with 6,402 additions and 1,705 deletions.
1 change: 1 addition & 0 deletions .hgtags-top-repo
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,4 @@ d7f519b004254b19e384131d9f0d0e40e31a0fd3 jdk-9+137
67c4388142bdf58aec8fefa4475faaa8a5d7380c jdk-9+138
7dcf453eacae79ee86a6bcc75fd0b546fc99b48a jdk-9+139
a5815c6098a241d3a1df64d22b84b3524e4a77df jdk-9+140
f64afae7f1a5608e438585bbf0bc23785e69cba0 jdk-9+141
2 changes: 1 addition & 1 deletion common/autoconf/flags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ AC_DEFUN([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER],
elif test "x$OPENJDK_$1_OS" = xsolaris; then
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -DSOLARIS"
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -template=no%extdef -features=no%split_init \
-D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
-D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
elif test "x$OPENJDK_$1_OS" = xmacosx; then
$2COMMON_CCXXFLAGS_JDK="[$]$2COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
$2JVM_CFLAGS="[$]$2JVM_CFLAGS -D_ALLBSD_SOURCE"
Expand Down
6 changes: 3 additions & 3 deletions common/autoconf/generated-configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5093,7 +5093,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE

# Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1476275292
DATE_WHEN_GENERATED=1477108079

###############################################################################
#
Expand Down Expand Up @@ -50077,7 +50077,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
-D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
-D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
Expand Down Expand Up @@ -50892,7 +50892,7 @@ $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLA
elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
-D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
-D_Crun_inline_placement -library=%none -KPIC -mt -features=no%except"
elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
Expand Down
1 change: 1 addition & 0 deletions corba/.hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,4 @@ aa053a3faf266c12b4fd5272da431a3e08e4a3e3 jdk-9+136
27bb44be32076861a0951bcefb07a1d92509a4b6 jdk-9+138
8c9da7fc5b07c606afd571c7012441b77dda83b2 jdk-9+139
9f3fc931bc230f44f2a58d75f7f6360af98bb113 jdk-9+140
b32f998da32b488ec7c4e9dbb3c750841b48e74d jdk-9+141
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,24 @@

package com.sun.corba.se.impl.io;

import java.io.InputStream;
import java.io.IOException;
import java.io.StreamCorruptedException;
import java.io.ObjectInputValidation;
import java.io.NotActiveException;
import java.io.InvalidObjectException;
import java.io.InvalidClassException;
import java.io.DataInputStream;
import java.io.OptionalDataException;
import java.io.WriteAbortedException;
import java.io.Externalizable;
import java.io.EOFException;
import java.lang.reflect.*;
import java.util.Vector;
import java.util.Stack;
import java.util.Hashtable;
import java.util.Enumeration;

import sun.corba.Bridge ;

import java.security.AccessController ;
import java.security.PrivilegedAction ;

import com.sun.corba.se.impl.io.ObjectStreamClass;
import com.sun.corba.se.impl.util.Utility;

import org.omg.CORBA.portable.ValueInputStream;
Expand All @@ -71,14 +65,12 @@
import com.sun.org.omg.CORBA.ValueDefPackage.FullValueDescription;
import com.sun.org.omg.SendingContext.CodeBase;

import javax.rmi.PortableRemoteObject;
import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandler;

import java.security.*;
import java.util.*;

import com.sun.corba.se.impl.orbutil.ObjectUtility ;
import com.sun.corba.se.impl.logging.OMGSystemException ;
import com.sun.corba.se.impl.logging.UtilSystemException ;

Expand Down Expand Up @@ -182,75 +174,6 @@ public Object run() {

private byte streamFormatVersion;

// Since java.io.OptionalDataException's constructors are
// package private, but we need to throw it in some special
// cases, we try to do it by reflection.
private static final Constructor OPT_DATA_EXCEPTION_CTOR;

private Object[] readObjectArgList = { this } ;

static {
OPT_DATA_EXCEPTION_CTOR = getOptDataExceptionCtor();
}

// Grab the OptionalDataException boolean ctor and make
// it accessible. Note that any exceptions
// will be wrapped in ExceptionInInitializerErrors.
private static Constructor getOptDataExceptionCtor() {

try {

Constructor result =

(Constructor) AccessController.doPrivileged(
new PrivilegedExceptionAction() {
public java.lang.Object run()
throws NoSuchMethodException,
SecurityException {

Constructor boolCtor
= OptionalDataException.class.getDeclaredConstructor(
new Class[] {
Boolean.TYPE });

boolCtor.setAccessible(true);

return boolCtor;
}});

if (result == null)
// XXX I18N, logging needed.
throw new Error("Unable to find OptionalDataException constructor");

return result;

} catch (Exception ex) {
// XXX I18N, logging needed.
throw new ExceptionInInitializerError(ex);
}
}

// Create a new OptionalDataException with the EOF marker
// set to true. See handleOptionalDataMarshalException.
private OptionalDataException createOptionalDataException() {
try {
OptionalDataException result
= (OptionalDataException)
OPT_DATA_EXCEPTION_CTOR.newInstance(new Object[] {
Boolean.TRUE });

if (result == null)
// XXX I18N, logging needed.
throw new Error("Created null OptionalDataException");

return result;

} catch (Exception ex) {
// XXX I18N, logging needed.
throw new Error("Couldn't create OptionalDataException", ex);
}
}

// Return the stream format version currently being used
// to deserialize an object
protected byte getStreamFormatVersion() {
Expand Down Expand Up @@ -395,7 +318,6 @@ final synchronized Object simpleReadObject(Class clz,
int offset)
/* throws OptionalDataException, ClassNotFoundException, IOException */
{

/* Save the current state and get ready to read an object. */
Object prevObject = currentObject;
ObjectStreamClass prevClassDesc = currentClassDesc;
Expand Down Expand Up @@ -947,7 +869,7 @@ private void handleOptionalDataMarshalException(MARSHAL marshalException,
if (!objectRead)
result = new EOFException("No more optional data");
else
result = createOptionalDataException();
result = bridge.newOptionalDataExceptionForSerialization(true);

result.initCause(marshalException);

Expand Down Expand Up @@ -1230,8 +1152,7 @@ private synchronized Object inputObject(Class clz,

readObjectState.beginUnmarshalCustomValue(this,
calledDefaultWriteObject,
(currentClassDesc.readObjectMethod
!= null));
currentClassDesc.hasReadObject());
} else {
if (currentClassDesc.hasReadObject())
setState(IN_READ_OBJECT_REMOTE_NOT_CUSTOM_MARSHALED);
Expand Down Expand Up @@ -1556,8 +1477,7 @@ private synchronized Object inputObjectUsingFVD(Class clz,

readObjectState.beginUnmarshalCustomValue(this,
calledDefaultWriteObject,
(currentClassDesc.readObjectMethod
!= null));
currentClassDesc.hasReadObject());
}

boolean usedReadObject = false;
Expand Down Expand Up @@ -1714,13 +1634,8 @@ private boolean invokeObjectReader(ObjectStreamClass osc, Object obj, Class acla
throws InvalidClassException, StreamCorruptedException,
ClassNotFoundException, IOException
{
if (osc.readObjectMethod == null) {
return false;
}

try {
osc.readObjectMethod.invoke( obj, readObjectArgList ) ;
return true;
return osc.invokeReadObject( obj, this ) ;
} catch (InvocationTargetException e) {
Throwable t = e.getTargetException();
if (t instanceof ClassNotFoundException)
Expand All @@ -1734,8 +1649,6 @@ else if (t instanceof Error)
else
// XXX I18N, logging needed.
throw new Error("internal error");
} catch (IllegalAccessException e) {
return false;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,23 @@

package com.sun.corba.se.impl.io;

import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.portable.OutputStream;

import java.security.AccessController ;
import java.security.PrivilegedAction ;

import java.io.IOException;
import java.io.DataOutputStream;
import java.io.Serializable;
import java.io.InvalidClassException;
import java.io.StreamCorruptedException;
import java.io.Externalizable;
import java.io.ObjectStreamException;
import java.io.NotSerializableException;
import java.io.NotActiveException;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Field;

import java.util.Stack;

import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandlerMultiFormat;

import sun.corba.Bridge ;

import com.sun.corba.se.impl.io.ObjectStreamClass;
import com.sun.corba.se.impl.util.Utility;
import com.sun.corba.se.impl.util.RepositoryId;

Expand Down Expand Up @@ -621,7 +611,7 @@ private void invokeObjectWriter(ObjectStreamClass osc, Object obj)
writeObjectState.enterWriteObject(this);

// writeObject(obj, c, this);
osc.writeObjectMethod.invoke( obj, writeObjectArgList ) ;
osc.invokeWriteObject( obj, this ) ;

writeObjectState.exitWriteObject(this);

Expand All @@ -636,8 +626,6 @@ else if (t instanceof Error)
else
// XXX I18N, Logging needed.
throw new Error("invokeObjectWriter internal error",e);
} catch (IllegalAccessException e) {
// cannot happen
}
}

Expand Down Expand Up @@ -761,59 +749,52 @@ private void writeObjectField(ObjectStreamField field,
*/
private void outputClassFields(Object o, Class cl,
ObjectStreamField[] fields)
throws IOException, InvalidClassException {
throws IOException {

for (int i = 0; i < fields.length; i++) {
if (fields[i].getField() == null)
// XXX I18N, Logging needed.
throw new InvalidClassException(cl.getName(),
"Nonexistent field " + fields[i].getName());

try {
switch (fields[i].getTypeCode()) {
case 'B':
byte byteValue = fields[i].getField().getByte( o ) ;
orbStream.write_octet(byteValue);
break;
case 'C':
char charValue = fields[i].getField().getChar( o ) ;
orbStream.write_wchar(charValue);
break;
case 'F':
float floatValue = fields[i].getField().getFloat( o ) ;
orbStream.write_float(floatValue);
break;
case 'D' :
double doubleValue = fields[i].getField().getDouble( o ) ;
orbStream.write_double(doubleValue);
break;
case 'I':
int intValue = fields[i].getField().getInt( o ) ;
orbStream.write_long(intValue);
break;
case 'J':
long longValue = fields[i].getField().getLong( o ) ;
orbStream.write_longlong(longValue);
break;
case 'S':
short shortValue = fields[i].getField().getShort( o ) ;
orbStream.write_short(shortValue);
break;
case 'Z':
boolean booleanValue = fields[i].getField().getBoolean( o ) ;
orbStream.write_boolean(booleanValue);
break;
case '[':
case 'L':
Object objectValue = fields[i].getField().get( o ) ;
writeObjectField(fields[i], objectValue);
break;
default:
// XXX I18N, Logging needed.
throw new InvalidClassException(cl.getName());
}
} catch (IllegalAccessException exc) {
throw wrapper.illegalFieldAccess( exc, fields[i].getName() ) ;
switch (fields[i].getTypeCode()) {
case 'B':
byte byteValue = bridge.getByte(o, fields[i].getFieldID()) ;
orbStream.write_octet(byteValue);
break;
case 'C':
char charValue = bridge.getChar(o, fields[i].getFieldID()) ;
orbStream.write_wchar(charValue);
break;
case 'F':
float floatValue = bridge.getFloat(o, fields[i].getFieldID()) ;
orbStream.write_float(floatValue);
break;
case 'D' :
double doubleValue = bridge.getDouble(o, fields[i].getFieldID()) ;
orbStream.write_double(doubleValue);
break;
case 'I':
int intValue = bridge.getInt(o, fields[i].getFieldID()) ;
orbStream.write_long(intValue);
break;
case 'J':
long longValue = bridge.getLong(o, fields[i].getFieldID()) ;
orbStream.write_longlong(longValue);
break;
case 'S':
short shortValue = bridge.getShort(o, fields[i].getFieldID()) ;
orbStream.write_short(shortValue);
break;
case 'Z':
boolean booleanValue = bridge.getBoolean(o, fields[i].getFieldID()) ;
orbStream.write_boolean(booleanValue);
break;
case '[':
case 'L':
Object objectValue = bridge.getObject(o, fields[i].getFieldID()) ;
writeObjectField(fields[i], objectValue);
break;
default:
throw new InvalidClassException(cl.getName());
}
}
}
Expand Down
Loading

0 comments on commit a42f12b

Please sign in to comment.