diff a/make/CompileInterimRmic.gmk b/make/CompileInterimRmic.gmk --- a/make/CompileInterimRmic.gmk +++ /dev/null @@ -1,80 +0,0 @@ -# -# Copyright (c) 2011, 2020, 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. -# - -default: all - -include $(SPEC) -include MakeBase.gmk -include JavaCompilation.gmk -include SetupJavaCompilers.gmk - -################################################################################ -# Generate interim versions of the module-info.java files for the interim -# langtools modules. Each interim module has ".interim" added as suffix to the -# original module name. - -INTERIM_MODULEINFO_PATTERN := \ - $(foreach m, $(INTERIM_RMIC_BASE_MODULES), -e 's/$m\([,; ]\)/$m.interim\1/g') \ - -e '/ToolProvider[,; ]/d' - -$(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \ - $(TOPDIR)/src/%/share/classes/module-info.java - $(call LogInfo, Generating module-info.java for $*.interim) - $(call MakeDir, $(@D)) - $(SED) $(INTERIM_MODULEINFO_PATTERN) $< > $@ - -TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \ - $(INTERIM_RMIC_MODULES)) - -################################################################################ - -RMIC_PKGS := \ - sun/rmi/rmic \ - sun/tools/asm \ - sun/tools/java \ - sun/tools/javac \ - sun/tools/tree \ - sun/tools/util \ - # - -$(eval $(call SetupJavaCompilation, BUILD_jdk.rmic.interim, \ - SETUP := GENERATE_OLDBYTECODE, \ - SRC := $(TOPDIR)/src/jdk.rmic/share/classes, \ - EXCLUDE_FILES := $(TOPDIR)/src/jdk.rmic/share/classes/module-info.java, \ - EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/jdk.rmic.interim/module-info.java, \ - INCLUDES := $(RMIC_PKGS), \ - BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules/jdk.rmic.interim, \ - COPY := .properties, \ - DISABLED_WARNINGS := deprecation, \ - ADD_JAVAC_FLAGS := \ - --module-path $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \ - $(INTERIM_RMIC_ADD_EXPORTS), \ -)) - -TARGETS += $(BUILD_jdk.rmic.interim) - -########################################################################################## - -all: $(TARGETS) diff a/make/Docs.gmk b/make/Docs.gmk --- a/make/Docs.gmk +++ b/make/Docs.gmk @@ -1,6 +1,6 @@ -# Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 1997, 2020, 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 @@ -55,14 +55,12 @@ # ################################################################################ # Javadoc settings -# On top of the sources that was used to compile the JDK, we need some -# extra java.rmi sources that are used just for javadoc. -MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \ - $(SUPPORT_OUTPUTDIR)/rmic/* $(TOPDIR)/src/*/share/doc/stub) +# On top of the sources that was used to compile the JDK, we need some extra sources +MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) ) # URLs JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage BUG_SUBMIT_URL := https://bugreport.java.com/bugreport/ COPYRIGHT_URL := legal/copyright.html diff a/make/Main.gmk b/make/Main.gmk --- a/make/Main.gmk +++ b/make/Main.gmk @@ -70,13 +70,10 @@ +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f ToolsLangtools.gmk) interim-langtools: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimLangtools.gmk) -interim-rmic: - +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk) - interim-tzdb: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk) buildtools-jdk: @@ -87,11 +84,11 @@ buildtools-hotspot: +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk) ALL_TARGETS += buildtools-langtools interim-langtools \ - interim-rmic interim-tzdb buildtools-jdk buildtools-modules \ + interim-tzdb buildtools-jdk buildtools-modules \ buildtools-hotspot ################################################################################ # Special targets for certain modules @@ -192,20 +189,10 @@ $(foreach m, $(JAVA_MODULES), $(eval $(call DeclareCompileJavaRecipe,$m))) ALL_TARGETS += $(JAVA_TARGETS) ################################################################################ -# Targets for running rmic. -$(eval $(call DeclareRecipesForPhase, RMIC, \ - TARGET_SUFFIX := rmic, \ - FILE_PREFIX := Rmic, \ - MAKE_SUBDIR := rmic, \ - CHECK_MODULES := $(ALL_MODULES))) - -ALL_TARGETS += $(RMIC_TARGETS) - -################################################################################ # Targets for compiling native libraries $(eval $(call DeclareRecipesForPhase, LIBS, \ TARGET_SUFFIX := libs, \ FILE_PREFIX := Lib, \ MAKE_SUBDIR := lib, \ @@ -686,14 +673,10 @@ $(GENSRC_MODULEINFO_TARGETS): buildtools-jdk $(GENDATA_TARGETS): interim-langtools buildtools-jdk - interim-rmic: interim-langtools - - $(RMIC_TARGETS): interim-langtools interim-rmic - $(JAVA_TARGETS): interim-langtools # Declare dependencies between hotspot-* targets $(foreach v, $(JVM_VARIANTS), \ $(eval hotspot-$v-gensrc: java.base-copy) \ @@ -730,13 +713,10 @@ $(eval $m-java: $(addsuffix -java, $(filter $(JAVA_MODULES), \ $(call FindDepsForModule,$m))))) # Declare dependencies between the module meta targets $(foreach m, $(ALL_MODULES), $(eval $m: $(call FindDepsForModule,$m))) - # Declare dependencies between -rmic to -java - $(foreach m, $(RMIC_MODULES), $(eval $m-rmic: $m-java)) - # Declare dependencies from -lib to -java # Skip modules that do not have java source. $(foreach m, $(filter $(JAVA_MODULES), $(LIBS_MODULES)), $(eval $m-libs: $m-java)) # Declare dependencies from all other -lib to java.base-lib @@ -766,11 +746,11 @@ # For these modules, the gensrc step is generating a module-info.java.extra # file to be processed by the gensrc-moduleinfo target. jdk.internal.vm.compiler-gensrc-moduleinfo: jdk.internal.vm.compiler-gensrc-src jdk.internal.vm.compiler.management-gensrc-moduleinfo: jdk.internal.vm.compiler.management-gensrc-src - jdk.jdeps-gendata: java rmic + jdk.jdeps-gendata: java # The ct.sym generation uses all the moduleinfos as input jdk.compiler-gendata: $(GENSRC_MODULEINFO_TARGETS) # Declare dependencies between jmod targets. @@ -788,11 +768,10 @@ java.base-jmod: $(JVM_MAIN_TARGETS) # Declare dependencies from -jmod to all other module targets $(foreach m, $(JAVA_MODULES), $(eval $m_JMOD_DEPS += $m-java)) $(foreach m, $(GENDATA_MODULES), $(eval $m_JMOD_DEPS += $m-gendata)) - $(foreach m, $(RMIC_MODULES), $(eval $m_JMOD_DEPS += $m-rmic)) $(foreach m, $(LIBS_MODULES), $(eval $m_JMOD_DEPS += $m-libs)) $(foreach m, $(LAUNCHER_MODULES), $(eval $m_JMOD_DEPS += $m-launchers)) $(foreach m, $(COPY_MODULES), $(eval $m_JMOD_DEPS += $m-copy)) $(foreach m, $(ALL_MODULES), $(eval $m-jmod: $($(m)_JMOD_DEPS))) $(foreach m, $(INTERIM_IMAGE_MODULES), $(eval $m-interim-jmod: $($(m)_JMOD_DEPS))) @@ -854,11 +833,11 @@ $(JMOD_TARGETS): java.base-copy zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \ $(filter jdk.crypto%, $(JAVA_TARGETS)) - zip-source: gensrc rmic + zip-source: gensrc jrtfs-jar: interim-langtools build-microbenchmark: interim-langtools exploded-image @@ -901,15 +880,15 @@ exploded-image-optimize: java copy gendata java.base-libs java.base-launchers \ buildtools-modules bootcycle-images: jdk-image - docs-jdk-api-javadoc: $(GENSRC_TARGETS) rmic + docs-jdk-api-javadoc: $(GENSRC_TARGETS) - docs-javase-api-javadoc: $(GENSRC_TARGETS) rmic + docs-javase-api-javadoc: $(GENSRC_TARGETS) - docs-reference-api-javadoc: $(GENSRC_TARGETS) rmic + docs-reference-api-javadoc: $(GENSRC_TARGETS) docs-jdk-api-modulegraph: exploded-image buildtools-modules docs-javase-api-modulegraph: exploded-image buildtools-modules @@ -987,11 +966,11 @@ ################################################################################ # Virtual targets without recipes # If not already set, set the JVM specific tools targets JVM_TOOLS_TARGETS ?= buildtools-hotspot -buildtools: buildtools-langtools interim-langtools interim-rmic \ +buildtools: buildtools-langtools interim-langtools \ buildtools-jdk $(JVM_TOOLS_TARGETS) # Declare dependencies from hotspot- targets $(foreach v, $(JVM_VARIANTS), \ $(eval hotspot-$v: hotspot-$v-gensrc hotspot-$v-libs) \ @@ -1010,12 +989,10 @@ copy: $(ALL_COPY_TARGETS) java: $(JAVA_TARGETS) -rmic: $(RMIC_TARGETS) - libs: $(LIBS_TARGETS) static-libs: $(STATIC_LIBS_TARGETS) launchers: $(LAUNCHER_TARGETS) @@ -1029,11 +1006,10 @@ # Declare dependencies from to all the individual targets specific # to that module -*, that are needed for the exploded image. $(foreach m, $(GENSRC_MODULES), $(eval $m: $m-gensrc)) $(foreach m, $(JAVA_MODULES), $(eval $m: $m-java)) $(foreach m, $(GENDATA_MODULES), $(eval $m: $m-gendata)) -$(foreach m, $(RMIC_MODULES), $(eval $m: $m-rmic)) $(foreach m, $(LIBS_MODULES), $(eval $m: $m-libs)) $(foreach m, $(LAUNCHER_MODULES), $(eval $m: $m-launchers)) $(foreach m, $(ALL_COPY_MODULES), $(eval $m: $m-copy)) # Building java.base includes building all of hotspot. @@ -1129,11 +1105,11 @@ # all-bundles packages all our deliverables as tar.gz bundles. all-bundles: product-bundles test-bundles docs-bundles static-libs-bundles ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \ - copy java rmic libs static-libs launchers jmods \ + copy java libs static-libs launchers jmods \ jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \ exploded-image-base exploded-image \ create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \ docs-javase docs-reference docs-javadoc mac-bundles product-images legacy-images \ docs-image test-image all-images \ diff a/make/ZipSource.gmk b/make/ZipSource.gmk --- a/make/ZipSource.gmk +++ b/make/ZipSource.gmk @@ -1,7 +1,7 @@ # -# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2020, 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 @@ -37,22 +37,16 @@ ################################################################################ # Create the directory structure for src.zip using symlinks. # //.java -# Find extra source dirs for a module that are not part of normal compilation -# but should be included in src.zip. -# $1: Module to find dirs for -ExtraSrcDirs = \ - $(wildcard $(SUPPORT_OUTPUTDIR)/rmic/$(strip $1)) - ALL_MODULES := $(FindAllModules) # Generate the src dirs in the first make invocation and then call this makefile # again to create src.zip. $(foreach m, $(ALL_MODULES), \ - $(foreach d, $(call FindModuleSrcDirs, $m) $(call ExtraSrcDirs, $m), \ + $(foreach d, $(call FindModuleSrcDirs, $m) , \ $(eval $d_TARGET := $(SRC_ZIP_WORK_DIR)/$(patsubst $(TOPDIR)/%,%,$d)/$m) \ $(if $(SRC_GENERATED), , \ $(eval $$($d_TARGET): $d ; \ $$(if $(filter $(TOPDIR)/%, $d), $$(link-file-relative), $$(link-file-absolute)) \ ) \ diff a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in --- a/make/autoconf/spec.gmk.in +++ b/make/autoconf/spec.gmk.in @@ -654,11 +654,11 @@ BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@ BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) BUILD_JAR=@FIXPATH@ $(BUILD_JDK)/bin/jar -# Interim langtools and rmic modules and arguments +# Interim langtools and arguments INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc INTERIM_LANGTOOLS_MODULES := $(addsuffix .interim, $(INTERIM_LANGTOOLS_BASE_MODULES)) INTERIM_LANGTOOLS_ADD_EXPORTS := \ --add-exports java.base/sun.reflect.annotation=jdk.compiler.interim \ --add-exports java.base/jdk.internal.jmod=jdk.compiler.interim \ @@ -673,19 +673,10 @@ $(INTERIM_LANGTOOLS_ADD_EXPORTS) \ # JAVAC_MAIN_CLASS = -m jdk.compiler.interim/com.sun.tools.javac.Main JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main -INTERIM_RMIC_BASE_MODULES := jdk.rmic -INTERIM_RMIC_MODULES := $(addsuffix .interim, $(INTERIM_RMIC_BASE_MODULES)) - # -# Use = to delay expansion of PathList since it's not available in this file. -INTERIM_RMIC_ARGS = --limit-modules java.base,jdk.compiler,jdk.javadoc \ - --module-path $(call PathList, $(BUILDTOOLS_OUTPUTDIR)/interim_rmic_modules \ - $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules) \ - # - # You run the new javac using the boot jdk with $(BOOT_JDK)/bin/java $(NEW_JAVAC) ... # Use = assignment to be able to override in bootcycle-spec.gmk NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS) NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS) diff a/make/common/RMICompilation.gmk b/make/common/RMICompilation.gmk --- a/make/common/RMICompilation.gmk +++ /dev/null @@ -1,94 +0,0 @@ -# -# Copyright (c) 2011, 2019, 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. -# - -# Setup make rules for creating an RMI compilation. -# -# Parameter 1 is the name of the rule. This name is used as variable prefix, -# and the targets generated are listed in a variable by that name. -# -# Remaining parameters are named arguments. These include: -# CLASSES:=List of classes to generate stubs for -# CLASSES_DIR:=Directory where to look for classes -# STUB_CLASSES_DIR:=Directory in where to put stub classes -# RUN_V11:=Set to run rmic with -v1.1 -# RUN_V12:=Set to run rmic with -v1.2 -# KEEP_GENERATED:=Set to keep generated sources around -# STUB_SOURCES_DIR:=Directory to put generated sources in -SetupRMICompilation = $(NamedParamsMacroTemplate) -define SetupRMICompilationBody - - $1_DEP_FILE := $$($1_STUB_CLASSES_DIR)/_the.$1_rmic.generated - - $1_CLASSES_SLASH := $$(subst .,/,$$($1_CLASSES)) - $1_CLASS_FILES := $$(addprefix $$($1_CLASSES_DIR)/,$$(addsuffix .class,$$($1_CLASSES_SLASH))) - $1_STUB_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Stub.class,$$($1_CLASSES_SLASH))) - $1_TARGETS := $$($1_STUB_FILES) - $1_ARGS := - ifneq (,$$($1_RUN_V11)) - $1_SKEL_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Skel.class,$$($1_CLASSES_SLASH))) - $1_TARGETS += $$($1_SKEL_FILES) - $1_ARGS += -v1.1 - endif - ifneq (,$$($1_RUN_V12)) - $1_ARGS += -v1.2 - endif - - $1_TIE_BASE_FILES := $$(foreach f,$$($1_CLASSES_SLASH),$$(dir $$f)_$$(notdir $$f)) - $1_TIE_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/org/omg/stub/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) - $1_TIE_STDPKG_FILES := $$(addprefix $$($1_STUB_CLASSES_DIR)/,$$(addsuffix _Tie.class,$$($1_TIE_BASE_FILES))) - - ifneq ($$($1_KEEP_GENERATED), ) - $1_ARGS += -keepgenerated - $1_JAVA_TARGETS := $$(subst .class,.java,$$($1_TARGETS)) - ifneq ($$($1_STUB_SOURCES_DIR), ) - # This is where the java files are created by rmic - $1_JAVA_TARGETS_REL := $$(subst $$($1_STUB_CLASSES_DIR),, $$($1_JAVA_TARGETS)) - # This is where the caller wants the java files - $1_JAVA_TARGETS := $$(addprefix $$($1_STUB_SOURCES_DIR), $$($1_JAVA_TARGETS_REL)) - endif - $1_TARGETS += $$($1_JAVA_TARGETS) - endif - - $1_DOLLAR_SAFE_CLASSES := $$(subst $$$$,\$$$$,$$($1_CLASSES)) - - $$($1_TARGETS): $$($1_DEP_FILE) $$($1_CLASS_FILES) - - $$($1_DEP_FILE): $$($1_CLASS_FILES) - $$(call LogInfo, Running rmic $$($1_ARGS) for $$($1_DOLLAR_SAFE_CLASSES)) - $$(call MakeDir, $$($1_STUB_CLASSES_DIR)) - $(RMIC) $$($1_ARGS) -classpath "$$($1_CLASSES_DIR)" \ - -d $$($1_STUB_CLASSES_DIR) $$($1_DOLLAR_SAFE_CLASSES); \ - $$(if $$($1_STUB_SOURCES_DIR), \ - $$(foreach f, $$($1_JAVA_TARGETS_REL), \ - $(MKDIR) -p $$(dir $$($1_STUB_SOURCES_DIR)/$$f) ; \ - $(MV) $$($1_STUB_CLASSES_DIR)/$$f $$($1_STUB_SOURCES_DIR)/$$f ; \ - ) \ - ) \ - $(TOUCH) $$@ - - - $1 := $$($1_TARGETS) $$($1_DEP_FILE) - -endef diff a/make/jdk/netbeans/jmx/build.xml b/make/jdk/netbeans/jmx/build.xml --- a/make/jdk/netbeans/jmx/build.xml +++ b/make/jdk/netbeans/jmx/build.xml @@ -1,7 +1,7 @@ - - - - - - - - - - - - - - - - - - - - - - - ActivationGroup_Stub is a stub class - * for the subclasses of java.rmi.activation.ActivationGroup - * that are exported as a java.rmi.server.UnicastRemoteObject. + * {@code ActivationGroup_Stub} is a stub class for the subclasses of {@code ActivationGroup} + * that are exported as a {@code java.rmi.server.UnicastRemoteObject}. * - * @since 1.2 + * @since 1.2 */ +@SuppressWarnings({"rawtypes", "unchecked", "deprecation"}) public final class ActivationGroup_Stub - extends java.rmi.server.RemoteStub - implements java.rmi.activation.ActivationInstantiator, java.rmi.Remote -{ - /** - * Constructs a stub for the ActivationGroup class. It - * invokes the superclass RemoteStub(RemoteRef) - * constructor with its argument, ref. - * - * @param ref a remote ref - */ - public ActivationGroup_Stub(java.rmi.server.RemoteRef ref) { + extends java.rmi.server.RemoteStub + implements ActivationInstantiator, Remote { + private static final long serialVersionUID = 2; + + private static java.lang.reflect.Method $method_newInstance_0; + + static { + try { + $method_newInstance_0 = + ActivationInstantiator.class.getMethod("newInstance", + new java.lang.Class[] {ActivationID.class, ActivationDesc.class}); + } catch (java.lang.NoSuchMethodException e) { + throw new java.lang.NoSuchMethodError( + "stub class initialization failed"); + } } /** - * Stub method for ActivationGroup.newInstance. Invokes - * the invoke method on this instance's - * RemoteObject.ref field, with this as the - * first argument, a two-element Object[] as the second - * argument (with id as the first element and - * desc as the second element), and -5274445189091581345L + * Constructs a stub for the {@code ActivationGroup} class. + * It invokes the superclass {@code RemoteStub(RemoteRef)} + * constructor with its argument, {@code ref}. + * + * @param ref a remote ref + */ + public ActivationGroup_Stub(java.rmi.server.RemoteRef ref) { + super(ref); + } + + /** + * Stub method for {@code ActivationGroup.newInstance}. Invokes + * the {@code invoke} method on this instance's + * {@code RemoteObject.ref} field, with {@code this} as the + * first argument, a two-element {@code Object[]} as the second + * argument (with {@code id} as the first element and + * {@code desc} as the second element), and -5274445189091581345L * as the third argument, and returns the result. If that invocation - * throws a RuntimeException, RemoteException, - * or an ActivationException, then that exception is + * throws a {@code RuntimeException}, {@code RemoteException}, + * or an {@code ActivationException}, then that exception is * thrown to the caller. If that invocation throws any other - * java.lang.Exception, then a - * java.rmi.UnexpectedException is thrown to the caller + * {@code java.lang.Exception}, then a + * {@code java.rmi.UnexpectedException} is thrown to the caller * with the original exception as the cause. * - * @param id an activation identifier - * @param desc an activation descriptor - * @return the result of the invocation - * @throws java.rmi.RemoteException if invocation results in - * a RemoteException - * @throws java.rmi.activation.ActivationException if invocation - * results in an ActivationException + * @param id an activation identifier + * @param desc an activation descriptor + * @return the result of the invocation + * @throws RemoteException if invocation results in a {@code RemoteException} + * @throws ActivationException if invocation results in an {@code ActivationException} */ - public java.rmi.MarshalledObject newInstance( - java.rmi.activation.ActivationID id, - java.rmi.activation.ActivationDesc desc) - throws java.rmi.RemoteException, - java.rmi.activation.ActivationException - { - return null; + public java.rmi.MarshalledObject newInstance(ActivationID id, + ActivationDesc desc) + throws java.rmi.RemoteException, ActivationException { + try { + Object $result = ref.invoke(this, $method_newInstance_0, + new java.lang.Object[]{id, desc}, -5274445189091581345L); + return ((java.rmi.MarshalledObject) $result); + } catch (java.lang.RuntimeException | java.rmi.RemoteException | ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } } } diff a/src/java.rmi/share/classes/sun/rmi/server/Activation$ActivationSystemImpl_Stub.java b/src/java.rmi/share/classes/sun/rmi/server/Activation$ActivationSystemImpl_Stub.java --- /dev/null +++ b/src/java.rmi/share/classes/sun/rmi/server/Activation$ActivationSystemImpl_Stub.java @@ -0,0 +1,239 @@ +/* +* Copyright (c) 1997, 2020, 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. +*/ +// Stub class generated by rmic, do not edit. +// Contents subject to change without notice. + +package sun.rmi.server; + +/** + * Activation$ActivationSystemImpl_Stub. + */ +@SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) +public final class Activation$ActivationSystemImpl_Stub + extends java.rmi.server.RemoteStub + implements java.rmi.activation.ActivationSystem, java.rmi.Remote { + private static final long serialVersionUID = 2; + + private static java.lang.reflect.Method $method_activeGroup_0; + private static java.lang.reflect.Method $method_getActivationDesc_1; + private static java.lang.reflect.Method $method_getActivationGroupDesc_2; + private static java.lang.reflect.Method $method_registerGroup_3; + private static java.lang.reflect.Method $method_registerObject_4; + private static java.lang.reflect.Method $method_setActivationDesc_5; + private static java.lang.reflect.Method $method_setActivationGroupDesc_6; + private static java.lang.reflect.Method $method_shutdown_7; + private static java.lang.reflect.Method $method_unregisterGroup_8; + private static java.lang.reflect.Method $method_unregisterObject_9; + + static { + try { + $method_activeGroup_0 = java.rmi.activation.ActivationSystem.class.getMethod("activeGroup", new java.lang.Class[]{java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationInstantiator.class, long.class}); + $method_getActivationDesc_1 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationDesc", new java.lang.Class[]{java.rmi.activation.ActivationID.class}); + $method_getActivationGroupDesc_2 = java.rmi.activation.ActivationSystem.class.getMethod("getActivationGroupDesc", new java.lang.Class[]{java.rmi.activation.ActivationGroupID.class}); + $method_registerGroup_3 = java.rmi.activation.ActivationSystem.class.getMethod("registerGroup", new java.lang.Class[]{java.rmi.activation.ActivationGroupDesc.class}); + $method_registerObject_4 = java.rmi.activation.ActivationSystem.class.getMethod("registerObject", new java.lang.Class[]{java.rmi.activation.ActivationDesc.class}); + $method_setActivationDesc_5 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationDesc", new java.lang.Class[]{java.rmi.activation.ActivationID.class, java.rmi.activation.ActivationDesc.class}); + $method_setActivationGroupDesc_6 = java.rmi.activation.ActivationSystem.class.getMethod("setActivationGroupDesc", new java.lang.Class[]{java.rmi.activation.ActivationGroupID.class, java.rmi.activation.ActivationGroupDesc.class}); + $method_shutdown_7 = java.rmi.activation.ActivationSystem.class.getMethod("shutdown", new java.lang.Class[]{}); + $method_unregisterGroup_8 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterGroup", new java.lang.Class[]{java.rmi.activation.ActivationGroupID.class}); + $method_unregisterObject_9 = java.rmi.activation.ActivationSystem.class.getMethod("unregisterObject", new java.lang.Class[]{java.rmi.activation.ActivationID.class}); + } catch (java.lang.NoSuchMethodException e) { + throw new java.lang.NoSuchMethodError( + "stub class initialization failed"); + } + } + + // constructors + public Activation$ActivationSystemImpl_Stub(java.rmi.server.RemoteRef ref) { + super(ref); + } + + // methods from remote interfaces + + // implementation of activeGroup(ActivationGroupID, ActivationInstantiator, long) + public java.rmi.activation.ActivationMonitor activeGroup(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1, java.rmi.activation.ActivationInstantiator $param_ActivationInstantiator_2, long $param_long_3) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException { + try { + Object $result = ref.invoke(this, $method_activeGroup_0, new java.lang.Object[]{$param_ActivationGroupID_1, $param_ActivationInstantiator_2, new java.lang.Long($param_long_3)}, -4575843150759415294L); + return ((java.rmi.activation.ActivationMonitor) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of getActivationDesc(ActivationID) + public java.rmi.activation.ActivationDesc getActivationDesc(java.rmi.activation.ActivationID $param_ActivationID_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException { + try { + Object $result = ref.invoke(this, $method_getActivationDesc_1, new java.lang.Object[]{$param_ActivationID_1}, 4830055440982622087L); + return ((java.rmi.activation.ActivationDesc) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of getActivationGroupDesc(ActivationGroupID) + public java.rmi.activation.ActivationGroupDesc getActivationGroupDesc(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException { + try { + Object $result = ref.invoke(this, $method_getActivationGroupDesc_2, new java.lang.Object[]{$param_ActivationGroupID_1}, -8701843806548736528L); + return ((java.rmi.activation.ActivationGroupDesc) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of registerGroup(ActivationGroupDesc) + public java.rmi.activation.ActivationGroupID registerGroup(java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException { + try { + Object $result = ref.invoke(this, $method_registerGroup_3, new java.lang.Object[]{$param_ActivationGroupDesc_1}, 6921515268192657754L); + return ((java.rmi.activation.ActivationGroupID) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of registerObject(ActivationDesc) + public java.rmi.activation.ActivationID registerObject(java.rmi.activation.ActivationDesc $param_ActivationDesc_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException { + try { + Object $result = ref.invoke(this, $method_registerObject_4, new java.lang.Object[]{$param_ActivationDesc_1}, -3006759798994351347L); + return ((java.rmi.activation.ActivationID) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of setActivationDesc(ActivationID, ActivationDesc) + public java.rmi.activation.ActivationDesc setActivationDesc(java.rmi.activation.ActivationID $param_ActivationID_1, java.rmi.activation.ActivationDesc $param_ActivationDesc_2) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException, java.rmi.activation.UnknownObjectException { + try { + Object $result = ref.invoke(this, $method_setActivationDesc_5, new java.lang.Object[]{$param_ActivationID_1, $param_ActivationDesc_2}, 7128043237057180796L); + return ((java.rmi.activation.ActivationDesc) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of setActivationGroupDesc(ActivationGroupID, ActivationGroupDesc) + public java.rmi.activation.ActivationGroupDesc setActivationGroupDesc(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1, java.rmi.activation.ActivationGroupDesc $param_ActivationGroupDesc_2) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException { + try { + Object $result = ref.invoke(this, $method_setActivationGroupDesc_6, new java.lang.Object[]{$param_ActivationGroupID_1, $param_ActivationGroupDesc_2}, 1213918527826541191L); + return ((java.rmi.activation.ActivationGroupDesc) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of shutdown() + public void shutdown() + throws java.rmi.RemoteException { + try { + ref.invoke(this, $method_shutdown_7, null, -7207851917985848402L); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of unregisterGroup(ActivationGroupID) + public void unregisterGroup(java.rmi.activation.ActivationGroupID $param_ActivationGroupID_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownGroupException { + try { + ref.invoke(this, $method_unregisterGroup_8, new java.lang.Object[]{$param_ActivationGroupID_1}, 3768097077835970701L); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } + + // implementation of unregisterObject(ActivationID) + public void unregisterObject(java.rmi.activation.ActivationID $param_ActivationID_1) + throws java.rmi.RemoteException, java.rmi.activation.ActivationException, java.rmi.activation.UnknownObjectException { + try { + ref.invoke(this, $method_unregisterObject_9, new java.lang.Object[]{$param_ActivationID_1}, -6843850585331411084L); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (java.rmi.activation.ActivationException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } +} diff a/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/ReferenceWrapper_Stub.java b/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/ReferenceWrapper_Stub.java --- /dev/null +++ b/src/jdk.naming.rmi/share/classes/com/sun/jndi/rmi/registry/ReferenceWrapper_Stub.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 1999, 2020, 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. + */ +// Stub class generated by rmic, do not edit. +// Contents subject to change without notice. + +package com.sun.jndi.rmi.registry; + +/** + * ReferenceWrapper_Stub. + */ +@SuppressWarnings({"deprecation", "rawtypes", "unchecked"}) +public final class ReferenceWrapper_Stub + extends java.rmi.server.RemoteStub + implements com.sun.jndi.rmi.registry.RemoteReference, java.rmi.Remote { + private static final long serialVersionUID = 2; + + private static java.lang.reflect.Method $method_getReference_0; + + static { + try { + $method_getReference_0 = com.sun.jndi.rmi.registry.RemoteReference.class.getMethod("getReference", new java.lang.Class[]{}); + } catch (java.lang.NoSuchMethodException e) { + throw new java.lang.NoSuchMethodError( + "stub class initialization failed"); + } + } + + // constructors + public ReferenceWrapper_Stub(java.rmi.server.RemoteRef ref) { + super(ref); + } + + // methods from remote interfaces + + // implementation of getReference() + public javax.naming.Reference getReference() + throws java.rmi.RemoteException, javax.naming.NamingException { + try { + Object $result = ref.invoke(this, $method_getReference_0, null, 3529874867989176284L); + return ((javax.naming.Reference) $result); + } catch (java.lang.RuntimeException e) { + throw e; + } catch (java.rmi.RemoteException e) { + throw e; + } catch (javax.naming.NamingException e) { + throw e; + } catch (java.lang.Exception e) { + throw new java.rmi.UnexpectedException("undeclared checked exception", e); + } + } +}