bugGNU Octave - Bugs: bug #48758, methods(java.lang.String)

 
 

bug #48758: methods(java.lang.String)

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Thu 11 Aug 2016 02:23:29 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Patch SubmittedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 12 Aug 2016 12:09:13 AM UTC, comment #1:

Fixed and tested.

(file #38185)

Ernst Reissner <ernstreissner>
Thu 11 Aug 2016 02:23:29 PM UTC, original submission:

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.

Ernst Reissner <ernstreissner>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #38185:  patchBug48758.patch added by ernstreissner (4KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by ernstreissner (Submitted the item)
  • -unavailable- added by ernstreissner
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Nov 2016 07:31:50 PM UTCmtmillerCategoryNone=>Octave Function
      Item GroupNone=>Matlab Compatibility
      StatusNone=>Patch Submitted
    Fri 12 Aug 2016 12:09:13 AM UTCernstreissnerAttached File-=>Added patchBug48758.patch, #38185
    Thu 11 Aug 2016 02:23:29 PM UTCernstreissnerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1