bugGNU Octave - Bugs: bug #48737, javaArray with 1 dimension

 
 

bug #48737: javaArray with 1 dimension

Submitter:  Ernst Reissner <ernstreissner>
Submitted:  Tue 09 Aug 2016 08:19:15 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Works For Me Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 10 Aug 2016 12:12:51 PM UTC, comment #3: 

Please close this.
I did some improvement, which introduced the bug, sorry.

Ernst Reissner <ernstreissner>
Wed 10 Aug 2016 11:58:11 AM UTC, comment #2: 

Hm, strange... I do.
I have almost a clone of the current tip.


Ernst Reissner <ernstreissner>
Wed 10 Aug 2016 01:20:14 AM UTC, comment #1: 

I don't see any error with this:


>> arr = javaArray ("java.lang.Object", 3);
>> size (arr)
ans =

   3   1

>> class (arr)
ans = java.lang.Object[]


What version / hg revision do you see this error with?

Mike Miller <mtmiller>
Group Member
Tue 09 Aug 2016 08:19:15 PM UTC, original submission:  

according to the help text,
javaArray('java.lang.Object',3) shall create a 1 dimensional array
with 3 entries.
What happens is
error: [java] java.lang.NoSuchMethodException: createArray

In fact, what works is arrays with more than 1 dimension.

Workaround is like this:
a=javaArray('java.lang.Object',1,2)

yields
a =

<Java object: java.lang.Object[][]>

and a=a(1) yields the desired

a =

<Java object: java.lang.Object[]>



Ernst Reissner <ernstreissner>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-10 mtmiller Open/ClosedOpen Closed
    2016-08-10 mtmiller CategoryNone Octave Function
        Item GroupNone Incorrect Result
        StatusNone Works For Me
    2016-08-09 ernstreissner Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code