[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/
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/02
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double,
Mike Miller <=
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/02
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Mike Miller, 2016/08/03
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/03
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/11
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Mike Miller, 2016/08/11
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Philip Nienhuis, 2016/08/20
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Philip Nienhuis, 2016/08/20
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/20
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/20
- [Octave-bug-tracker] [bug #48013] Java integration: conversion to double, Ernst Reissner, 2016/08/20