bugGNU Octave - Bugs: bug #46010, methods.m: often fails if applied...

 
 

bug #46010: methods.m: often fails if applied to more complicated Java objects

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sun 20 Sep 2015 11:02:26 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: Philip Nienhuis <philipnienhuis>
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: 4.0.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 02 Oct 2015 03:46:43 PM UTC, comment #4:

I pushed a slightly adapted changeset on stable:
http://hg.savannah.gnu.org/hgweb/octave/rev/5d31cd795c21

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Tue 22 Sep 2015 04:49:35 PM UTC, comment #3:

I think this should go on stable; I also see it in octave-4.0.0

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Mon 21 Sep 2015 05:45:36 AM UTC, comment #2:

Title adapted a bit

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 20 Sep 2015 11:04:54 PM UTC, comment #1:

Here's the changeset

(file #34941)

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.
Sun 20 Sep 2015 11:02:26 PM UTC, original submission:

methods.m always applies the (Java) "getMethods" method to the class names rather than the actual Java object.
For some (several) more complicated Java objects this will fail.
Sample using JExcelAPI (just to illustrate):

However, applying getMethods() to the Java object itself:

A try-catch where getMethods() is first applied to the Java object and if this fails, converting to the class name in the catch clause, is a simple fix for this bug.

I'll upload a changeset as soon as I have the bug number.

Philip Nienhuis <philipnienhuis>
Project MemberIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #34941:  java_methods.cs added by philipnienhuis (1KiB - text/x-csharp)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by philipnienhuis (Submitted the item)
  •  

    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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 02 Oct 2015 03:46:43 PM UTCphilipnienhuisStatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
      Releasedev=>4.0.0
    Mon 21 Sep 2015 05:45:36 AM UTCphilipnienhuisSummarymethods.m: often fails if applied to complex Java objects=>methods.m: often fails if applied to more complicated Java objects
    Sun 20 Sep 2015 11:04:54 PM UTCphilipnienhuisAttached File-=>Added java_methods.cs, #34941
      StatusIn Progress=>Patch Submitted

    Back to the top


    Powered by Savane 3.1-cleanup1