提交 8a858b96 编写于 作者: L lana

Merge

^build/ ^build/
^dist/ ^dist/
^testoutput/
/nbproject/private/ /nbproject/private/
^make/netbeans/.*/build/ ^make/netbeans/.*/build/
^make/netbeans/.*/dist/ ^make/netbeans/.*/dist/
......
...@@ -103,6 +103,7 @@ SUNWprivate_1.1 { ...@@ -103,6 +103,7 @@ SUNWprivate_1.1 {
Java_sun_management_VMManagementImpl_getSafepointCount; Java_sun_management_VMManagementImpl_getSafepointCount;
Java_sun_management_VMManagementImpl_getSafepointSyncTime; Java_sun_management_VMManagementImpl_getSafepointSyncTime;
Java_sun_management_VMManagementImpl_getStartupTime; Java_sun_management_VMManagementImpl_getStartupTime;
Java_sun_management_VMManagementImpl_getUptime0;
Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime; Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime;
Java_sun_management_VMManagementImpl_getTotalClassCount; Java_sun_management_VMManagementImpl_getTotalClassCount;
Java_sun_management_VMManagementImpl_getTotalCompileTime; Java_sun_management_VMManagementImpl_getTotalCompileTime;
......
此差异已折叠。
此差异已折叠。
...@@ -115,7 +115,6 @@ BUILD_LIBRARIES += $(BUILD_LIBVERIFY) ...@@ -115,7 +115,6 @@ BUILD_LIBRARIES += $(BUILD_LIBVERIFY)
LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \ LIBJAVA_SRC_DIRS := $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang \ $(JDK_TOPDIR)/src/share/native/java/lang \
$(JDK_TOPDIR)/src/share/native/java/lang/ref \
$(JDK_TOPDIR)/src/share/native/java/lang/reflect \ $(JDK_TOPDIR)/src/share/native/java/lang/reflect \
$(JDK_TOPDIR)/src/share/native/java/io \ $(JDK_TOPDIR)/src/share/native/java/io \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/java/io \
......
...@@ -275,19 +275,12 @@ BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT) ...@@ -275,19 +275,12 @@ BUILD_LIBRARIES += $(BUILD_LIBINSTRUMENT)
########################################################################################## ##########################################################################################
BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \ BUILD_LIBMANAGEMENT_SRC := $(JDK_TOPDIR)/src/share/native/sun/management \
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management \ $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/management
$(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/com/sun/management
BUILD_LIBMANAGEMENT_EXCLUDES := BUILD_LIBMANAGEMENT_EXCLUDES :=
BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management BUILD_LIBMANAGEMENT_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/management
ifneq ($(OPENJDK_TARGET_OS), windows)
BUILD_LIBMANAGEMENT_EXCLUDES += OperatingSystem_md.c
else
BUILD_LIBMANAGEMENT_EXCLUDES += UnixOperatingSystem_md.c
endif
ifneq ($(OPENJDK_TARGET_OS), solaris) ifneq ($(OPENJDK_TARGET_OS), solaris)
BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c BUILD_LIBMANAGEMENT_EXCLUDES += SolarisOperatingSystem.c
endif endif
......
...@@ -140,7 +140,6 @@ SUNWprivate_1.1 { ...@@ -140,7 +140,6 @@ SUNWprivate_1.1 {
Java_java_lang_Double_doubleToRawLongBits; Java_java_lang_Double_doubleToRawLongBits;
Java_java_lang_reflect_Proxy_defineClass0; Java_java_lang_reflect_Proxy_defineClass0;
Java_java_lang_Shutdown_runAllFinalizers; Java_java_lang_Shutdown_runAllFinalizers;
Java_java_lang_ref_Finalizer_invokeFinalizeMethod;
Java_java_lang_Float_intBitsToFloat; Java_java_lang_Float_intBitsToFloat;
Java_java_lang_Float_floatToRawIntBits; Java_java_lang_Float_floatToRawIntBits;
Java_java_lang_StrictMath_IEEEremainder; Java_java_lang_StrictMath_IEEEremainder;
......
...@@ -88,7 +88,6 @@ text: .text%Java_java_lang_Throwable_getStackTraceElement; ...@@ -88,7 +88,6 @@ text: .text%Java_java_lang_Throwable_getStackTraceElement;
text: .text%throwFileNotFoundException; text: .text%throwFileNotFoundException;
text: .text%JNU_NotifyAll; text: .text%JNU_NotifyAll;
# Test LoadFrame # Test LoadFrame
text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod;
text: .text%JNU_CallMethodByName; text: .text%JNU_CallMethodByName;
text: .text%JNU_CallMethodByNameV; text: .text%JNU_CallMethodByNameV;
text: .text%Java_java_io_UnixFileSystem_createDirectory; text: .text%Java_java_io_UnixFileSystem_createDirectory;
......
...@@ -78,7 +78,6 @@ text: .text%writeBytes; ...@@ -78,7 +78,6 @@ text: .text%writeBytes;
text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2; text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2Ljava_security_AccessControlContext_2;
text: .text%JNU_GetEnv; text: .text%JNU_GetEnv;
text: .text%Java_java_io_UnixFileSystem_checkAccess; text: .text%Java_java_io_UnixFileSystem_checkAccess;
text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod;
text: .text%Java_java_lang_reflect_Array_newArray; text: .text%Java_java_lang_reflect_Array_newArray;
text: .text%Java_java_lang_Throwable_getStackTraceDepth; text: .text%Java_java_lang_Throwable_getStackTraceDepth;
text: .text%Java_java_lang_Throwable_getStackTraceElement; text: .text%Java_java_lang_Throwable_getStackTraceElement;
......
...@@ -78,7 +78,6 @@ text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_Pri ...@@ -78,7 +78,6 @@ text: .text%Java_java_security_AccessController_doPrivileged__Ljava_security_Pri
text: .text%JNU_GetEnv; text: .text%JNU_GetEnv;
text: .text%Java_java_io_UnixFileSystem_checkAccess; text: .text%Java_java_io_UnixFileSystem_checkAccess;
text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0; text: .text%Java_sun_reflect_NativeMethodAccessorImpl_invoke0;
text: .text%Java_java_lang_ref_Finalizer_invokeFinalizeMethod;
text: .text%Java_java_io_FileInputStream_available; text: .text%Java_java_io_FileInputStream_available;
text: .text%Java_java_lang_reflect_Array_newArray; text: .text%Java_java_lang_reflect_Array_newArray;
text: .text%Java_java_lang_Throwable_getStackTraceDepth; text: .text%Java_java_lang_Throwable_getStackTraceDepth;
......
...@@ -27,17 +27,17 @@ ...@@ -27,17 +27,17 @@
SUNWprivate_1.1 { SUNWprivate_1.1 {
global: global:
Java_com_sun_management_UnixOperatingSystem_getCommittedVirtualMemorySize; Java_sun_management_OperatingSystemImpl_getCommittedVirtualMemorySize;
Java_com_sun_management_UnixOperatingSystem_getFreePhysicalMemorySize; Java_sun_management_OperatingSystemImpl_getFreePhysicalMemorySize;
Java_com_sun_management_UnixOperatingSystem_getFreeSwapSpaceSize; Java_sun_management_OperatingSystemImpl_getFreeSwapSpaceSize;
Java_com_sun_management_UnixOperatingSystem_getMaxFileDescriptorCount; Java_sun_management_OperatingSystemImpl_getMaxFileDescriptorCount;
Java_com_sun_management_UnixOperatingSystem_getOpenFileDescriptorCount; Java_sun_management_OperatingSystemImpl_getOpenFileDescriptorCount;
Java_com_sun_management_UnixOperatingSystem_getProcessCpuLoad; Java_sun_management_OperatingSystemImpl_getProcessCpuLoad;
Java_com_sun_management_UnixOperatingSystem_getProcessCpuTime; Java_sun_management_OperatingSystemImpl_getProcessCpuTime;
Java_com_sun_management_UnixOperatingSystem_getSystemCpuLoad; Java_sun_management_OperatingSystemImpl_getSystemCpuLoad;
Java_com_sun_management_UnixOperatingSystem_getTotalPhysicalMemorySize; Java_sun_management_OperatingSystemImpl_getTotalPhysicalMemorySize;
Java_com_sun_management_UnixOperatingSystem_getTotalSwapSpaceSize; Java_sun_management_OperatingSystemImpl_getTotalSwapSpaceSize;
Java_com_sun_management_UnixOperatingSystem_initialize; Java_sun_management_OperatingSystemImpl_initialize;
Java_sun_management_ClassLoadingImpl_setVerboseClass; Java_sun_management_ClassLoadingImpl_setVerboseClass;
Java_sun_management_DiagnosticCommandImpl_executeDiagnosticCommand; Java_sun_management_DiagnosticCommandImpl_executeDiagnosticCommand;
Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommands; Java_sun_management_DiagnosticCommandImpl_getDiagnosticCommands;
...@@ -103,6 +103,7 @@ SUNWprivate_1.1 { ...@@ -103,6 +103,7 @@ SUNWprivate_1.1 {
Java_sun_management_VMManagementImpl_getSafepointCount; Java_sun_management_VMManagementImpl_getSafepointCount;
Java_sun_management_VMManagementImpl_getSafepointSyncTime; Java_sun_management_VMManagementImpl_getSafepointSyncTime;
Java_sun_management_VMManagementImpl_getStartupTime; Java_sun_management_VMManagementImpl_getStartupTime;
Java_sun_management_VMManagementImpl_getUptime0;
Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime; Java_sun_management_VMManagementImpl_getTotalApplicationNonStoppedTime;
Java_sun_management_VMManagementImpl_getTotalClassCount; Java_sun_management_VMManagementImpl_getTotalClassCount;
Java_sun_management_VMManagementImpl_getTotalCompileTime; Java_sun_management_VMManagementImpl_getTotalCompileTime;
......
...@@ -541,7 +541,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern ...@@ -541,7 +541,7 @@ public class CachedRowSetImpl extends BaseRowSet implements RowSet, RowSetIntern
if (rowSetWriter != null) { if (rowSetWriter != null) {
Class<?> c = rowSetWriter.getClass(); Class<?> c = rowSetWriter.getClass();
if (c != null) { if (c != null) {
Class[] theInterfaces = c.getInterfaces(); Class<?>[] theInterfaces = c.getInterfaces();
for (int i = 0; i < theInterfaces.length; i++) { for (int i = 0; i < theInterfaces.length; i++) {
if ((theInterfaces[i].getName()).indexOf("TransactionalWriter") > 0) { if ((theInterfaces[i].getName()).indexOf("TransactionalWriter") > 0) {
tXWriter = true; tXWriter = true;
......
...@@ -51,6 +51,11 @@ import java.util.Arrays; ...@@ -51,6 +51,11 @@ import java.util.Arrays;
*/ */
public abstract class BaseRow implements Serializable, Cloneable { public abstract class BaseRow implements Serializable, Cloneable {
/**
* Specify the serialVersionUID
*/
private static final long serialVersionUID = 4152013523511412238L;
/** /**
* The array containing the original values for this <code>BaseRow</code> * The array containing the original values for this <code>BaseRow</code>
* object. * object.
...@@ -77,7 +82,7 @@ public abstract class BaseRow implements Serializable, Cloneable { ...@@ -77,7 +82,7 @@ public abstract class BaseRow implements Serializable, Cloneable {
* @param idx the index of the element to return * @param idx the index of the element to return
* @return the <code>Object</code> value at the given index into this * @return the <code>Object</code> value at the given index into this
* row's array of original values * row's array of original values
* @throws <code>SQLException</code> if there is an error * @throws SQLException if there is an error
*/ */
public abstract Object getColumnObject(int idx) throws SQLException; public abstract Object getColumnObject(int idx) throws SQLException;
...@@ -90,7 +95,7 @@ public abstract class BaseRow implements Serializable, Cloneable { ...@@ -90,7 +95,7 @@ public abstract class BaseRow implements Serializable, Cloneable {
* @param idx the index of the element to be set * @param idx the index of the element to be set
* @param obj the <code>Object</code> to which the element at index * @param obj the <code>Object</code> to which the element at index
* <code>idx</code> to be set * <code>idx</code> to be set
* @throws <code>SQLException</code> if there is an error * @throws SQLException if there is an error
*/ */
public abstract void setColumnObject(int idx, Object obj) throws SQLException; public abstract void setColumnObject(int idx, Object obj) throws SQLException;
} }
...@@ -444,7 +444,7 @@ interface DataInput { ...@@ -444,7 +444,7 @@ interface DataInput {
* a {@code double} value. It does this * a {@code double} value. It does this
* by first constructing a {@code long} * by first constructing a {@code long}
* value in exactly the manner * value in exactly the manner
* of the {@code readlong} * of the {@code readLong}
* method, then converting this {@code long} * method, then converting this {@code long}
* value to a {@code double} in exactly * value to a {@code double} in exactly
* the manner of the method {@code Double.longBitsToDouble}. * the manner of the method {@code Double.longBitsToDouble}.
......
...@@ -1248,7 +1248,7 @@ public class ObjectOutputStream ...@@ -1248,7 +1248,7 @@ public class ObjectOutputStream
handles.assign(unshared ? null : desc); handles.assign(unshared ? null : desc);
Class<?> cl = desc.forClass(); Class<?> cl = desc.forClass();
Class[] ifaces = cl.getInterfaces(); Class<?>[] ifaces = cl.getInterfaces();
bout.writeInt(ifaces.length); bout.writeInt(ifaces.length);
for (int i = 0; i < ifaces.length; i++) { for (int i = 0; i < ifaces.length; i++) {
bout.writeUTF(ifaces[i].getName()); bout.writeUTF(ifaces[i].getName());
......
/* /*
* Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1996, 2013, 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
...@@ -1746,7 +1746,7 @@ public class ObjectStreamClass implements Serializable { ...@@ -1746,7 +1746,7 @@ public class ObjectStreamClass implements Serializable {
dout.writeUTF("()V"); dout.writeUTF("()V");
} }
Constructor[] cons = cl.getDeclaredConstructors(); Constructor<?>[] cons = cl.getDeclaredConstructors();
MemberSignature[] consSigs = new MemberSignature[cons.length]; MemberSignature[] consSigs = new MemberSignature[cons.length];
for (int i = 0; i < cons.length; i++) { for (int i = 0; i < cons.length; i++) {
consSigs[i] = new MemberSignature(cons[i]); consSigs[i] = new MemberSignature(cons[i]);
......
...@@ -122,14 +122,9 @@ public final class String ...@@ -122,14 +122,9 @@ public final class String
/** /**
* Class String is special cased within the Serialization Stream Protocol. * Class String is special cased within the Serialization Stream Protocol.
* *
* A String instance is written initially into an ObjectOutputStream in the * A String instance is written into an ObjectOutputStream according to
* following format: * <a href="{@docroot}../platform/serialization/spec/output.html">
* <pre> * Object Serialization Specification, Section 6.2, "Stream Elements"</a>
* {@code TC_STRING} (utf String)
* </pre>
* The String is written by method {@code DataOutput.writeUTF}.
* A new handle is generated to refer to all future references to the
* string instance within the stream.
*/ */
private static final ObjectStreamField[] serialPersistentFields = private static final ObjectStreamField[] serialPersistentFields =
new ObjectStreamField[0]; new ObjectStreamField[0];
...@@ -2242,6 +2237,11 @@ public final class String ...@@ -2242,6 +2237,11 @@ public final class String
* expression does not match any part of the input then the resulting array * expression does not match any part of the input then the resulting array
* has just one element, namely this string. * has just one element, namely this string.
* *
* <p> When there is a positive-width match at the beginning of this
* string then an empty leading substring is included at the beginning
* of the resulting array. A zero-width match at the beginning however
* never produces such empty leading substring.
*
* <p> The {@code limit} parameter controls the number of times the * <p> The {@code limit} parameter controls the number of times the
* pattern is applied and therefore affects the length of the resulting * pattern is applied and therefore affects the length of the resulting
* array. If the limit <i>n</i> is greater than zero then the pattern * array. If the limit <i>n</i> is greater than zero then the pattern
......
...@@ -1263,6 +1263,9 @@ public final class System { ...@@ -1263,6 +1263,9 @@ public final class System {
public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) { public Thread newThreadWithAcc(Runnable target, AccessControlContext acc) {
return new Thread(target, acc); return new Thread(target, acc);
} }
public void invokeFinalize(Object o) throws Throwable {
o.finalize();
}
}); });
} }
} }
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, 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
...@@ -51,7 +51,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; ...@@ -51,7 +51,7 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
/* package */ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory { /* package */ final class InnerClassLambdaMetafactory extends AbstractValidatingLambdaMetafactory {
private static final Unsafe UNSAFE = Unsafe.getUnsafe(); private static final Unsafe UNSAFE = Unsafe.getUnsafe();
private static final int CLASSFILE_VERSION = 51; private static final int CLASSFILE_VERSION = 52;
private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE); private static final String METHOD_DESCRIPTOR_VOID = Type.getMethodDescriptor(Type.VOID_TYPE);
private static final String JAVA_LANG_OBJECT = "java/lang/Object"; private static final String JAVA_LANG_OBJECT = "java/lang/Object";
private static final String NAME_CTOR = "<init>"; private static final String NAME_CTOR = "<init>";
...@@ -465,7 +465,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*; ...@@ -465,7 +465,9 @@ import static jdk.internal.org.objectweb.asm.Opcodes.*;
convertArgumentTypes(methodType); convertArgumentTypes(methodType);
// Invoke the method we want to forward to // Invoke the method we want to forward to
visitMethodInsn(invocationOpcode(), implMethodClassName, implMethodName, implMethodDesc); visitMethodInsn(invocationOpcode(), implMethodClassName,
implMethodName, implMethodDesc,
implDefiningClass.isInterface());
// Convert the return value (if any) and return it // Convert the return value (if any) and return it
// Note: if adapting from non-void to void, the 'return' // Note: if adapting from non-void to void, the 'return'
......
...@@ -275,7 +275,7 @@ class InvokerBytecodeGenerator { ...@@ -275,7 +275,7 @@ class InvokerBytecodeGenerator {
*/ */
private void classFilePrologue() { private void classFilePrologue() {
cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES); cw = new ClassWriter(ClassWriter.COMPUTE_MAXS + ClassWriter.COMPUTE_FRAMES);
cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, className, null, superName, null); cw.visit(Opcodes.V1_8, Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL + Opcodes.ACC_SUPER, className, null, superName, null);
cw.visitSource(sourceFile, null); cw.visitSource(sourceFile, null);
String invokerDesc = invokerType.toMethodDescriptorString(); String invokerDesc = invokerType.toMethodDescriptorString();
...@@ -646,7 +646,8 @@ class InvokerBytecodeGenerator { ...@@ -646,7 +646,8 @@ class InvokerBytecodeGenerator {
// invocation // invocation
if (member.isMethod()) { if (member.isMethod()) {
mtype = member.getMethodType().toMethodDescriptorString(); mtype = member.getMethodType().toMethodDescriptorString();
mv.visitMethodInsn(refKindOpcode(refKind), cname, mname, mtype); mv.visitMethodInsn(refKindOpcode(refKind), cname, mname, mtype,
member.getDeclaringClass().isInterface());
} else { } else {
mtype = MethodType.toFieldDescriptorString(member.getFieldType()); mtype = MethodType.toFieldDescriptorString(member.getFieldType());
mv.visitFieldInsn(refKindOpcode(refKind), cname, mname, mtype); mv.visitFieldInsn(refKindOpcode(refKind), cname, mname, mtype);
......
...@@ -744,8 +744,11 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP; ...@@ -744,8 +744,11 @@ import static java.lang.invoke.MethodHandles.Lookup.IMPL_LOOKUP;
MethodHandle ginvoker = GuardWithCatch.INVOKES[nargs].bindReceiver(gguard); MethodHandle ginvoker = GuardWithCatch.INVOKES[nargs].bindReceiver(gguard);
return makePairwiseConvert(ginvoker, type, 2); return makePairwiseConvert(ginvoker, type, 2);
} else { } else {
target = target.asType(type.changeReturnType(Object.class));
MethodHandle gtarget = makeSpreadArguments(target, Object[].class, 0, nargs); MethodHandle gtarget = makeSpreadArguments(target, Object[].class, 0, nargs);
catcher = catcher.asType(ctype.changeParameterType(0, Throwable.class)); MethodType catcherType = ctype.changeParameterType(0, Throwable.class)
.changeReturnType(Object.class);
catcher = catcher.asType(catcherType);
MethodHandle gcatcher = makeSpreadArguments(catcher, Object[].class, 1, nargs); MethodHandle gcatcher = makeSpreadArguments(catcher, Object[].class, 1, nargs);
GuardWithCatch gguard = new GuardWithCatch(gtarget, exType, gcatcher); GuardWithCatch gguard = new GuardWithCatch(gtarget, exType, gcatcher);
if (gtarget == null || gcatcher == null) throw new InternalError(); if (gtarget == null || gcatcher == null) throw new InternalError();
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, 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
...@@ -35,7 +35,7 @@ import static sun.invoke.util.Wrapper.*; ...@@ -35,7 +35,7 @@ import static sun.invoke.util.Wrapper.*;
class TypeConvertingMethodAdapter extends MethodVisitor { class TypeConvertingMethodAdapter extends MethodVisitor {
TypeConvertingMethodAdapter(MethodVisitor mv) { TypeConvertingMethodAdapter(MethodVisitor mv) {
super(Opcodes.ASM4, mv); super(Opcodes.ASM5, mv);
} }
private static final int NUM_WRAPPERS = Wrapper.values().length; private static final int NUM_WRAPPERS = Wrapper.values().length;
......
...@@ -240,6 +240,7 @@ public abstract class Executable extends AccessibleObject ...@@ -240,6 +240,7 @@ public abstract class Executable extends AccessibleObject
* declared or implicitly declared or neither) for the executable * declared or implicitly declared or neither) for the executable
* represented by this object. * represented by this object.
* *
* @since 1.8
* @return The number of formal parameters for the executable this * @return The number of formal parameters for the executable this
* object represents * object represents
*/ */
...@@ -290,6 +291,7 @@ public abstract class Executable extends AccessibleObject ...@@ -290,6 +291,7 @@ public abstract class Executable extends AccessibleObject
* have unique names, or names that are legal identifiers in the * have unique names, or names that are legal identifiers in the
* Java programming language (JLS 3.8). * Java programming language (JLS 3.8).
* *
* @since 1.8
* @throws MalformedParametersException if the class file contains * @throws MalformedParametersException if the class file contains
* a MethodParameters attribute that is improperly formatted. * a MethodParameters attribute that is improperly formatted.
* @return an array of {@code Parameter} objects representing all * @return an array of {@code Parameter} objects representing all
......
/* /*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1999, 2013, 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
...@@ -494,9 +494,10 @@ public class Proxy implements java.io.Serializable { ...@@ -494,9 +494,10 @@ public class Proxy implements java.io.Serializable {
private final int hash; private final int hash;
private final WeakReference<Class<?>>[] refs; private final WeakReference<Class<?>>[] refs;
@SuppressWarnings("unchecked")
KeyX(Class<?>[] interfaces) { KeyX(Class<?>[] interfaces) {
hash = Arrays.hashCode(interfaces); hash = Arrays.hashCode(interfaces);
refs = new WeakReference[interfaces.length]; refs = (WeakReference<Class<?>>[])new WeakReference<?>[interfaces.length];
for (int i = 0; i < interfaces.length; i++) { for (int i = 0; i < interfaces.length; i++) {
refs[i] = new WeakReference<>(interfaces[i]); refs[i] = new WeakReference<>(interfaces[i]);
} }
......
...@@ -426,7 +426,10 @@ public final class URLPermission extends Permission { ...@@ -426,7 +426,10 @@ public final class URLPermission extends Permission {
this.ssp = url.substring(delim + 1); this.ssp = url.substring(delim + 1);
if (!ssp.startsWith("//")) { if (!ssp.startsWith("//")) {
this.authority = new Authority(scheme, ssp.toLowerCase()); if (!ssp.equals("*")) {
throw new IllegalArgumentException("invalid URL string");
}
this.authority = new Authority(scheme, "*");
return; return;
} }
String authpath = ssp.substring(2); String authpath = ssp.substring(2);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册