octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #48013] Java integration: conversion to double


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #48013] Java integration: conversion to double
Date: Tue, 2 Aug 2016 15:38:01 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0

Follow-up Comment #15, bug #48013 (project octave):

Keeping the check in for java.lang.Number makes sense, thanks for pointing
that out.

Ernst, I don't think your description of this is correct. Without the patch
applied, I get the following:


>> x = javaObject ("java.lang.Integer", 12)
x =

<Java object: java.lang.Integer>

>> y = javaObject ("java.math.BigDecimal", 12)
y =

<Java object: java.math.BigDecimal>



Simply instantiating a class is not enough to trigger this bug, I think it has
to be a javaMethod call that returns an object of a numeric wrapper type for
this to be triggered.

What I would like are some standard library calls that return objects of each
of the types that this patch handles so we can verify that they are converted
to the appropriate Octave types.

I'm thinking the "valueOf" static methods might be a good way to test this
interface:


javaMethod ("valueOf", "java.lang.Short", 0)
javaMethod ("valueOf", "java.lang.Double", 0)
...
javaMethod ("valueOf", "java.math.BigDecimal", 0)
javaMethod ("valueOf", "java.math.BigInteger", 0)


I would rather not add a class just for testing the Java interface if we can
use examples from the standard library to do so just as well.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?48013>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]