I have a problem that only happens when I upload changes in quality environments and whose server is the WAS websphere application server in my local I am using tomcat 7 with eclipse, the detail is that local does not mark error (Eclipse) but already in quality (where the application is hosted) in the WAS generates an error of nullpointerException
this is the code where the error is generated.
private double calculaInversion(String nb_serie,List<VivVAACInversion> catalogoInversion) {
String rs=VAACServiceImpl.correspondencia.get(nb_serie);
double id=0;
try {
for (VivVAACInversion vivVAACInversion : catalogoInversion) {
if(rs.equalsIgnoreCase(vivVAACInversion.getNombreClave())){
id=vivVAACInversion.getIdInversion();
}
}
}catch(Exception e) {
System.out.println( "exception: " + e.getMessage());
}
return id;
}
I tried to enter a try catch
but this is not enough to control the Exception, could you help me in how I could control it with a validator with a if
that this method is executed normally and that nullpointerexception disappear?
I remain attentive and if it is necessary that I do not understand with pleasure I put it, kind regards.