diff libinterp/octave-value/ov-java.h @ 15824:abc9e5f3c661

Return correct value for ischar() predicate test on octave_java objects. * libinterp/octave-value/ov-java.h(is_string): Rename is_string() to is_java_string. Leave only prototype in .h file. * libinterp/octave-value/ov-java.cc(is_java_string): Move code for is_string from ov-java.h to is_java_string in ov-java.cc.
author Rik <rik@octave.org>
date Fri, 21 Dec 2012 10:18:38 -0800
parents 10d6ab9b1b4f
children fe2cefaa772b
line wrap: on
line diff
--- a/libinterp/octave-value/ov-java.h
+++ b/libinterp/octave-value/ov-java.h
@@ -183,18 +183,7 @@
 
   octave_value convert_to_str_internal (bool pad, bool force, char type) const;
 
-  bool is_string (void) const
-  {
-    JNIEnv *current_env = thread_jni_env ();
-
-    if (current_env && java_object)
-      {
-        jclass_ref cls (current_env, current_env->FindClass ("java/lang/String"));
-        return current_env->IsInstanceOf (java_object, cls);
-      }
-
-    return false;
-  }
+  bool is_java_string (void) const;
 
   static JNIEnv* thread_jni_env (void);