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 Apr 24 17:28:17 2013  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: FixedAssigned to: None
Originator Name: Scott HaynesOpen/Closed: Closed
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 Apr 23 21:22:50 2015, comment #5:

Now fixed with http://hg.savannah.gnu.org/hgweb/octave/rev/8261c4a11250

Closing bug report

Carnë Draug <carandraug>
Project Member
Tue Apr 21 14:32:01 2015, comment #4:

I came across this bug while fixing another (see comment #5 on bug #44882). Just for reference, my patch seems to this but has not been pushed yet.

Carnë Draug <carandraug>
Project Member
Thu Apr 25 19:24:18 2013, 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 Apr 24 22:05:31 2013, 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 Administrator
Wed Apr 24 19:14:47 2013, 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 Apr 24 17:28:17 2013, 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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Apr 23 21:22:50 2015carandraugStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed Apr 30 07:35:39 2014bkurtzCarbon-Copy-=>Added bkurtz
    Wed Apr 24 19:14:47 2013philipnienhuisCategoryOctave Forge Package=>Libraries
      StatusNone=>Confirmed
      Release3.4.3=>dev
      Operating SystemGNU/Linux=>Any

    Back to the top


    Powered by Savane 3.1-cleanup