diff scripts/java/org/octave/ClassHelper.java @ 18902:e6872e945553

fieldnames: return only field names of java objects instead of description. * java/org/octave/ClassHelper.java (getFields): the method java.lang.reflect.Field.toString() returns a string description of each field, e.g., 'public static final double java.lang.Double.MAX_VALUE', instead of just the name 'MAX_VALUE'. Fixed by using the correct method getName(). * general/fieldnames.m: adapt the tests to check for the name and extend for when passing a java object instead of just the class name.
author Carnë Draug <carandraug@octave.org>
date Tue, 08 Jul 2014 19:55:03 +0100
parents d63878346099
children
line wrap: on
line diff
--- a/scripts/java/org/octave/ClassHelper.java	Sat Jun 21 13:07:57 2014 +0200
+++ b/scripts/java/org/octave/ClassHelper.java	Tue Jul 08 19:55:03 2014 +0100
@@ -199,7 +199,7 @@
           {
             sb.append (";");
           }
-        sb.append (theField[i].toString ());
+        sb.append (theField[i].getName ());
       }
 
     return (sb.toString ());