summaryrefslogtreecommitdiff
path: root/bridges
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-05-08 09:22:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-05-08 09:49:01 +0200
commit79a359fea1885151a77f83e05eee8d2aa97895ab (patch)
tree0f17ddb1a91c5ffd68c9dfb036b37e3993e5ecc6 /bridges
parent1cb0b37ad09400138d7c4a5874c02f921e742d37 (diff)
jboolean-related clean-up
Change-Id: Iecd03d0343b9b7c3a8b23b5a1e9654148b94d44c
Diffstat (limited to 'bridges')
-rw-r--r--bridges/source/jni_uno/jni_base.h4
-rw-r--r--bridges/source/jni_uno/jni_bridge.cxx8
-rw-r--r--bridges/source/jni_uno/jni_data.cxx3
3 files changed, 7 insertions, 8 deletions
diff --git a/bridges/source/jni_uno/jni_base.h b/bridges/source/jni_uno/jni_base.h
index 2b856aaad6f6..af93d6a35cac 100644
--- a/bridges/source/jni_uno/jni_base.h
+++ b/bridges/source/jni_uno/jni_base.h
@@ -96,7 +96,7 @@ public:
inline void JNI_context::ensure_no_exception() const
{
- if (JNI_FALSE != m_env->ExceptionCheck())
+ if (m_env->ExceptionCheck())
{
java_exc_occurred();
}
@@ -104,7 +104,7 @@ inline void JNI_context::ensure_no_exception() const
inline bool JNI_context::assert_no_exception() const
{
- if (JNI_FALSE != m_env->ExceptionCheck())
+ if (m_env->ExceptionCheck())
{
SAL_WARN("bridges", "unexpected java exception occurred");
#if OSL_DEBUG_LEVEL > 0
diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx
index 982f417a01ae..7eb2dc01f0db 100644
--- a/bridges/source/jni_uno/jni_bridge.cxx
+++ b/bridges/source/jni_uno/jni_bridge.cxx
@@ -288,7 +288,7 @@ void JNI_context::java_exc_occurred() const
// call toString(); don't rely on m_jni_info
jclass jo_class = m_env->FindClass( "java/lang/Object" );
- if (JNI_FALSE != m_env->ExceptionCheck())
+ if (m_env->ExceptionCheck())
{
m_env->ExceptionClear();
throw BridgeRuntimeError(
@@ -298,7 +298,7 @@ void JNI_context::java_exc_occurred() const
// method Object.toString()
jmethodID method_Object_toString = m_env->GetMethodID(
static_cast<jclass>(jo_Object.get()), "toString", "()Ljava/lang/String;" );
- if (JNI_FALSE != m_env->ExceptionCheck())
+ if (m_env->ExceptionCheck())
{
m_env->ExceptionClear();
throw BridgeRuntimeError(
@@ -523,8 +523,8 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping(
*ppMapping = 0;
}
- static_assert(JNI_FALSE == sal_False, "must be equal");
- static_assert(JNI_TRUE == sal_True, "must be equal");
+ static_assert(int(JNI_FALSE) == int(sal_False), "must be equal");
+ static_assert(int(JNI_TRUE) == int(sal_True), "must be equal");
static_assert(sizeof (jboolean) == sizeof (sal_Bool), "must be the same size");
static_assert(sizeof (jchar) == sizeof (sal_Unicode), "must be the same size");
static_assert(sizeof (jdouble) == sizeof (double), "must be the same size");
diff --git a/bridges/source/jni_uno/jni_data.cxx b/bridges/source/jni_uno/jni_data.cxx
index 829c73063a4f..d1f36eda2b42 100644
--- a/bridges/source/jni_uno/jni_data.cxx
+++ b/bridges/source/jni_uno/jni_data.cxx
@@ -461,8 +461,7 @@ void Bridge::map_to_uno(
JLocalAutoRef jo_type( jni );
JLocalAutoRef jo_wrapped_holder( jni );
- if (JNI_FALSE != jni->IsInstanceOf(
- java_data.l, getJniInfo()->m_class_Any ))
+ if (jni->IsInstanceOf( java_data.l, getJniInfo()->m_class_Any ))
{
// boxed any
jo_type.reset( jni->GetObjectField(