bugGNU Octave - Bugs: bug #38821, Support for java.lang.Byte /...

 
 

bug #38821: Support for java.lang.Byte / NoSuchMethodException

Submitted by:  Scott Haynes <scotth2o>
Submitted on:  Wed 24 Apr 2013 05:28:17 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Scott HaynesOpen/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Thu 25 Apr 2013 07:24:18 PM UTC, comment #3:

Thanks.
Rik pointed to a similar, or the same, pages a while back. In that thread, Michael Goffioul has clarified how Octave and Java are supposed to interact and pass/convert objects/classes/types to each other.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 24 Apr 2013 10:05:31 PM UTC, comment #2:

I ran across a couple pages on TMW web site that list how types should be converted between the interpreter and Java, the box and unbox operations in our Java interface. This seems as good a spec as any to try to aim for:

http://www.mathworks.com/help/matlab/matlab_external/passing-data-to-a-java-method.html
http://www.mathworks.com/help/matlab/matlab_external/handling-data-returned-from-a-java-method.html

It is explicitly stated that int8 and uint8 should convert to a Java byte (the "unbox" direction in our library).

Mike Miller <mtmiller>
Project Member
Wed 24 Apr 2013 07:14:47 PM UTC, comment #1:

See this discussion:
https://mailman.cae.wisc.edu/pipermail/help-octave/2013-April/058242.html

Workaround for the OF Java package is something like:

aa = javaObject ("java.lang.Short", 1).byteValue

This doesn't work in core Octave (dev version) as Java Byte is boxed to an Octave double; so unlike Matlab there's no way to create a java.lang.Byte in Octave.

Philip Nienhuis <philipnienhuis>
Project Member
Wed 24 Apr 2013 05:28:17 PM UTC, original submission:

Using the java package version 1.2.9 the following line yields a no such method error in octave 3.4.3.

The equivalent in Matlab yields a class java.lang.Byte as shown below.

Scott Haynes <scotth2o>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bkurtz (interested in this bug)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by scotth2o (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 30 Apr 2014 07:35:39 AM UTCbkurtzCarbon-Copy-=>Added bkurtz
    Wed 24 Apr 2013 07:14:47 PM UTCphilipnienhuisCategoryOctave Forge Package=>Libraries
      StatusNone=>Confirmed
      Release3.4.3=>dev
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup