Using equals and == for comparisson
<p>i have a condition like this :</p>

<pre><code>try {
        History history = requestHelper.getHistory();
       if (!history.getInvoiceNo().equalsIgnoreCase("") || //String
                !history.getCcEmail().equalsIgnoreCase("") || //String
                !history.getHostAuthCode().equalsIgnoreCase("") || //String
                !history.getMerchantCategory().equalsIgnoreCase(null) || //String
                !history.getCcName().equalsIgnoreCase("") || //String
                !history.getCcPhone().equalsIgnoreCase("") || //String
                history.getBatchNo() != 0 || //int
                !history.getIpAddress().equalsIgnoreCase("") || //String
                !history.getTransactionStatus().equals(null)) { //char
            System.out.println(": : : FAILED GET HISTORY, NO PARAMETER SET!");
            requestHelper.getResultHelper().setLstHistoryTransaction(null);
       else {
            System.out.println(": : : SUCCESS GET HISTORY!");
            /* some command */
       }
} catch (Exception ex) {
        System.out.println(": : : ERROR QUERYING HISTORY TO DATABASE");
        ex.printStackTrace();
}
</code></pre>

<p>but when i dont fill any variable on that parameters, why it getting error like this :</p>

<blockquote>
  <p>10:07:35,238 INFO  [STDOUT] : : : ERROR QUERYING HISTORY TO DATABASE<br>
  10:07:35,238 ERROR [STDERR] java.lang.NullPointerException<br>
  10:07:35,238 ERROR [STDERR]     at
  doku.edp.executors.ManageTransactionExecutorBean.findHistoryTransaction(ManageTransactionExecutorBean.java:411)<br>
  10:07:35,238 ERROR [STDERR]     at
  doku.edp.executors.ManageTransactionExecutorBean.execute(ManageTransactionExecutorBean.java:78)<br>
  10:07:35,239 ERROR [STDERR]     at
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
  10:07:35,239 ERROR [STDERR]     at
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
  10:07:35,239 ERROR [STDERR]     at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
  10:07:35,239 ERROR [STDERR]     at
  java.lang.reflect.Method.invoke(Method.java:597)<br>
  10:07:35,239 ERROR
  [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
  10:07:35,239 ERROR [STDERR]     at
  sun.reflect.GeneratedMethodAccessor402.invoke(Unknown Source)<br>
  10:07:35,239 ERROR [STDERR]     at
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
  10:07:35,239 ERROR [STDERR]     at
  java.lang.reflect.Method.invoke(Method.java:597)<br>
  10:07:35,239 ERROR
  [STDERR]     at
  org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_613521570.invoke(InvocationContextInterceptor_z_fillMethod_613521570.java)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_613521570.invoke(InvocationContextInterceptor_z_setup_613521570.java)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)<br>
  10:07:35,239 ERROR [STDERR]     at
  org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)  </p>
</blockquote>

<p>thx in advance before</p>
