bridges/source/jni_uno/jni_data.cxx | 21 ------------ bridges/source/jni_uno/jni_info.cxx | 11 ++---- bridges/source/jni_uno/jni_info.h | 2 - jvmfwk/Module_jvmfwk.mk | 1 jvmfwk/Package_javavendors.mk | 56 -------------------------------- jvmfwk/Package_rcfiles.mk | 32 +++++++++++++++++- testtools/source/bridgetest/makefile.mk | 6 +-- 7 files changed, 39 insertions(+), 90 deletions(-)
New commits: commit 40193672b163cd1a23c00d2e4313805983fc8a60 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Mar 26 17:48:45 2012 +0200 Revert "Field IDs on Dalvik are more unique than in JVMs" This reverts commit b5ca34fa409bc4cbeb41a84b900612e302f5b0fb. 829a9b9c1041626efb688157658c1e0e2f6e8414 "In Java, css.uno.RuntimeException is not derived from css.uno.Exception" is a better fix. diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx index cabca76..9d77812 100644 --- a/bridges/source/jni_uno/jni_data.cxx +++ b/bridges/source/jni_uno/jni_data.cxx @@ -1968,26 +1968,7 @@ void Bridge::map_to_java( comp_td)->pParameterizedTypes != 0; for ( sal_Int32 nPos = comp_td->nMembers; nPos--; ) { - jfieldID field_id; - - // Handle com.sun.star.uno.RuntimeException::Context as a - // special case. In (C++) UNO css::uno::RuntimeException - // is simply a subclass of css::uno::Exception, which - // contains the Context field. In the Java UNO mapping - // css.uno.RuntimeException is a subclass of - // java.lang.RuntimeException, and has a Context field of - // its own, separate from that of css.uno.Exception. - - // In Dalvik the field IDs of these Context fields - // differ. (In Java VMs they seem to be the same.) - - if (type_equals( comp_info->m_td.get()->pWeakRef, - m_jni_info->m_RuntimeException_type.getTypeLibType() ) - && nPos == 1) - field_id = m_jni_info->m_field_css_uno_RuntimeException_m_Context; - else - field_id = linfo->m_fields[ nPos ]; - + jfieldID field_id = linfo->m_fields[ nPos ]; if (0 != field_id) { void const * p = diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx index 6f2a2a6..c3f34ed 100644 --- a/bridges/source/jni_uno/jni_info.cxx +++ b/bridges/source/jni_uno/jni_info.cxx @@ -766,11 +766,6 @@ JNI_info::JNI_info( jni.ensure_no_exception(); OSL_ASSERT( 0 != m_field_JNI_proxy_m_oid ); - m_field_css_uno_RuntimeException_m_Context = jni->GetFieldID( - (jclass) jo_RuntimeException.get(), "Context", "Ljava/lang/Object;" ); - jni.ensure_no_exception(); - OSL_ASSERT( 0 != m_field_css_uno_RuntimeException_m_Context ); - // get java env OUString java_env_type_name( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_JAVA) ); JLocalAutoRef jo_java( diff --git a/bridges/source/jni_uno/jni_info.h b/bridges/source/jni_uno/jni_info.h index 9cdbbf4..a356be2 100644 --- a/bridges/source/jni_uno/jni_info.h +++ b/bridges/source/jni_uno/jni_info.h @@ -204,8 +204,6 @@ public: jfieldID m_field_JNI_proxy_m_type; jfieldID m_field_JNI_proxy_m_oid; - jfieldID m_field_css_uno_RuntimeException_m_Context; - // ::com::sun::star::uno::TypeDescription m_XInterface_queryInterface_td; ::com::sun::star::uno::Type const & m_Exception_type; commit 829a9b9c1041626efb688157658c1e0e2f6e8414 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Mar 26 17:46:52 2012 +0200 In Java, css.uno.RuntimeException is not derived from css.uno.Exception which lead to Bridge::map_to_java (jni_data.cxx) copying the Context member of RuntimeException twice, once with a fieldID for Exception, which fails on Dalvik. diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx index 1d601cf..6f2a2a6 100644 --- a/bridges/source/jni_uno/jni_info.cxx +++ b/bridges/source/jni_uno/jni_info.cxx @@ -282,7 +282,11 @@ JNI_compound_type_info::JNI_compound_type_info( // retrieve info for base type typelib_TypeDescription * base_td = - reinterpret_cast< typelib_TypeDescription * >( + type_equals( + td->aBase.pWeakRef, + jni_info->m_RuntimeException_type.getTypeLibType()) + ? 0 + : reinterpret_cast< typelib_TypeDescription * >( td->pBaseTypeDescription ); m_base = (0 == base_td ? 0 : jni_info->get_type_info( jni, base_td )); commit 094cf7caf9659be5a0325048fa8a164e22de1fc9 Author: Stephan Bergmann <sberg...@redhat.com> Date: Mon Mar 26 17:43:53 2012 +0200 Fix delivery of jvmfwk ini/data files ...that are (also) used during the build (e.g., cd testtools/*/lib && ./bridgetest_inprocess_java). Broken by gbuild'ification of jvmfwk. diff --git a/jvmfwk/Module_jvmfwk.mk b/jvmfwk/Module_jvmfwk.mk index 84399db..381af36 100644 --- a/jvmfwk/Module_jvmfwk.mk +++ b/jvmfwk/Module_jvmfwk.mk @@ -37,7 +37,6 @@ ifneq ($(SOLAR_JAVA),) $(eval $(call gb_Module_add_targets,jvmfwk,\ Library_sunjavaplugin \ - Package_javavendors \ Package_jreproperties \ )) diff --git a/jvmfwk/Package_javavendors.mk b/jvmfwk/Package_javavendors.mk deleted file mode 100644 index 6345776..0000000 --- a/jvmfwk/Package_javavendors.mk +++ /dev/null @@ -1,56 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -# Version: MPL 1.1 / GPLv3+ / LGPLv3+ -# -# The contents of this file are subject to the Mozilla Public License Version -# 1.1 (the "License"); you may not use this file except in compliance with -# the License or as specified alternatively below. You may obtain a copy of -# the License at http://www.mozilla.org/MPL/ -# -# Software distributed under the License is distributed on an "AS IS" basis, -# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License -# for the specific language governing rights and limitations under the -# License. -# -# Major Contributor(s): -# Copyright (C) 2010 Red Hat, Inc., David Tardon <dtar...@redhat.com> -# (initial developer) -# -# All Rights Reserved. -# -# For minor contributions see the git repository. -# -# Alternatively, the contents of this file may be used under the terms of -# either the GNU General Public License Version 3 or later (the "GPLv3+"), or -# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"), -# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable -# instead of those above. - -$(eval $(call gb_Package_Package,jvmfwk_javavendors,$(SRCDIR)/jvmfwk/distributions/OpenOfficeorg)) - -# TODO: why are we delivering this stuff to two places? -ifeq ($(GUI),UNX) -ifeq ($(OS),FREEBSD) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_freebsd.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_freebsd.xml)) -else ifeq ($(OS),MACOSX) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_macosx.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_macosx.xml)) -else ifeq ($(OS),LINUX) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_linux.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_linux.xml)) -else ifeq ($(OS),AIX) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_linux.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_linux.xml)) -else -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_unx.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_unx.xml)) -endif -else ifeq ($(GUI),WNT) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,bin/javavendors.xml,javavendors_wnt.xml)) -$(eval $(call gb_Package_add_file,jvmfwk_javavendors,lib/javavendors.xml,javavendors_wnt.xml)) -else -$(call gb_Output_error,Unsupported platform) -endif - - -# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/jvmfwk/Package_rcfiles.mk b/jvmfwk/Package_rcfiles.mk index 68dad6f..b86a88c 100644 --- a/jvmfwk/Package_rcfiles.mk +++ b/jvmfwk/Package_rcfiles.mk @@ -27,8 +27,36 @@ $(eval $(call gb_Package_Package,jvmfwk_rcfiles,$(SRCDIR)/jvmfwk)) -$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(call gb_Helper_get_rcfile,bin/sunjavaplugin),plugins/sunmajor/pluginlib/sunjavapluginrc)) -$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(call gb_Helper_get_rcfile,bin/jvmfwk3),source/jvmfwk3rc)) $(eval $(call gb_Package_add_file,jvmfwk_rcfiles,bin/javasettingsunopkginstall.xml,source/javasettingsunopkginstall.xml)) +# The below files (intended to be also used during the build) need to go into +# the same directory as dynamic libraries (either bin or lib): + +ifeq ($(GUI),WNT) +my_Package_jvmfwk_rcfiles_dir = bin +else +my_Package_jvmfwk_rcfiles_dir = lib +endif + +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(call gb_Helper_get_rcfile,$(my_Package_jvmfwk_rcfiles_dir)/sunjavaplugin),plugins/sunmajor/pluginlib/sunjavapluginrc)) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(call gb_Helper_get_rcfile,$(my_Package_jvmfwk_rcfiles_dir)/jvmfwk3),source/jvmfwk3rc)) + +ifeq ($(GUI),UNX) +ifeq ($(OS),FREEBSD) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_freebsd.xml)) +else ifeq ($(OS),MACOSX) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_macosx.xml)) +else ifeq ($(OS),LINUX) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_linux.xml)) +else ifeq ($(OS),AIX) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_linux.xml)) +else +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_unx.xml)) +endif +else ifeq ($(GUI),WNT) +$(eval $(call gb_Package_add_file,jvmfwk_rcfiles,$(my_Package_jvmfwk_rcfiles_dir)/javavendors.xml,distributions/OpenOfficeorg/javavendors_wnt.xml)) +else +$(call gb_Output_error,Unsupported platform) +endif + # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/testtools/source/bridgetest/makefile.mk b/testtools/source/bridgetest/makefile.mk index 1423190..3e31ba6 100644 --- a/testtools/source/bridgetest/makefile.mk +++ b/testtools/source/bridgetest/makefile.mk @@ -195,9 +195,9 @@ $(DLLDEST)$/bridgetest_javaserver$(BATCH_SUFFIX) : makefile.mk $(GIVE_EXEC_RIGHTS) $@ $(DLLDEST)$/bridgetest_inprocess_java$(BATCH_SUFFIX) .ERRREMOVE: makefile.mk - echo '$(AUGMENT_LIBRARY_PATH)' '$(SOLARBINDIR)'/uno -ro services.rdb \ - -ro uno_services.rdb -ro uno_types.rdb \ - -s com.sun.star.test.bridge.BridgeTest \ + echo '$(AUGMENT_LIBRARY_PATH)' JAVA_HOME='$(JAVA_HOME)' \ + '$(SOLARBINDIR)'/uno -ro services.rdb -ro uno_services.rdb \ + -ro uno_types.rdb -s com.sun.star.test.bridge.BridgeTest \ -env:URE_INTERNAL_JAVA_DIR=$(MY_URE_INTERNAL_JAVA_DIR) \ -env:MY_CLASSDIR_URL=$(MY_LOCAL_CLASSDIR) \ -- com.sun.star.test.bridge.JavaTestObject noCurrentContext > $@ _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits