title: unexpected exception java.math.BigDecimal running on IBM WebSphere
body: <p>Running Java application on IBM WebSphere caused such exception:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException
  at java.math.BigDecimal.add2DFP(BigDecimal.java:1946)
  at java.math.BigDecimal.add(BigDecimal.java:1881)
  at com.somepackage.components.view.PremiumSummaryViewModel.setPremiums(PremiumSummaryViewModel.java:101)
  </code></pre>
  
  <p>Null check is done. As I reviewed <strong>java.math.BigDecimal</strong> class has no such method <strong>add2DFP</strong> and does not call one either. Maybe it's specific to IBM's JDK.</p>
  
  <p>Any comment on this would be appreciated.</p>
  
  <p>Providing code regarding to exception</p>
  
  <pre><code>    BigDecimal annualPremiumAmt = nwtPremium != null &amp;&amp; nwtPremium.getAnnualAmt() != null ? nwtPremium.getAnnualAmt() : BigDecimal.ZERO;
      if (nwtPremium != null) {
          BigDecimal formPremiumAmt = nwtPremium.getAnnualAmt();
          if (formPremiumAmt != null) {
              policyFormTotal = policyFormTotal.add(annualPremiumAmt); //Bigdecimal
              formList.setFormPremiumAmt(formList.getFormPremiumAmt().add(annualPremiumAmt)); //101 line
          }
      }
  </code></pre>
  
  <p>Instance is running on IBM JDK 1.6.</p>