fixing java 8 build brake due to missing null check

This commit is contained in:
inosh-perera 2015-12-22 19:23:52 +05:30
parent ad8df2d069
commit 6d7f024e8e

View File

@ -94,8 +94,9 @@ public class BSTAuthenticator implements WebappAuthenticator {
@Override
public boolean canHandle(Request request) {
String contentType = request.getContentType();
if (contentType.contains("application/xml") || contentType.contains("application/soap+xml") ||
contentType.contains("application/text")) {
if (contentType != null && (contentType.contains("application/xml") || contentType.contains
("application/soap+xml") ||
contentType.contains("application/text"))) {
try {
return isBSTHeaderExists(request);
} catch (IOException | XMLStreamException e) {