Thanks @Kentzo !

I've executed the live tests and the calculator one throws a NPE. It is not 
about the test itself, but something that is wrong in the domain object 
definition (and we didn't find in previous reviews).

When performing [this 
assertion](https://github.com/cloudsigma/jclouds-labs/blob/cloudsigma2-subscription-calc-fix/cloudsigma2/src/test/java/org/jclouds/cloudsigma2/CloudSigma2ApiLiveTest.java#L621),
 the NPE is thrown. The problem is in [this implementation of the equals 
method](https://github.com/cloudsigma/jclouds-labs/blob/cloudsigma2-subscription-calc-fix/cloudsigma2/src/main/java/org/jclouds/cloudsigma2/domain/CalcSubscription.java#L213-L216)
 in the `CalcSubscription` object. As you'll see, all those parameters are 
declared as a `Double` (the object) and are `@Nullable`. However, the 
`Double.compare` method expects `double` arguments (the primitive types). This 
means that if those values are actually `null`, that method will throw a NPE 
when trying to unbox their value.

This is not just the test failing, but the `equals` method not being properly 
implemented. Could you kindly fix that?
Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/41#issuecomment-29943780

Reply via email to