bugGNU Octave - Bugs: bug #48795, javaMethod(instance method,...

 
 

bug #48795: javaMethod(instance method, classname,...) leads to NullPointerException

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Mon 15 Aug 2016 10:05:09 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Open
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 16 Aug 2016 09:22:58 PM UTC, comment #4: 

Another simplification concerning method isCallableFrom
and added some doxygen.

(file #38234)

Ernst Reissner <ernstreissner>
Tue 16 Aug 2016 10:52:16 AM UTC, comment #3: 

I added little redesign on find/invoke method/constructor.

(file #38231)

Ernst Reissner <ernstreissner>
Tue 16 Aug 2016 10:09:02 AM UTC, comment #2: 

Well, this did not work properly, sorry:
did not take into account, that there may be a member method and a static method with the same name.

(file #38229, file #38230)

Ernst Reissner <ernstreissner>
Tue 16 Aug 2016 10:05:25 AM UTC, comment #1: 

With the new patch I obtain as expected:
octave:1> javaMethod('returnNull','eu.simuline.octave.OctaveInterfaceTester')

error: [java] java.lang.NoSuchMethodException: returnNull
octave:1>


(file #38228)

Ernst Reissner <ernstreissner>
Mon 15 Aug 2016 10:05:09 PM UTC, original submission:  

javaMethod has two flavors:
- javaMethod(name, object,...) for member methods
- javaMethod(name, classname,...) for class methods.

When mixed up, i.e. javaMethod(name, classname,...),
where name specifies a member method,
the result is a NullPointerException
but should be a  NoSuchMethodException.


Try

javaMethod('returnNull','eu.simuline.octave.OctaveInterfaceTester')
 with the java class attached.

Ernst Reissner <ernstreissner>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #38235:  patchBug48795E.patch added by ernstreissner (10KiB - text/x-patch - sorry, wrong file. )
file #38234:  patchBug48795D.patch added by ernstreissner (8KiB - text/x-patch)
file #38231:  patchBug48795D.patch added by ernstreissner (8KiB - text/x-patch)
file #38229:  patchBug48795B.patch added by ernstreissner (1KiB - text/x-patch - This is a little rollback. But now I tested very well... Sorry for the inconvenience. )
file #38230:  patchBug48795C.patch added by ernstreissner (9KiB - text/x-patch - This is a little rollback. But now I tested very well... Sorry for the inconvenience. )
file #38228:  patchBug48795.patch added by ernstreissner (6KiB - text/x-patch)
file #38226:  OctaveInterfaceTester.java added by ernstreissner (4KiB - application/x-java)

 

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
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-18 mtmiller CategoryNone Libraries
        Item GroupNone Incorrect Result
        StatusNone Patch Submitted
    2016-08-16 ernstreissner Attached File- Added patchBug48795E.patch, #38235
    2016-08-16 ernstreissner Attached File- Added patchBug48795D.patch, #38234
    2016-08-16 ernstreissner Attached File- Added patchBug48795D.patch, #38231
    2016-08-16 ernstreissner Attached File- Added patchBug48795B.patch, #38229
        Attached File- Added patchBug48795C.patch, #38230
    2016-08-16 ernstreissner Attached File- Added patchBug48795.patch, #38228
    2016-08-15 ernstreissner Attached File- Added OctaveInterfaceTester.java, #38226
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code