bugGNU Octave - Bugs: bug #48742, methods(obj,'-full')


bug #48742: methods(obj,'-full')

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Tue 09 Aug 2016 11:14:57 PM UTC  
Category:  Octave Function Severity:  1 - Wish
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


Thu 21 Feb 2019 11:42:43 PM UTC, comment #5: 

This is now fixed on the default branch (https://hg.savannah.gnu.org/hgweb/octave/rev/8554becefe1b), closing as fixed.

Mike Miller <mtmiller>
Project Administrator
Tue 16 Aug 2016 09:54:46 PM UTC, comment #4: 

Now i implemented what i found.
For Java objects, now this bug is fixed.

(file #38236)

Ernst Reissner <ernstreissner>
Mon 15 Aug 2016 10:41:37 PM UTC, comment #3: 

I found now in the attached document,
how Matlab displays inheritance information:

Have a look at page 5-35 and read:

Methods for class java.awt.Dimension:
java.lang.Class getClass() % Inherited from java.lang.Object
int hashCode() % Inherited from java.lang.Object
boolean equals(java.lang.Object)

ah ok.

Ernst Reissner <ernstreissner>
Fri 12 Aug 2016 02:36:40 PM UTC, comment #2: 

The patch I provide does not fully fix the bug:
- the fix refers to Java objects and to java classnames only.
  for all other input, the parameter -full is ignored.
- for java class names or methods
    we provide almost a fix:
    missing is only inheritance information.
    Currently, i cannot provide this,
    since I do not know how this information is represented.

So suggestion:

Split this bugreport in two:
- for java: for -full,  inheritance information is missing
  status is need information.
- for the rest: -full is fully ignored,
  status is confirmed.

There is a third problem:
The two cases cannot be fully distinguished:
Matlab only allows classnames both java and matlab,
which would correspond with octave.
Matlab documentation

does not clearly say what if one and the same name refers to both,
a java and a matlab classname.

The problem with the current implementation in this case is,
if the octave/ class has no methods:
Then a java class is tried which may not exist.

So this may be a third bug.

(file #38189)

Ernst Reissner <ernstreissner>
Wed 10 Aug 2016 11:36:19 AM UTC, comment #1: 

Wish only? It breaks matlab compatibility.

Ernst Reissner <ernstreissner>
Tue 09 Aug 2016 11:14:57 PM UTC, original submission:  

in matlab methods(obj,'-full') returns the full description
of the public methods of a java object obj,
including parameter types, return types, static or not.
No access modifiers, since only public is displayed.

On the other hand, methods(obj) just returns the NAMES of the public

This shall be the case also for octave.

Ernst Reissner <ernstreissner>


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

Attach Files:

Attached Files


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only project members can vote.




    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-21 mtmiller StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2016-08-16 ernstreissner Attached File- => Added patchBug48742_48740B.patch, #38236
    2016-08-12 ernstreissner Attached File- => Added patchBug48742_48740.patch, #38189
    2016-08-10 mtmiller CategoryNone => Octave Function
        Severity3 - Normal => 1 - Wish
        Priority5 - Normal => 3 - Low
        Item GroupNone => Matlab Compatibility
        StatusNone => Confirmed
    2016-08-09 ernstreissner Carbon-Copy- => Added rei3ner@arcor.de

    Back to the top

    Powered by Savane 3.5