[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #48758] methods(java.lang.String)
From: |
Ernst Reissner |
Subject: |
[Octave-bug-tracker] [bug #48758] methods(java.lang.String) |
Date: |
Thu, 11 Aug 2016 14:23:31 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:48.0) Gecko/20100101 Firefox/48.0 |
URL:
<http://savannah.gnu.org/bugs/?48758>
Summary: methods(java.lang.String)
Project: GNU Octave
Submitted by: ernstreissner
Submitted on: Thu 11 Aug 2016 02:23:29 PM GMT
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: None
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
in files fieldnames.m and methods.m
there is a FIXME comment,
## FIXME: Function prototype accepts java obj, but doesn't work if obj
## is e.g., java.lang.String. Convert obj to classname then.
and
## FIXME: Function prototype that excepts java obj exists, but doesn't
## work if obj is java.lang.String. Convert obj to classname.
This is due to a misunderstanding.
According to
http://de.mathworks.com/help/matlab/ref/methods.html?searchHighlight=methods
http://de.mathworks.com/help/matlab/ref/fieldnames.html,
for java objects the fields and methods shall be returned.
This applies in particular for class java.lang.String.
The String value is not interpreted as classname!!!
Thus with str=javaObject('java.lang.String', 'java.math.BigDecimal')
fieldnames(str)
returns the fields of String not of BigDecimal.
This is correct.
But methods(str) returns the methods of BigDecimal
instead of String.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?48758>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #48758] methods(java.lang.String),
Ernst Reissner <=