Kaydet (Commit) 40193672 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Revert "Field IDs on Dalvik are more unique than in JVMs"

This reverts commit b5ca34fa.

829a9b9c "In Java, css.uno.RuntimeException is
not derived from css.uno.Exception" is a better fix.
üst 829a9b9c
......@@ -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 =
......
......@@ -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(
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment