Skip to content

Commit

Permalink
Merge pull request #165 from tle-bdc/bug/BDC-70000
Browse files Browse the repository at this point in the history
BDC-70000 Fix null pointer exception
  • Loading branch information
fjolin-intuit authored Aug 11, 2021
2 parents b3212eb + 1b1a539 commit f61d04d
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,19 +104,19 @@ public void execute(IntuitMessage intuitMessage) throws FMSException {
if (intuitResponse != null && intuitResponse.getFault() != null) {
Fault fault = intuitResponse.getFault();

if (fault.getType().equalsIgnoreCase("Validation")) {
if ("Validation".equalsIgnoreCase(fault.getType())) {
throw new ValidationException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("Service")) {
} else if ("Service".equalsIgnoreCase(fault.getType())) {
throw new ServiceException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("AuthenticationFault")) {
} else if ("AuthenticationFault".equalsIgnoreCase(fault.getType())) {
throw new AuthenticationException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("Authentication")) {
} else if ("Authentication".equalsIgnoreCase(fault.getType())) {
throw new AuthenticationException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("ApplicationAuthenticationFailed")) {
} else if ("ApplicationAuthenticationFailed".equalsIgnoreCase(fault.getType())) {
throw new AuthenticationException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("Authorization")) {
} else if ("Authorization".equalsIgnoreCase(fault.getType())) {
throw new AuthorizationException(fault.getError());
} else if (fault.getType().equalsIgnoreCase("AuthorizationFault")) {
} else if ("AuthorizationFault".equalsIgnoreCase(fault.getType())) {
throw new AuthorizationException(fault.getError());
} else {
//not able to recognize the type of exception
Expand Down

0 comments on commit f61d04d

Please sign in to comment.