diff scripts/general/methods.m @ 15816:59b6c6aee042

Don't box return values from javaObject. Always return a Java object. * libinterp/octave-value/ov-java.cc(do_javaObject): Don't call box() on newly created Java object. * scripts/general/fieldnames.m: Work-around bug with java.lang.String objects by calling getFields with class name rather than object. * scripts/general/methods.m: Work-around bug with java.lang.String objects by calling getMethods with class name rather than object.
author Rik <rik@octave.org>
date Tue, 18 Dec 2012 11:54:57 -0800
parents cf3a18843a26
children 1de4ec2a856d
line wrap: on
line diff
--- a/scripts/general/methods.m	Tue Dec 18 11:39:24 2012 -0800
+++ b/scripts/general/methods.m	Tue Dec 18 11:54:57 2012 -0800
@@ -46,6 +46,9 @@
       mtds_list = strsplit (mtds_str, ';');
     endif
   elseif (isjava (obj))
+    ## FIXME: Function prototype that excepts java obj exists, but doesn't
+    ##        work if obj is java.lang.String.  Convert obj to classname.
+    obj = class (obj);
     mtds_str = javaMethod ("getMethods", "org.octave.ClassHelper", obj);
     mtds_list = strsplit (mtds_str, ';');
   else