From 6d7f024e8e5c71b2d88f9e0ef88592a707d526da Mon Sep 17 00:00:00 2001 From: inosh-perera Date: Tue, 22 Dec 2015 19:23:52 +0530 Subject: [PATCH] fixing java 8 build brake due to missing null check --- .../framework/authenticator/BSTAuthenticator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java index 42b382a6720..51e92a139bc 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java @@ -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) {