Finally deprecate MessageUtils.isTrue

Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c8ca71a1
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c8ca71a1
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c8ca71a1

Branch: refs/heads/master
Commit: c8ca71a1eea9037ec38a0f693a27d32eb93c353b
Parents: ed84806
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Aug 16 11:40:37 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Aug 16 14:22:17 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/message/MessageUtils.java   |  2 +-
 .../cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java |  4 ++--
 .../org/apache/cxf/jaxrs/utils/ExceptionUtils.java  |  8 +++-----
 .../org/apache/cxf/jaxrs/utils/InjectionUtils.java  |  3 +--
 .../java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java |  5 ++---
 .../org/apache/cxf/jaxrs/client/AbstractClient.java |  7 +++----
 .../cxf/jaxrs/provider/json/JSONProvider.java       |  6 +++---
 .../ext/search/AbstractSearchConditionParser.java   |  3 +--
 .../cxf/jaxrs/ext/search/SearchContextImpl.java     |  4 ++--
 .../cxf/jaxrs/ext/search/fiql/FiqlParser.java       |  4 ++--
 .../security/oauth/filters/OAuthServletFilter.java  |  4 ++--
 .../cxf/rs/security/oauth/utils/OAuthUtils.java     |  6 +++---
 .../security/oauth2/filters/OAuthRequestFilter.java |  4 ++--
 .../org/apache/cxf/transport/http/HTTPConduit.java  |  9 ++++-----
 .../transport/http/URLConnectionHTTPConduit.java    | 16 ++++++----------
 .../http/auth/AbstractSpnegoAuthSupplier.java       |  6 ++----
 .../org/apache/cxf/transport/jms/JMSConduit.java    |  3 +--
 .../apache/cxf/transport/jms/JMSDestination.java    |  3 +--
 .../apache/cxf/transport/jms/JMSMessageUtils.java   |  6 +++---
 .../apache/cxf/transport/local/LocalConduit.java    |  4 ++--
 .../ws/addressing/impl/InternalContextUtils.java    |  5 ++---
 .../cxf/ws/addressing/impl/MAPAggregatorImpl.java   |  3 ++-
 .../KerberosTokenInterceptorProvider.java           |  4 ++--
 .../wss4j/PolicyBasedWSS4JInInterceptor.java        |  2 +-
 .../wss4j/PolicyBasedWSS4JOutInterceptor.java       |  2 +-
 .../wss4j/PolicyBasedWSS4JStaxInInterceptor.java    |  2 +-
 .../wss4j/PolicyBasedWSS4JStaxOutInterceptor.java   |  2 +-
 .../ws/security/wss4j/WSS4JStaxInInterceptor.java   |  3 ++-
 .../apache/cxf/ws/security/wss4j/WSS4JUtils.java    |  3 ++-
 29 files changed, 60 insertions(+), 73 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/core/src/main/java/org/apache/cxf/message/MessageUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/message/MessageUtils.java 
b/core/src/main/java/org/apache/cxf/message/MessageUtils.java
index 339a450..2bdd509 100644
--- a/core/src/main/java/org/apache/cxf/message/MessageUtils.java
+++ b/core/src/main/java/org/apache/cxf/message/MessageUtils.java
@@ -124,8 +124,8 @@ public final class MessageUtils {
      * @param value
      * @return true if value is either the String "true" or Boolean.TRUE
      */
+    @Deprecated
     public static boolean isTrue(Object value) {
-        // TODO - consider deprecation as this really belongs in PropertyUtils
         return PropertyUtils.isTrue(value);
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
index c3c2d5a..a382add 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
@@ -39,6 +39,7 @@ import javax.ws.rs.core.Application;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.PrimitiveUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.feature.Feature;
 import org.apache.cxf.helpers.CastUtils;
@@ -53,7 +54,6 @@ import org.apache.cxf.jaxrs.provider.ProviderFactory;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.ResourceUtils;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.service.invoker.Invoker;
 import org.apache.cxf.transport.servlet.CXFNonSpringServlet;
 
@@ -525,7 +525,7 @@ public class CXFNonSpringJaxrsServlet extends 
CXFNonSpringServlet {
 
     protected boolean isIgnoreApplicationPath(ServletConfig servletConfig) {
         String ignoreParam = 
servletConfig.getInitParameter(IGNORE_APP_PATH_PARAM);
-        return ignoreParam == null || MessageUtils.isTrue(ignoreParam);
+        return ignoreParam == null || PropertyUtils.isTrue(ignoreParam);
     }
 
     protected void createServerFromApplication(ServletConfig servletConfig)

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
index c2089d6..5f6e429 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ExceptionUtils.java
@@ -70,11 +70,9 @@ public final class ExceptionUtils {
         if (ex.getClass() == WebApplicationException.class) {
             WebApplicationException webEx = (WebApplicationException)ex;
             if (webEx.getResponse().hasEntity()
-                && webEx.getCause() == null) {
-                Object prop = 
inMessage.getContextualProperty(SUPPORT_WAE_SPEC_OPTIMIZATION);
-                if (prop == null || MessageUtils.isTrue(prop)) {
-                    response = webEx.getResponse();
-                }
+                && webEx.getCause() == null
+                && MessageUtils.getContextualBoolean(inMessage, 
SUPPORT_WAE_SPEC_OPTIMIZATION, true)) {
+                response = webEx.getResponse();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
index 37897c8..c083de2 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
@@ -409,8 +409,7 @@ public final class InjectionUtils {
         if (pType == ParameterType.PATH) {
             if (PathSegment.class.isAssignableFrom(pClass)) {
                 return pClass.cast(new PathSegmentImpl(value, decoded));
-            } else if (!MessageUtils.isTrue(
-                        
message.getContextualProperty(IGNORE_MATRIX_PARAMETERS))) {
+            } else if (!MessageUtils.getContextualBoolean(message, 
IGNORE_MATRIX_PARAMETERS)) {
                 value = new PathSegmentImpl(value, false).getPath();
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
index 87217bf..45ab5b0 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
@@ -619,7 +619,7 @@ public final class JAXRSUtils {
                 rb.header("Allow", "HEAD");
             }
         }
-        if (msg != null && 
MessageUtils.isTrue(msg.getContextualProperty(REPORT_FAULT_MESSAGE_PROPERTY))) {
+        if (msg != null && MessageUtils.getContextualBoolean(msg, 
REPORT_FAULT_MESSAGE_PROPERTY)) {
             rb.type(MediaType.TEXT_PLAIN_TYPE).entity(responseMessage);
         }
         return rb.build();
@@ -1536,8 +1536,7 @@ public final class JAXRSUtils {
 
         String subTypeAfterPlus1 = splitMediaSubType(subType1, true);
         String subTypeAfterPlus2 = splitMediaSubType(subType2, true);
-        if (message != null && MessageUtils.isTrue(
-            
message.getContextualProperty(PARTIAL_HIERARCHICAL_MEDIA_SUBTYPE_CHECK))) {
+        if (message != null && MessageUtils.getContextualBoolean(message, 
PARTIAL_HIERARCHICAL_MEDIA_SUBTYPE_CHECK)) {
             if (subTypeAfterPlus1 != null || subTypeAfterPlus2 != null) {
                 boolean nullPossible = subTypeAfterPlus1 == null || 
subTypeAfterPlus2 == null;
                 isCompatible = subTypeAfterPlus1 == null && 
subTypeAfterPlus2.equals(subType1)

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java 
b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
index c98a59f..7b534b6 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/AbstractClient.java
@@ -414,8 +414,7 @@ public abstract class AbstractClient implements Client {
         Map<String, List<Object>> protocolHeaders =
             CastUtils.cast((Map<?, 
?>)responseMessage.get(Message.PROTOCOL_HEADERS));
 
-        boolean splitHeaders =
-            
MessageUtils.isTrue(outMessage.getContextualProperty(HEADER_SPLIT_PROPERTY));
+        boolean splitHeaders = MessageUtils.getContextualBoolean(outMessage, 
HEADER_SPLIT_PROPERTY);
         for (Map.Entry<String, List<Object>> entry : 
protocolHeaders.entrySet()) {
             if (null == entry.getKey()) {
                 continue;
@@ -534,7 +533,7 @@ public abstract class AbstractClient implements Client {
 
     protected boolean responseStreamCanBeClosed(Message outMessage, Class<?> 
cls) {
         return !JAXRSUtils.isStreamingOutType(cls)
-            && 
MessageUtils.isTrue(outMessage.getContextualProperty("response.stream.auto.close"));
+            && MessageUtils.getContextualBoolean(outMessage, 
"response.stream.auto.close");
     }
 
     protected void completeExchange(Exchange exchange, boolean proxy) {
@@ -650,7 +649,7 @@ public abstract class AbstractClient implements Client {
         URI newBaseURI = 
URI.create(reqContext.get(Message.ENDPOINT_ADDRESS).toString());
         URI requestURI = 
URI.create(reqContext.get(Message.REQUEST_URI).toString());
         return calculateNewRequestURI(newBaseURI, requestURI,
-                MessageUtils.isTrue(reqContext.get(PROXY_PROPERTY)));
+                PropertyUtils.isTrue(reqContext.get(PROXY_PROPERTY)));
     }
 
     private URI calculateNewRequestURI(URI newBaseURI, URI requestURI, boolean 
proxy) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
index e90f065..a4953c6 100644
--- 
a/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
+++ 
b/rt/rs/extensions/providers/src/main/java/org/apache/cxf/jaxrs/provider/json/JSONProvider.java
@@ -59,6 +59,7 @@ import javax.xml.stream.XMLStreamWriter;
 
 import org.w3c.dom.Document;
 
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.io.CachedOutputStream;
@@ -71,7 +72,6 @@ import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXBUtils;
-import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.staxutils.DocumentDepthProperties;
 import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.staxutils.W3CDOMStreamWriter;
@@ -493,7 +493,7 @@ public class JSONProvider<T> extends 
AbstractJAXBProvider<T>  {
         OutputStream actualOs = os;
 
         MessageContext mc = getContext();
-        if (mc != null && 
MessageUtils.isTrue(mc.get(Marshaller.JAXB_FORMATTED_OUTPUT))) {
+        if (mc != null && 
PropertyUtils.isTrue(mc.get(Marshaller.JAXB_FORMATTED_OUTPUT))) {
             actualOs = new CachedOutputStream();
         }
         XMLStreamWriter writer = createWriter(actualObject, actualClass, 
genericType, enc,
@@ -603,7 +603,7 @@ public class JSONProvider<T> extends 
AbstractJAXBProvider<T>  {
         if (mc != null) {
             Object prop = mc.get(name);
             if (prop != null) {
-                return MessageUtils.isTrue(prop);
+                return PropertyUtils.isTrue(prop);
             }
         }
         return defaultValue;

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
index c0eb282..1f85771 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/AbstractSearchConditionParser.java
@@ -42,7 +42,6 @@ import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
 import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageUtils;
 
 public abstract class AbstractSearchConditionParser<T> implements 
SearchConditionParser<T> {
 
@@ -97,7 +96,7 @@ public abstract class AbstractSearchConditionParser<T> 
implements SearchConditio
         } catch (Exception e) {
             // continue
         }
-        if (typeInfo == null && 
!MessageUtils.isTrue(contextProperties.get(SearchUtils.LAX_PROPERTY_MATCH))) {
+        if (typeInfo == null && 
!PropertyUtils.isTrue(contextProperties.get(SearchUtils.LAX_PROPERTY_MATCH))) {
             throw new PropertyNotFoundException(name, value);
         }
         return typeInfo;

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
index 1bf0a27..310898a 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/SearchContextImpl.java
@@ -114,7 +114,7 @@ public class SearchContextImpl implements SearchContext {
 
         String queryStr = (String)message.get(Message.QUERY_STRING);
         if (queryStr != null) {
-            if 
(MessageUtils.isTrue(message.getContextualProperty(USE_ALL_QUERY_COMPONENT))) {
+            if (MessageUtils.getContextualBoolean(message, 
USE_ALL_QUERY_COMPONENT)) {
                 return queryStr;
             }
             boolean encoded = PropertyUtils.isTrue(getKeepEncodedProperty());
@@ -130,7 +130,7 @@ public class SearchContextImpl implements SearchContext {
                     return params.getFirst(SHORT_SEARCH_QUERY);
                 }
                 return params.getFirst(SEARCH_QUERY);
-            } else if 
(MessageUtils.isTrue(message.getContextualProperty(USE_PLAIN_QUERY_PARAMETERS)))
 {
+            } else if (MessageUtils.getContextualBoolean(message, 
USE_PLAIN_QUERY_PARAMETERS)) {
                 return convertPlainQueriesToFiqlExp(params);
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
index 4fa7c38..e2daf90 100644
--- 
a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
+++ 
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/fiql/FiqlParser.java
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.UrlUtils;
 import org.apache.cxf.jaxrs.ext.search.AbstractSearchConditionParser;
 import org.apache.cxf.jaxrs.ext.search.AndSearchCondition;
@@ -35,7 +36,6 @@ import org.apache.cxf.jaxrs.ext.search.SearchBean;
 import org.apache.cxf.jaxrs.ext.search.SearchCondition;
 import org.apache.cxf.jaxrs.ext.search.SearchParseException;
 import org.apache.cxf.jaxrs.ext.search.SimpleSearchCondition;
-import org.apache.cxf.message.MessageUtils;
 
 
 /**
@@ -133,7 +133,7 @@ public class FiqlParser<T> extends 
AbstractSearchConditionParser<T> {
                       Map<String, String> beanProperties) {
         super(tclass, contextProperties, beanProperties);
 
-        if 
(MessageUtils.isTrue(this.contextProperties.get(SUPPORT_SINGLE_EQUALS))) {
+        if 
(PropertyUtils.isTrue(this.contextProperties.get(SUPPORT_SINGLE_EQUALS))) {
             operatorsMap = new HashMap<>(operatorsMap);
             operatorsMap.put("=", ConditionType.EQUALS);
             comparatorsPattern = COMPARATORS_PATTERN_SINGLE_EQUALS;

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthServletFilter.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthServletFilter.java
 
b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthServletFilter.java
index 3aa585e..6e51e22 100644
--- 
a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthServletFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthServletFilter.java
@@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletResponse;
 import net.oauth.OAuthProblemException;
 import net.oauth.server.OAuthServlet;
 
-import org.apache.cxf.message.MessageUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.rs.security.oauth.data.OAuthContext;
 import org.apache.cxf.rs.security.oauth.utils.OAuthUtils;
 import org.apache.cxf.security.SecurityContext;
@@ -49,7 +49,7 @@ public class OAuthServletFilter extends AbstractAuthFilter 
implements javax.serv
         ServletContext servletContext = filterConfig.getServletContext();
         super.setDataProvider(OAuthUtils.getOAuthDataProvider(servletContext));
         super.setValidator(OAuthUtils.getOAuthValidator(servletContext));
-        
super.setUseUserSubject(MessageUtils.isTrue(servletContext.getInitParameter(USE_USER_SUBJECT)));
+        
super.setUseUserSubject(PropertyUtils.isTrue(servletContext.getInitParameter(USE_USER_SUBJECT)));
     }
 
     public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain) throws

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
 
b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
index 6baac3c..f2cf773 100644
--- 
a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
+++ 
b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/utils/OAuthUtils.java
@@ -46,12 +46,12 @@ import net.oauth.OAuthValidator;
 import net.oauth.server.OAuthServlet;
 
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.jaxrs.ext.MessageContext;
 import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.model.URITemplate;
 import org.apache.cxf.jaxrs.utils.FormUtils;
-import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.rs.security.oauth.data.Client;
 import org.apache.cxf.rs.security.oauth.data.RequestToken;
@@ -164,8 +164,8 @@ public final class OAuthUtils {
                                            Exception e,
                                            int status) {
         ResponseBuilder builder = Response.status(status);
-        if 
(MessageUtils.isTrue(mc.getContextualProperty(REPORT_FAILURE_DETAILS))) {
-            boolean asHeader = MessageUtils.isTrue(
+        if 
(PropertyUtils.isTrue(mc.getContextualProperty(REPORT_FAILURE_DETAILS))) {
+            boolean asHeader = PropertyUtils.isTrue(
                 mc.getContextualProperty(REPORT_FAILURE_DETAILS_AS_HEADER));
             String text = null;
             if (e instanceof OAuthProblemException) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 17cb6a8..8a88b7b 100644
--- 
a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ 
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -39,13 +39,13 @@ import javax.ws.rs.ext.Provider;
 
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.security.SimplePrincipal;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.jaxrs.provider.FormEncodingProvider;
 import org.apache.cxf.jaxrs.utils.ExceptionUtils;
 import org.apache.cxf.jaxrs.utils.FormUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
-import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 import org.apache.cxf.rs.security.jose.common.JoseConstants;
 import org.apache.cxf.rs.security.oauth2.common.AccessTokenValidation;
@@ -257,7 +257,7 @@ public class OAuthRequestFilter extends 
AbstractAccessTokenValidator
         //used to handle preflights but local preflights (to be handled by the 
service code)
         // will be blocked by this filter unless CORS filter has done the 
initial validation
         // and set a message "local_preflight" property to true
-        return MessageUtils.isTrue(m.get("local_preflight"));
+        return PropertyUtils.isTrue(m.get("local_preflight"));
     }
 
     protected String validateAudiences(List<String> audiences) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
index ec21cba..4b84aa3 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
@@ -1599,9 +1599,8 @@ public abstract class HTTPConduit
             // soap fault because of a HTTP 400 should be returned back to the 
client (SOAP 1.2 spec)
 
             if (rc >= 400 && rc != 500
-                && 
!MessageUtils.isTrue(outMessage.getContextualProperty(NO_IO_EXCEPTIONS))
-                && (rc > 400 || !MessageUtils.isTrue(outMessage
-                    .getContextualProperty(PROCESS_FAULT_ON_HTTP_400)))) {
+                && !MessageUtils.getContextualBoolean(outMessage, 
NO_IO_EXCEPTIONS)
+                && (rc > 400 || !MessageUtils.getContextualBoolean(outMessage, 
PROCESS_FAULT_ON_HTTP_400))) {
 
                 throw new HTTPException(rc, getResponseMessage(), url.toURL());
             }
@@ -1814,7 +1813,7 @@ public abstract class HTTPConduit
         if (newURL != null) {
             URI newUri = URI.create(newURL);
 
-            if 
(MessageUtils.isTrue(message.getContextualProperty(AUTO_REDIRECT_SAME_HOST_ONLY)))
 {
+            if (MessageUtils.getContextualBoolean(message, 
AUTO_REDIRECT_SAME_HOST_ONLY)) {
 
                 URI lastUri = URI.create(lastURL);
 
@@ -1848,7 +1847,7 @@ public abstract class HTTPConduit
                                                        Message message) throws 
IOException {
         if (newURL != null && !newURL.startsWith("http")) {
 
-            if 
(MessageUtils.isTrue(message.getContextualProperty(AUTO_REDIRECT_ALLOW_REL_URI)))
 {
+            if (MessageUtils.getContextualBoolean(message, 
AUTO_REDIRECT_ALLOW_REL_URI)) {
                 return URI.create(lastURL).resolve(newURL).toString();
             }
             String msg = "Relative Redirect detected on Conduit '"

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
index e0f2f4d..01abef5 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java
@@ -148,11 +148,9 @@ public class URLConnectionHTTPConduit extends HTTPConduit {
         try {
             connection.setRequestMethod(httpRequestMethod);
         } catch (java.net.ProtocolException ex) {
-            Object o = 
message.getContextualProperty(HTTPURL_CONNECTION_METHOD_REFLECTION);
-            boolean b = DEFAULT_USE_REFLECTION;
-            if (o != null) {
-                b = MessageUtils.isTrue(o);
-            }
+            boolean b = MessageUtils.getContextualBoolean(message,
+                                                          
HTTPURL_CONNECTION_METHOD_REFLECTION,
+                                                          
DEFAULT_USE_REFLECTION);
             if (b) {
                 try {
                     java.lang.reflect.Field f = 
ReflectionUtil.getDeclaredField(HttpURLConnection.class, "method");
@@ -387,11 +385,9 @@ public class URLConnectionHTTPConduit extends HTTPConduit {
             }
         }
         protected String getResponseMessage() throws IOException {
-            Object o = 
this.outMessage.getContextualProperty(SET_REASON_PHRASE_NOT_NULL);
-            boolean b = SET_REASON_PHRASE;
-            if (o != null) {
-                b = MessageUtils.isTrue(o);
-            }
+            boolean b = MessageUtils.getContextualBoolean(this.outMessage,
+                                                          
SET_REASON_PHRASE_NOT_NULL,
+                                                          SET_REASON_PHRASE);
             if (connection.getResponseMessage() == null && b) {
                 //some http server like tomcat 8.5+ won't return the
                 //reason phrase in response, return a informative value

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
index cc8b4a0..464610f 100644
--- 
a/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
+++ 
b/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/AbstractSpnegoAuthSupplier.java
@@ -74,8 +74,7 @@ public abstract class AbstractSpnegoAuthSupplier {
         try {
             String spn = getCompleteServicePrincipalName(currentURI);
 
-            boolean useKerberosOid = MessageUtils.isTrue(
-                message.getContextualProperty(PROPERTY_USE_KERBEROS_OID));
+            boolean useKerberosOid = 
MessageUtils.getContextualBoolean(message, PROPERTY_USE_KERBEROS_OID);
             Oid oid = new Oid(useKerberosOid ? KERBEROS_OID : SPNEGO_OID);
 
             byte[] token = getToken(authPolicy, spn, oid, message);
@@ -151,8 +150,7 @@ public abstract class AbstractSpnegoAuthSupplier {
     }
 
     protected boolean isCredDelegationRequired(Message message) {
-        Object prop = 
message.getContextualProperty(PROPERTY_REQUIRE_CRED_DELEGATION);
-        return prop == null ? credDelegation : MessageUtils.isTrue(prop);
+        return MessageUtils.getContextualBoolean(message, 
PROPERTY_REQUIRE_CRED_DELEGATION, credDelegation);
     }
 
     protected String getCompleteServicePrincipalName(URI currentURI) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
index 444ceb9..50db27d 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
@@ -308,8 +308,7 @@ public class JMSConduit extends AbstractConduit implements 
JMSExchangeSender, Me
 
     private void assertIsNotTextMessageAndMtom(final Message outMessage) {
         boolean isTextPayload = 
JMSConstants.TEXT_MESSAGE_TYPE.equals(jmsConfig.getMessageType());
-        if (isTextPayload && 
MessageUtils.isTrue(outMessage.getContextualProperty(
-            org.apache.cxf.message.Message.MTOM_ENABLED))
+        if (isTextPayload && MessageUtils.getContextualBoolean(outMessage, 
org.apache.cxf.message.Message.MTOM_ENABLED)
             && outMessage.getAttachments() != null && 
outMessage.getAttachments().size() > 0) {
             org.apache.cxf.common.i18n.Message msg =
                 new org.apache.cxf.common.i18n.Message("INVALID_MESSAGE_TYPE", 
LOG);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
index dd71b41..ef2be92 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSDestination.java
@@ -84,8 +84,7 @@ public class JMSDestination extends 
AbstractMultiplexDestination implements Mess
      */
     protected Conduit getInbuiltBackChannel(Message inMessage) {
         //with JMS, non-robust OneWays will never need to send back a 
response, even a "202" response.
-        boolean robust =
-            
MessageUtils.isTrue(inMessage.getContextualProperty(Message.ROBUST_ONEWAY));
+        boolean robust = MessageUtils.getContextualBoolean(inMessage, 
Message.ROBUST_ONEWAY);
         if (inMessage.getExchange().isOneWay()
             && !robust) {
             return null;

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
index f7c8e7e..4bf28a2 100644
--- 
a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
+++ 
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSMessageUtils.java
@@ -39,6 +39,7 @@ import javax.jms.Session;
 import javax.jms.TextMessage;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.HttpHeaderHelper;
@@ -216,7 +217,7 @@ final class JMSMessageUtils {
             .get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         
         boolean isSoapMessage =
-            
!MessageUtils.isTrue(outMessage.getExchange().get(org.apache.cxf.message.Message.REST_MESSAGE));
+            
!PropertyUtils.isTrue(outMessage.getExchange().get(org.apache.cxf.message.Message.REST_MESSAGE));
         
         if (isSoapMessage) {
             if (!messageHeaders.isSetSOAPJMSTargetService()) {
@@ -366,7 +367,6 @@ final class JMSMessageUtils {
     }
 
     public static boolean isMtomEnabled(final org.apache.cxf.message.Message 
message) {
-        return MessageUtils.isTrue(message.getContextualProperty(
-                                                       
org.apache.cxf.message.Message.MTOM_ENABLED));
+        return MessageUtils.getContextualBoolean(message, 
org.apache.cxf.message.Message.MTOM_ENABLED);
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
----------------------------------------------------------------------
diff --git 
a/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
 
b/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
index ade22fd..f189497 100644
--- 
a/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
+++ 
b/rt/transports/local/src/main/java/org/apache/cxf/transport/local/LocalConduit.java
@@ -137,7 +137,7 @@ public class LocalConduit extends AbstractConduit {
     }
 
     public void prepare(final Message message) throws IOException {
-        if 
(!MessageUtils.isTrue(message.getContextualProperty(DIRECT_DISPATCH))) {
+        if (!MessageUtils.getContextualBoolean(message, DIRECT_DISPATCH)) {
             dispatchViaPipe(message);
         } else {
             // prepare the stream here
@@ -151,7 +151,7 @@ public class LocalConduit extends AbstractConduit {
 
     @Override
     public void close(Message message) throws IOException {
-        if (MessageUtils.isTrue(message.getContextualProperty(DIRECT_DISPATCH))
+        if (MessageUtils.getContextualBoolean(message, DIRECT_DISPATCH)
             && !Boolean.TRUE.equals(message.get(Message.INBOUND_MESSAGE))) {
             dispatchDirect(message);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
index c1dd82a..c56f9c6 100644
--- 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
+++ 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/InternalContextUtils.java
@@ -324,9 +324,8 @@ final class InternalContextUtils {
                                         "Executor queue is full, use the 
caller thread."
                                         + "  Users can specify a larger 
executor queue to avoid this.");
                             // only block the thread if the prop is unset or 
set to false, otherwise let it go
-                            if (!MessageUtils.isTrue(
-                                inMessage.getContextualProperty(
-                                    
"org.apache.cxf.oneway.rejected_execution_exception"))) {
+                            if (!MessageUtils.getContextualBoolean(inMessage, 
+                                    
"org.apache.cxf.oneway.rejected_execution_exception")) {
                                 //the executor queue is full, so run the task 
in the caller thread
                                 inMessage.getInterceptorChain().resume();
                             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
index deed6bf..12523675 100644
--- 
a/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
+++ 
b/rt/ws/addr/src/main/java/org/apache/cxf/ws/addressing/impl/MAPAggregatorImpl.java
@@ -43,6 +43,7 @@ import 
org.apache.cxf.binding.soap.interceptor.SoapActionInInterceptor;
 import org.apache.cxf.binding.soap.model.SoapOperationInfo;
 import org.apache.cxf.common.i18n.BundleUtils;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.endpoint.Client;
 import org.apache.cxf.endpoint.ClientLifeCycleListener;
@@ -1115,7 +1116,7 @@ public class MAPAggregatorImpl extends MAPAggregator {
             }
 
             if (!StringUtils.isEmpty(sa) && valid
-                && 
!MessageUtils.isTrue(message.get(MAPAggregator.ACTION_VERIFIED))) {
+                && 
!PropertyUtils.isTrue(message.get(MAPAggregator.ACTION_VERIFIED))) {
                 if (sa.startsWith("\"")) {
                     sa = sa.substring(1, sa.lastIndexOf('"'));
                 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
index 9bd568e..0492f88 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/KerberosTokenInterceptorProvider.java
@@ -163,7 +163,7 @@ public class KerberosTokenInterceptorProvider extends 
AbstractPolicyInterceptorP
             // extract Assertion information
 
             boolean enableStax =
-                
MessageUtils.isTrue(message.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+                MessageUtils.getContextualBoolean(message, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
             if (aim != null && !enableStax) {
                 Collection<AssertionInfo> ais =
                     PolicyUtils.getAllAssertionsByLocalname(aim, 
SPConstants.KERBEROS_TOKEN);
@@ -225,7 +225,7 @@ public class KerberosTokenInterceptorProvider extends 
AbstractPolicyInterceptorP
             // extract Assertion information
 
             boolean enableStax =
-                
MessageUtils.isTrue(message.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+                MessageUtils.getContextualBoolean(message, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
             if (aim != null && enableStax) {
                 Collection<AssertionInfo> ais =
                     PolicyUtils.getAllAssertionsByLocalname(aim, 
SPConstants.KERBEROS_TOKEN);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
index 34c5faa..b821ff6 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
@@ -74,7 +74,7 @@ public class PolicyBasedWSS4JInInterceptor extends 
WSS4JInInterceptor {
     public void handleMessage(SoapMessage msg) throws Fault {
         AssertionInfoMap aim = msg.get(AssertionInfoMap.class);
         boolean enableStax =
-            
MessageUtils.isTrue(msg.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+            MessageUtils.getContextualBoolean(msg, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
         if (aim != null && !enableStax) {
             super.handleMessage(msg);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
index f167c59..3400625 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JOutInterceptor.java
@@ -75,7 +75,7 @@ public class PolicyBasedWSS4JOutInterceptor extends 
AbstractPhaseInterceptor<Soa
 
     public void handleMessage(SoapMessage mc) throws Fault {
         boolean enableStax =
-            
MessageUtils.isTrue(mc.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+            MessageUtils.getContextualBoolean(mc, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
         if (!enableStax) {
             if (mc.getContent(SOAPMessage.class) == null) {
                 saajOut.handleMessage(mc);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
index 6ed3914..9144df3 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxInInterceptor.java
@@ -72,7 +72,7 @@ public class PolicyBasedWSS4JStaxInInterceptor extends 
WSS4JStaxInInterceptor {
     public void handleMessage(SoapMessage msg) throws Fault {
         AssertionInfoMap aim = msg.get(AssertionInfoMap.class);
         boolean enableStax =
-            
MessageUtils.isTrue(msg.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+            MessageUtils.getContextualBoolean(msg, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
         if (aim != null && enableStax) {
             super.handleMessage(msg);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxOutInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxOutInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxOutInterceptor.java
index 2c84683..a30ef1f 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxOutInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JStaxOutInterceptor.java
@@ -47,7 +47,7 @@ public class PolicyBasedWSS4JStaxOutInterceptor extends 
WSS4JStaxOutInterceptor
     public void handleMessage(SoapMessage msg) throws Fault {
         AssertionInfoMap aim = msg.get(AssertionInfoMap.class);
         boolean enableStax =
-            
MessageUtils.isTrue(msg.getContextualProperty(SecurityConstants.ENABLE_STREAMING_SECURITY));
+            MessageUtils.getContextualBoolean(msg, 
SecurityConstants.ENABLE_STREAMING_SECURITY);
         if (aim != null && enableStax) {
             super.handleMessage(msg);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
index 94f9544..a5fc659 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxInInterceptor.java
@@ -37,6 +37,7 @@ import 
org.apache.cxf.binding.soap.interceptor.StartBodyInterceptor;
 import org.apache.cxf.common.classloader.ClassLoaderUtils;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.interceptor.StaxInInterceptor;
 import org.apache.cxf.message.MessageUtils;
@@ -234,7 +235,7 @@ public class WSS4JStaxInInterceptor extends 
AbstractWSS4JStaxInterceptor {
         securityProperties.setSamlOneTimeUseReplayCache(samlCache);
 
         boolean enableRevocation =
-            
MessageUtils.isTrue(SecurityUtils.getSecurityPropertyValue(SecurityConstants.ENABLE_REVOCATION,
 msg));
+            
PropertyUtils.isTrue(SecurityUtils.getSecurityPropertyValue(SecurityConstants.ENABLE_REVOCATION,
 msg));
         securityProperties.setEnableRevocation(enableRevocation);
 
         // Crypto loading only applies for Map

http://git-wip-us.apache.org/repos/asf/cxf/blob/c8ca71a1/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
index cc79367..1ffa1ed 100644
--- 
a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
+++ 
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JUtils.java
@@ -37,6 +37,7 @@ import org.apache.cxf.binding.soap.SoapFault;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.binding.soap.SoapVersion;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertyUtils;
 import org.apache.cxf.endpoint.Endpoint;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
@@ -105,7 +106,7 @@ public final class WSS4JUtils {
         boolean specified = false;
         Object o = message.getContextualProperty(booleanKey);
         if (o != null) {
-            if (!MessageUtils.isTrue(o)) {
+            if (!PropertyUtils.isTrue(o)) {
                 return null;
             }
             specified = true;

Reply via email to