Skip to content

Commit f61d04d

Browse files
Merge pull request #165 from tle-bdc/bug/BDC-70000
BDC-70000 Fix null pointer exception
2 parents b3212eb + 1b1a539 commit f61d04d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HandleResponseInterceptor.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ public void execute(IntuitMessage intuitMessage) throws FMSException {
104104
if (intuitResponse != null && intuitResponse.getFault() != null) {
105105
Fault fault = intuitResponse.getFault();
106106

107-
if (fault.getType().equalsIgnoreCase("Validation")) {
107+
if ("Validation".equalsIgnoreCase(fault.getType())) {
108108
throw new ValidationException(fault.getError());
109-
} else if (fault.getType().equalsIgnoreCase("Service")) {
109+
} else if ("Service".equalsIgnoreCase(fault.getType())) {
110110
throw new ServiceException(fault.getError());
111-
} else if (fault.getType().equalsIgnoreCase("AuthenticationFault")) {
111+
} else if ("AuthenticationFault".equalsIgnoreCase(fault.getType())) {
112112
throw new AuthenticationException(fault.getError());
113-
} else if (fault.getType().equalsIgnoreCase("Authentication")) {
113+
} else if ("Authentication".equalsIgnoreCase(fault.getType())) {
114114
throw new AuthenticationException(fault.getError());
115-
} else if (fault.getType().equalsIgnoreCase("ApplicationAuthenticationFailed")) {
115+
} else if ("ApplicationAuthenticationFailed".equalsIgnoreCase(fault.getType())) {
116116
throw new AuthenticationException(fault.getError());
117-
} else if (fault.getType().equalsIgnoreCase("Authorization")) {
117+
} else if ("Authorization".equalsIgnoreCase(fault.getType())) {
118118
throw new AuthorizationException(fault.getError());
119-
} else if (fault.getType().equalsIgnoreCase("AuthorizationFault")) {
119+
} else if ("AuthorizationFault".equalsIgnoreCase(fault.getType())) {
120120
throw new AuthorizationException(fault.getError());
121121
} else {
122122
//not able to recognize the type of exception

0 commit comments

Comments
 (0)