Use Advanced Search to search the entire archive.
Re: Generic problems with Java SE (20+)
- From: Werner Keil <
>
- To:
- Subject: Re: Generic problems with Java SE (20+)
- Date: Tue, 14 Oct 2014 14:21:30 +0200
Martin/all,
See the description of this issue, the error is practically identical for
Unit.asType() If you compare the up to 100 places where asType() had to be
removed from the SE port following Java 8u20 (it started with the
underlying OpenJDK preview;-) to the RI where building against Java 7 this
"bug" does not affect us yet, you'd be able to see where it occurs.
As a coincidence, nearly every place it does seems related to a Unit<?>
operation like divide() or multiply() but I haven't tried if Otavio's
proposed changes would have helped there.
Explicitely returning a new Unit instance of the desired subtype and adding
that to the Unit System collection solved it under SE8u20 instead of
calling asType().
For Unit asType() is checking the Dimension and corresponding SI standard
unit, which is why for mixed Quantity operations the same sems questionable
to useless.
BMI or other domain specific quantities like "Weightloss per distance and
time" or similar are completely unrelated to SI. They are compound
quantities based on some SI and other non metric quantities.
HTH,
Werner
Am 14.10.2014 10:31 schrieb "Martin Desruisseaux" <
>:
>
Hello Werner
>
>
Could you please explain what was the problem with Unit.asType(Class) ?
>
>
Martin
>
>
>
Le 14/10/14 05:59, Werner Keil a écrit :
>
> I thought this could be of some interest.
>
> Given exactly the same JDK upgrade e.g. caused severe issues to
>
> classes using Unit.asType() and similar methods.
>
>
>
> A few issues were already filed, some fixed, but at least a few
>
> matching ones were "deferred" to Java 9 or beyond;-O
>
>
>
> The SE 8+ port is clearly most affected by this, but there is reason
>
> to believe, the more severe issue of ME 8 (SDK) no longer working with
>
> JARs built by later Java versions (not just 8) could also be connected.
>
>
>
> Regards,
>
> Werner
>
>