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

 
 

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

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Mon 15 Aug 2016 10:05:09 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
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.

 

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 File(s):
   
   
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
  • -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 11 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Nov 2016 07:30:59 PM UTCmtmillerCategoryNone=>Libraries
      Item GroupNone=>Incorrect Result
      StatusNone=>Patch Submitted
    Tue 16 Aug 2016 09:45:16 PM UTCernstreissnerAttached File-=>Added patchBug48795E.patch, #38235
    Tue 16 Aug 2016 09:22:58 PM UTCernstreissnerAttached File-=>Added patchBug48795D.patch, #38234
    Tue 16 Aug 2016 10:52:16 AM UTCernstreissnerAttached File-=>Added patchBug48795D.patch, #38231
    Tue 16 Aug 2016 10:09:02 AM UTCernstreissnerAttached File-=>Added patchBug48795B.patch, #38229
      Attached File-=>Added patchBug48795C.patch, #38230
    Tue 16 Aug 2016 10:05:25 AM UTCernstreissnerAttached File-=>Added patchBug48795.patch, #38228
    Mon 15 Aug 2016 10:05:09 PM UTCernstreissnerAttached File-=>Added OctaveInterfaceTester.java, #38226
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1