提交 c67831ac 编写于 作者: C chegar

7104209: Cleanup and remove librmi (native library)

Reviewed-by: mduigou, alanb
上级 b5a25ea5
......@@ -90,7 +90,6 @@ SUNWprivate_1.1 {
Java_java_io_FileSystem_getFileSystem;
Java_java_io_ObjectInputStream_bytesToDoubles;
Java_java_io_ObjectInputStream_bytesToFloats;
Java_java_io_ObjectInputStream_latestUserDefinedLoader;
Java_java_io_ObjectOutputStream_doublesToBytes;
Java_java_io_ObjectOutputStream_floatsToBytes;
Java_java_io_ObjectStreamClass_hasStaticInitializer;
......@@ -275,6 +274,7 @@ SUNWprivate_1.1 {
Java_sun_misc_Version_getJvmVersionInfo;
Java_sun_misc_Version_getJvmSpecialVersion;
Java_sun_misc_VM_getThreadStateValues;
Java_sun_misc_VM_latestUserDefinedLoader;
Java_sun_misc_VM_initialize;
Java_sun_misc_VMSupport_initAgentProperties;
......
......@@ -30,15 +30,8 @@
BUILDDIR = ../../..
PACKAGE = sun.rmi
PRODUCT = sun
LIBRARY = rmi
include $(BUILDDIR)/common/Defs.gmk
#
# Add use of a mapfile
#
FILES_m = mapfile-vers
include $(BUILDDIR)/common/Mapfile-vers.gmk
#
# Java files to compile.
#
......@@ -51,32 +44,10 @@ AUTO_FILES_JAVA_DIRS = \
sun/rmi/transport \
com/sun/rmi
#
# Native files to compile.
#
FILES_c = \
sun/rmi/server/MarshalInputStream.c
#
# Add ambient vpath to pick up files not part of sun.rmi package
#
vpath %.c $(SHARE_SRC)/native/sun/rmi/server
#
# Exported files that require generated .h
#
FILES_export = \
sun/rmi/server/MarshalInputStream.java
#
# Link to JVM for JVM_LatestUserDefinedLoader
#
OTHER_LDLIBS = $(JVMLIB)
#
# Rules
#
include $(BUILDDIR)/common/Library.gmk
include $(BUILDDIR)/common/Rules.gmk
#
# Full package names of implementations requiring stubs
......
#
# Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Define library interface.
SUNWprivate_1.1 {
global:
Java_sun_rmi_server_MarshalInputStream_latestUserDefinedLoader;
local:
*;
};
......@@ -2025,8 +2025,9 @@ public class ObjectInputStream
* This method should not be removed or its signature changed without
* corresponding modifications to the above class.
*/
// REMIND: change name to something more accurate?
private static native ClassLoader latestUserDefinedLoader();
private static ClassLoader latestUserDefinedLoader() {
return sun.misc.VM.latestUserDefinedLoader();
}
/**
* Default GetField implementation.
......
......@@ -371,6 +371,12 @@ public class VM {
private final static int JVMTI_THREAD_STATE_WAITING_INDEFINITELY = 0x0010;
private final static int JVMTI_THREAD_STATE_WAITING_WITH_TIMEOUT = 0x0020;
/*
* Returns the first non-null class loader up the execution stack,
* or null if only code from the null class loader is on the stack.
*/
public static native ClassLoader latestUserDefinedLoader();
static {
initialize();
}
......
......@@ -262,7 +262,9 @@ public class MarshalInputStream extends ObjectInputStream {
* Returns the first non-null class loader up the execution stack, or null
* if only code from the null class loader is on the stack.
*/
private static native ClassLoader latestUserDefinedLoader();
private static ClassLoader latestUserDefinedLoader() {
return sun.misc.VM.latestUserDefinedLoader();
}
/**
* Fix for 4179055: Need to assist resolving sun stubs; resolve
......
......@@ -173,16 +173,3 @@ Java_java_io_ObjectInputStream_bytesToDoubles(JNIEnv *env,
(*env)->ReleasePrimitiveArrayCritical(env, dst, doubles, 0);
}
/*
* Class: java_io_ObjectInputStream
* Method: latestUserDefinedLoader
* Signature: ()Ljava/lang/ClassLoader;
*
* Returns the first non-null class loader up the execution stack, or null
* if only code from the null class loader is on the stack.
*/
JNIEXPORT jobject JNICALL
Java_java_io_ObjectInputStream_latestUserDefinedLoader(JNIEnv *env, jclass cls)
{
return JVM_LatestUserDefinedLoader(env);
}
......@@ -111,6 +111,11 @@ Java_sun_misc_VM_getThreadStateValues(JNIEnv *env, jclass cls,
get_thread_state_info(env, JAVA_THREAD_STATE_TERMINATED, values, names);
}
JNIEXPORT jobject JNICALL
Java_sun_misc_VM_latestUserDefinedLoader(JNIEnv *env, jclass cls) {
return JVM_LatestUserDefinedLoader(env);
}
typedef void (JNICALL *GetJvmVersionInfo_fp)(JNIEnv*, jvm_version_info*, size_t);
JNIEXPORT void JNICALL
......
/*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "jni.h"
#include "jvm.h"
#include "jni_util.h"
#include "sun_rmi_server_MarshalInputStream.h"
/*
* Class: sun_rmi_server_MarshalInputStream
* Method: latestUserDefinedLoader
* Signature: ()Ljava/lang/ClassLoader;
*
* Returns the first non-null class loader up the execution stack, or null
* if only code from the null class loader is on the stack.
*/
JNIEXPORT jobject JNICALL
Java_sun_rmi_server_MarshalInputStream_latestUserDefinedLoader(JNIEnv *env, jclass cls)
{
return JVM_LatestUserDefinedLoader(env);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册