summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-26 17:48:45 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-03-26 17:48:45 +0200
commit40193672b163cd1a23c00d2e4313805983fc8a60 (patch)
tree188b7b35aab44270c6994a0c9132df37febeedcf /bridges
parent829a9b9c1041626efb688157658c1e0e2f6e8414 (diff)
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.
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/jni_uno/jni_data.cxx21
-rw-r--r--bridges/source/jni_uno/jni_info.cxx5
-rw-r--r--bridges/source/jni_uno/jni_info.h2
3 files changed, 1 insertions, 27 deletions
diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx
index cabca76e8fc4..9d77812ada04 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 6f2a2a6bc2e7..c3f34edd62d7 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 9cdbbf4658c0..a356be272e04 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;