cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [02/51] [partial] cxf git commit: Remove all trailing whitespaces
Date Tue, 14 Feb 2017 09:49:07 GMT
http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
index 64b7a15..1ecc1b6 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
@@ -37,19 +37,19 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
     private static final String SECURE = "Secure";
     private static final String EXPIRES = "Expires";
     private static final String HTTP_ONLY = "HttpOnly";
-    
+
     /** from RFC 2068, token special case characters */
-    
+
     private static final String TSPECIALS_PATH = "\"()<>@,;:\\[]?={} \t";
     private static final String TSPECIALS_ALL = TSPECIALS_PATH + "/";
-    private static final String DOUBLE_QUOTE = "\""; 
-        
+    private static final String DOUBLE_QUOTE = "\"";
+
     public NewCookie fromString(String c) {
-        
+
         if (c == null) {
             throw new IllegalArgumentException("SetCookie value can not be null");
         }
-        
+
         String name = null;
         String value = null;
         String path = null;
@@ -60,19 +60,19 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
         Date expires = null;
         boolean httpOnly = false;
         int version = NewCookie.DEFAULT_VERSION;
-        
+
         String[] tokens = StringUtils.split(c, ";");
         for (String token : tokens) {
             String theToken = token.trim();
-            
+
             int sepIndex = theToken.indexOf('=');
             String paramName = sepIndex != -1 ? theToken.substring(0, sepIndex) : theToken;
-            String paramValue = sepIndex == -1 || sepIndex == theToken.length() - 1 
+            String paramValue = sepIndex == -1 || sepIndex == theToken.length() - 1
                 ? null : theToken.substring(sepIndex + 1);
             if (paramValue != null) {
                 paramValue = stripQuotes(paramValue);
             }
-            
+
             if (paramName.equalsIgnoreCase(MAX_AGE)) {
                 maxAge = Integer.parseInt(paramValue);
             } else if (paramName.equalsIgnoreCase(PATH)) {
@@ -94,14 +94,14 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
                 value = paramValue;
             }
         }
-        
+
         if (name == null || value == null) {
             throw new IllegalArgumentException("Set-Cookie is malformed : " + c);
         }
-        
+
         return new NewCookie(name, value, path, domain, version, comment, maxAge, expires, isSecure, httpOnly);
     }
-    
+
     @Override
     public String toString(NewCookie value) {
 
@@ -140,7 +140,7 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
     /**
      * Append the input value string to the given buffer, wrapping it with
      * quotes if need be.
-     * 
+     *
      * @param value
      * @return String
      */
@@ -167,7 +167,7 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
     /**
      * Return true iff the string contains special characters that need to be
      * quoted.
-     * 
+     *
      * @param value
      * @return boolean
      */
@@ -181,8 +181,8 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
         }
         if ('"' == value.charAt(0) && '"' == value.charAt(len - 1)) {
             // already wrapped with quotes
-            return false;         
-        } 
+            return false;
+        }
 
         for (int i = 0; i < len; i++) {
             char c = value.charAt(i);
@@ -192,7 +192,7 @@ public class NewCookieHeaderProvider implements HeaderDelegate<NewCookie> {
         }
         return false;
     }
-    
+
     static String stripQuotes(String paramValue) {
         if (paramValue.startsWith(DOUBLE_QUOTE)
             && paramValue.endsWith(DOUBLE_QUOTE) && paramValue.length() > 1) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java
index 6ab39d8..e558ec5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java
@@ -28,15 +28,15 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 public class PathSegmentImpl implements PathSegment {
 
     private String path;
-        
+
     public PathSegmentImpl(String path) {
         this(path, true);
     }
-    
+
     public PathSegmentImpl(String path, boolean decode) {
         this.path = decode ? HttpUtils.pathDecode(path) : path;
     }
-    
+
     public MultivaluedMap<String, String> getMatrixParameters() {
         return JAXRSUtils.getMatrixParams(path, false);
     }
@@ -47,13 +47,13 @@ public class PathSegmentImpl implements PathSegment {
         if (value.startsWith("/")) {
             value = value.length() == 1 ? "" : value.substring(1);
         }
-        return value; 
+        return value;
     }
-    
+
     public String getOriginalPath() {
         return path;
     }
-    
+
     public String getMatrixString() {
         int index = path.indexOf(';');
         if (index == -1) {
@@ -62,7 +62,7 @@ public class PathSegmentImpl implements PathSegment {
             return path.substring(index);
         }
     }
-    
+
     public String toString() {
         return path;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PropertyHolderFactory.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PropertyHolderFactory.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PropertyHolderFactory.java
index 3a0ce8e..f52a673 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PropertyHolderFactory.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PropertyHolderFactory.java
@@ -28,25 +28,25 @@ import org.apache.cxf.message.Message;
 
 public final class PropertyHolderFactory {
     private PropertyHolderFactory() {
-        
+
     }
-    
+
     public static PropertyHolder getPropertyHolder(Message m) {
         return m.containsKey("HTTP.REQUEST") ? new ServletRequestPropertyHolder(m) : new MessagePropertyHolder(m);
     }
-    
-    public interface PropertyHolder { 
+
+    public interface PropertyHolder {
         Object getProperty(String name);
         void removeProperty(String name);
         void setProperty(String name, Object value);
         Collection<String> getPropertyNames();
     }
-    
+
     private static class MessagePropertyHolder implements PropertyHolder {
         private static final String PROPERTY_KEY = "jaxrs.filter.properties";
         private Message m;
         private Map<String, Object> props;
-        
+
         MessagePropertyHolder(Message m) {
             this.m = m;
             this.props = CastUtils.cast((Map<?, ?>)m.getExchange().get(PROPERTY_KEY));
@@ -57,7 +57,7 @@ public final class PropertyHolderFactory {
 
         public void removeProperty(String name) {
             if (props != null) {
-                props.remove(name);    
+                props.remove(name);
             }
         }
 
@@ -66,17 +66,17 @@ public final class PropertyHolderFactory {
             if (props == null) {
                 props = new HashMap<String, Object>();
                 m.getExchange().put(PROPERTY_KEY, props);
-            }    
+            }
             if (value == null) {
                 removeProperty(name);
             } else {
                 props.put(name, value);
             }
-            
+
         }
 
         public Collection<String> getPropertyNames() {
-            return props == null ? Collections.<String>emptyList() 
+            return props == null ? Collections.<String>emptyList()
                 : Collections.unmodifiableSet(props.keySet());
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
index feba99e..b7f6953 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ProvidersImpl.java
@@ -39,7 +39,7 @@ public class ProvidersImpl implements Providers {
     public ProvidersImpl(Message m) {
         this.m = m;
     }
-    
+
     public <T> MessageBodyReader<T> getMessageBodyReader(
          Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
         return ProviderFactory.getInstance(m).createMessageBodyReader(

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorContextImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorContextImpl.java
index 2966737..9bdc5a5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorContextImpl.java
@@ -34,7 +34,7 @@ import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 
-public class ReaderInterceptorContextImpl extends AbstractInterceptorContextImpl 
+public class ReaderInterceptorContextImpl extends AbstractInterceptorContextImpl
     implements ReaderInterceptorContext {
 
     private List<ReaderInterceptor> readers;
@@ -49,7 +49,7 @@ public class ReaderInterceptorContextImpl extends AbstractInterceptorContextImpl
         this.is = is;
         this.readers = readers;
     }
-    
+
     @Override
     public MultivaluedMap<String, String> getHeaders() {
         return HttpUtils.getModifiableStringHeaders(m);
@@ -87,7 +87,7 @@ public class ReaderInterceptorContextImpl extends AbstractInterceptorContextImpl
             providerSelectionPropertyChanged();
         }
         getHeaders().putSingle(HttpHeaders.CONTENT_TYPE, JAXRSUtils.mediaTypeToString(mt));
-        
+
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorMBR.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorMBR.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorMBR.java
index 5830ad0..fcf890d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorMBR.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ReaderInterceptorMBR.java
@@ -40,17 +40,17 @@ public class ReaderInterceptorMBR implements ReaderInterceptor {
 
     private MessageBodyReader<?> reader;
     private Message m;
-    
+
     public ReaderInterceptorMBR(MessageBodyReader<?> reader,
                                 Message m) {
         this.reader = reader;
         this.m = m;
     }
-    
+
     public MessageBodyReader<?> getMBR() {
         return reader;
     }
-    
+
     @SuppressWarnings({
         "unchecked", "rawtypes"
     })
@@ -60,9 +60,9 @@ public class ReaderInterceptorMBR implements ReaderInterceptor {
         Type entityType = c.getGenericType();
         MediaType entityMt = c.getMediaType();
         Annotation[] entityAnns = c.getAnnotations();
-        
+
         if ((reader == null || m.get(ProviderFactory.PROVIDER_SELECTION_PROPERTY_CHANGED) == Boolean.TRUE
-            && !reader.isReadable(entityCls, entityType, entityAnns, entityMt)) 
+            && !reader.isReadable(entityCls, entityType, entityAnns, entityMt))
             && entityStreamAvailable(c.getInputStream())) {
             reader = ProviderFactory.getInstance(m)
                 .createMessageBodyReader(entityCls, entityType, entityAnns, entityMt, m);
@@ -71,9 +71,9 @@ public class ReaderInterceptorMBR implements ReaderInterceptor {
             String errorMessage = JAXRSUtils.logMessageHandlerProblem("NO_MSG_READER", entityCls, entityMt);
             throw new ProcessingException(errorMessage);
         }
-        
-        
-        return reader.readFrom(entityCls, entityType, entityAnns, entityMt, 
+
+
+        return reader.readFrom(entityCls, entityType, entityAnns, entityMt,
                                new HttpHeadersImpl(m).getRequestHeaders(),
                                c.getInputStream());
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
index 9f25400..221c25a 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
@@ -57,16 +57,16 @@ import org.apache.cxf.transport.http.AbstractHTTPDestination;
  */
 
 public class RequestImpl implements Request {
-    
+
     private final Message m;
     private final HttpHeaders headers;
-    
+
     public RequestImpl(Message m) {
         this.m = m;
         this.headers = new HttpHeadersImpl(m);
     }
 
-    
+
 
     public Variant selectVariant(List<Variant> vars) throws IllegalArgumentException {
         if (vars == null || vars.isEmpty()) {
@@ -76,33 +76,33 @@ public class RequestImpl implements Request {
         List<Locale> acceptLangs = headers.getAcceptableLanguages();
         List<String> acceptEncs = parseAcceptEnc(
             headers.getRequestHeaders().getFirst(HttpHeaders.ACCEPT_ENCODING));
-        
+
         List<Object> varyValues = new LinkedList<Object>();
-        
+
         List<Variant> matchingVars = new LinkedList<Variant>();
         for (Variant var : vars) {
             MediaType mt = var.getMediaType();
             Locale lang = var.getLanguage();
             String enc = var.getEncoding();
-                        
+
             boolean mtMatched = mt == null || acceptMediaTypes.isEmpty()
                 || JAXRSUtils.intersectMimeTypes(acceptMediaTypes, mt).size() != 0;
             if (mtMatched) {
                 handleVaryValues(varyValues, HttpHeaders.ACCEPT);
             }
-            
+
             boolean langMatched = lang == null || acceptLangs.isEmpty()
                 || isLanguageMatched(acceptLangs, lang);
             if (langMatched) {
                 handleVaryValues(varyValues, HttpHeaders.ACCEPT_LANGUAGE);
             }
-            
-            boolean encMatched = acceptEncs.isEmpty() || enc == null 
+
+            boolean encMatched = acceptEncs.isEmpty() || enc == null
                 || isEncMatached(acceptEncs, enc);
             if (encMatched) {
                 handleVaryValues(varyValues, HttpHeaders.ACCEPT_ENCODING);
             }
-            
+
             if (mtMatched && encMatched && langMatched) {
                 matchingVars.add(var);
             }
@@ -111,7 +111,7 @@ public class RequestImpl implements Request {
             addVaryHeader(varyValues);
             Collections.sort(matchingVars, new VariantComparator());
             return matchingVars.get(0);
-        } 
+        }
         return null;
     }
 
@@ -122,7 +122,7 @@ public class RequestImpl implements Request {
             }
         }
     }
-    
+
     private static void addVaryHeader(List<Object> varyValues) {
         // at this point we still have no out-bound message so lets
         // use HttpServletResponse. If needed we can save the header on the exchange
@@ -143,12 +143,12 @@ public class RequestImpl implements Request {
             }
         }
     }
-    
+
     private static boolean isLanguageMatched(List<Locale> locales, Locale l) {
-        
+
         for (Locale locale : locales) {
             String language = locale.getLanguage();
-            if ("*".equals(language) 
+            if ("*".equals(language)
                 || language.equalsIgnoreCase(l.getLanguage())) {
                 return true;
             }
@@ -181,21 +181,21 @@ public class RequestImpl implements Request {
         }
         return list;
     }
-    
+
     public ResponseBuilder evaluatePreconditions(EntityTag eTag) {
         if (eTag == null) {
             throw new IllegalArgumentException("ETag is null");
         }
         return evaluateAll(eTag, null);
     }
-    
+
     private ResponseBuilder evaluateAll(EntityTag eTag, Date lastModified) {
         // http://tools.ietf.org/search/draft-ietf-httpbis-p4-conditional-25#section-5
         // Check If-Match. If it is not available proceed to checking If-Not-Modified-Since
         // if it is available and the preconditions are not met - return, otherwise:
         // Check If-Not-Match. If it is not available proceed to checking If-Modified-Since
         // otherwise return the evaluation result
-        
+
         ResponseBuilder rb = evaluateIfMatch(eTag, lastModified);
         if (rb == null) {
             rb = evaluateIfNonMatch(eTag, lastModified);
@@ -205,11 +205,11 @@ public class RequestImpl implements Request {
 
     private ResponseBuilder evaluateIfMatch(EntityTag eTag, Date date) {
         List<String> ifMatch = headers.getRequestHeader(HttpHeaders.IF_MATCH);
-        
+
         if (ifMatch == null || ifMatch.size() == 0) {
             return date == null ? null : evaluateIfNotModifiedSince(date);
         }
-        
+
         try {
             for (String value : ifMatch) {
                 if ("*".equals(value)) {
@@ -229,11 +229,11 @@ public class RequestImpl implements Request {
 
     private ResponseBuilder evaluateIfNonMatch(EntityTag eTag, Date lastModified) {
         List<String> ifNonMatch = headers.getRequestHeader(HttpHeaders.IF_NONE_MATCH);
-        
+
         if (ifNonMatch == null || ifNonMatch.size() == 0) {
             return lastModified == null ? null : evaluateIfModifiedSince(lastModified);
         }
-        
+
         String method = getMethod();
         boolean getOrHead = HttpMethod.GET.equals(method) || HttpMethod.HEAD.equals(method);
         try {
@@ -241,7 +241,7 @@ public class RequestImpl implements Request {
                 boolean result = "*".equals(value);
                 if (!result) {
                     EntityTag requestTag = EntityTag.valueOf(value);
-                    result = getOrHead ? requestTag.equals(eTag) 
+                    result = getOrHead ? requestTag.equals(eTag)
                         : !requestTag.isWeak() && !eTag.isWeak() && requestTag.equals(eTag);
                 }
                 if (result) {
@@ -255,7 +255,7 @@ public class RequestImpl implements Request {
         }
         return null;
     }
-    
+
     public ResponseBuilder evaluatePreconditions(Date lastModified) {
         if (lastModified == null) {
             throw new IllegalArgumentException("Date is null");
@@ -266,14 +266,14 @@ public class RequestImpl implements Request {
         }
         return rb;
     }
-    
+
     private ResponseBuilder evaluateIfModifiedSince(Date lastModified) {
         List<String> ifModifiedSince = headers.getRequestHeader(HttpHeaders.IF_MODIFIED_SINCE);
-        
+
         if (ifModifiedSince == null || ifModifiedSince.size() == 0) {
             return null;
         }
-        
+
         SimpleDateFormat dateFormat = HttpUtils.getHttpDateFormat();
 
         dateFormat.setLenient(false);
@@ -284,22 +284,22 @@ public class RequestImpl implements Request {
             // invalid header value, request should continue
             return Response.status(Response.Status.PRECONDITION_FAILED);
         }
-        
+
         if (dateSince.before(lastModified)) {
             // request should continue
             return null;
         }
-        
+
         return Response.status(Response.Status.NOT_MODIFIED);
     }
-    
+
     private ResponseBuilder evaluateIfNotModifiedSince(Date lastModified) {
         List<String> ifNotModifiedSince = headers.getRequestHeader(HttpHeaders.IF_UNMODIFIED_SINCE);
-        
+
         if (ifNotModifiedSince == null || ifNotModifiedSince.size() == 0) {
             return null;
         }
-        
+
         SimpleDateFormat dateFormat = HttpUtils.getHttpDateFormat();
 
         dateFormat.setLenient(false);
@@ -310,11 +310,11 @@ public class RequestImpl implements Request {
             // invalid header value, request should continue
             return Response.status(Response.Status.PRECONDITION_FAILED);
         }
-        
+
         if (dateSince.before(lastModified)) {
             return Response.status(Response.Status.PRECONDITION_FAILED);
         }
-        
+
         return null;
     }
 
@@ -326,7 +326,7 @@ public class RequestImpl implements Request {
         }
         return evaluateAll(eTag, lastModified);
     }
-    
+
     public String getMethod() {
         return m.get(Message.HTTP_REQUEST_METHOD).toString();
     }
@@ -349,29 +349,29 @@ public class RequestImpl implements Request {
 
         public int compare(Variant v1, Variant v2) {
             int result = compareMediaTypes(v1.getMediaType(), v2.getMediaType());
-            
+
             if (result != 0) {
                 return result;
             }
-            
+
             result = compareLanguages(v1.getLanguage(), v2.getLanguage());
-            
+
             if (result == 0) {
                 result = compareEncodings(v1.getEncoding(), v2.getEncoding());
             }
-            
+
             return result;
         }
-        
+
         private static int compareMediaTypes(MediaType mt1, MediaType mt2) {
             if (mt1 != null && mt2 == null) {
                 return -1;
             } else if (mt1 == null && mt2 != null) {
                 return 1;
-            } 
+            }
             return JAXRSUtils.compareMediaTypes(mt1, mt2);
         }
-        
+
         private static int compareLanguages(Locale l1, Locale l2) {
             if (l1 != null && l2 == null) {
                 return -1;
@@ -380,7 +380,7 @@ public class RequestImpl implements Request {
             }
             return 0;
         }
-        
+
         private static int compareEncodings(String enc1, String enc2) {
             if (enc1 != null && enc2 == null) {
                 return -1;

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
index b033924..874d9bf 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
@@ -35,15 +35,15 @@ import org.apache.cxf.jaxrs.utils.HttpUtils;
 import org.apache.cxf.message.Message;
 
 public class RequestPreprocessor {
-    
+
     private static final String ACCEPT_QUERY = "_type";
     private static final String CTYPE_QUERY = "_ctype";
     private static final String METHOD_QUERY = "_method";
     private static final String METHOD_HEADER = "X-HTTP-Method-Override";
-    
+
     private static final Set<String> PATHS_TO_SKIP;
     private static final Map<String, String> MEDIA_TYPE_SHORTCUTS;
-    
+
     static {
         MEDIA_TYPE_SHORTCUTS = new HashMap<String, String>();
         MEDIA_TYPE_SHORTCUTS.put("json", "application/json");
@@ -52,38 +52,38 @@ public class RequestPreprocessor {
         MEDIA_TYPE_SHORTCUTS.put("atom", "application/atom+xml");
         MEDIA_TYPE_SHORTCUTS.put("html", "text/html");
         MEDIA_TYPE_SHORTCUTS.put("wadl", "application/vnd.sun.wadl+xml");
-        
+
         PATHS_TO_SKIP = new HashSet<>();
         PATHS_TO_SKIP.add("swagger.json");
         PATHS_TO_SKIP.add("swagger.yaml");
     }
-    
+
     private Map<Object, Object> languageMappings;
     private Map<Object, Object> extensionMappings;
-    
+
     public RequestPreprocessor() {
         this(null, null);
     }
-    
+
     public RequestPreprocessor(Map<Object, Object> languageMappings,
                            Map<Object, Object> extensionMappings) {
         this.languageMappings =
             languageMappings == null ? Collections.emptyMap() : languageMappings;
-        this.extensionMappings = 
+        this.extensionMappings =
             extensionMappings == null ? Collections.emptyMap() : extensionMappings;
     }
 
     public String preprocess(Message m, UriInfo u) {
         handleExtensionMappings(m, u);
         handleLanguageMappings(m, u);
-        
+
         MultivaluedMap<String, String> queries = u.getQueryParameters();
         handleTypeQuery(m, queries);
         handleCType(m, queries);
         handleMethod(m, queries, new HttpHeadersImpl(m));
         return new UriInfoImpl(m, null).getPath();
     }
-    
+
     private void handleLanguageMappings(Message m, UriInfo uriInfo) {
         if (languageMappings.isEmpty()) {
             return;
@@ -95,10 +95,10 @@ public class RequestPreprocessor {
                 updateAcceptLanguageHeader(m, entry.getValue().toString());
                 updatePath(m, path, entry.getKey().toString(), ps.getMatrixString());
                 break;
-            }    
+            }
         }
     }
-    
+
     private void handleExtensionMappings(Message m, UriInfo uriInfo) {
         if (extensionMappings.isEmpty()) {
             return;
@@ -114,7 +114,7 @@ public class RequestPreprocessor {
                 updateAcceptTypeHeader(m, entry.getValue().toString());
                 updatePath(m, path, key, ps.getMatrixString());
                 if ("wadl".equals(key)) {
-                    // the path has been updated and Accept was not necessarily set to 
+                    // the path has been updated and Accept was not necessarily set to
                     // WADL type (xml or json or html - other options)
                     String query = (String)m.get(Message.QUERY_STRING);
                     if (StringUtils.isEmpty(query)) {
@@ -127,22 +127,22 @@ public class RequestPreprocessor {
                 break;
             }
         }
-        
+
     }
-    
+
     @SuppressWarnings("unchecked")
     private void updateAcceptLanguageHeader(Message m, String anotherValue) {
         List<String> acceptLanguage =
             ((Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS)).get(HttpHeaders.ACCEPT_LANGUAGE);
         if (acceptLanguage == null) {
-            acceptLanguage = new ArrayList<>(); 
+            acceptLanguage = new ArrayList<>();
         }
-        
+
         acceptLanguage.add(anotherValue);
         ((Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS))
             .put(HttpHeaders.ACCEPT_LANGUAGE, acceptLanguage);
     }
-    
+
     private void updatePath(Message m, String path, String suffix, String matrixString) {
         String newPath = path.substring(0, path.length() - (suffix.length() + 1));
         if (matrixString != null) {
@@ -150,8 +150,8 @@ public class RequestPreprocessor {
         }
         HttpUtils.updatePath(m, newPath);
     }
-    
-    private void handleMethod(Message m, 
+
+    private void handleMethod(Message m,
                               MultivaluedMap<String, String> queries,
                               HttpHeaders headers) {
         String method = queries.getFirst(METHOD_QUERY);
@@ -165,7 +165,7 @@ public class RequestPreprocessor {
             m.put(Message.HTTP_REQUEST_METHOD, method);
         }
     }
-    
+
     private void handleTypeQuery(Message m, MultivaluedMap<String, String> queries) {
         String type = queries.getFirst(ACCEPT_QUERY);
         if (type != null) {
@@ -175,7 +175,7 @@ public class RequestPreprocessor {
             updateAcceptTypeHeader(m, type);
         }
     }
-    
+
     private void handleCType(Message m, MultivaluedMap<String, String> queries) {
         String type = queries.getFirst(CTYPE_QUERY);
         if (type != null) {
@@ -185,13 +185,13 @@ public class RequestPreprocessor {
             m.put(Message.CONTENT_TYPE, type);
         }
     }
-    
+
     @SuppressWarnings("unchecked")
     private void updateAcceptTypeHeader(Message m, String acceptValue) {
         m.put(Message.ACCEPT_CONTENT_TYPE, acceptValue);
         ((Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS))
         .put(HttpHeaders.ACCEPT, Collections.singletonList(acceptValue));
     }
-        
-    
+
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceContextImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceContextImpl.java
index 5e43f11..e6ad96c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceContextImpl.java
@@ -38,21 +38,21 @@ public class ResourceContextImpl implements ResourceContext {
         this.cri = ori.getClassResourceInfo();
         this.subClass = ori.getMethodToInvoke().getReturnType();
     }
-    
+
     @Override
     public <T> T getResource(Class<T> cls) {
         ResourceProvider rp = null;
-        
+
         Object propValue = m.getContextualProperty(CONTEXT_PROVIDER_PROP);
         if (propValue instanceof ResourceContextProvider) {
             rp = ((ResourceContextProvider)propValue).getResourceProvider(cls);
-        } else { 
+        } else {
             rp = new PerRequestResourceProvider(cls);
         }
         T resource = cls.cast(rp.getInstance(m));
         return doInitResource(cls, resource);
     }
-    
+
     public <T> T initResource(T resource) {
         return doInitResource(resource.getClass(), resource);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceInfoImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceInfoImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceInfoImpl.java
index 8baaf24..4c8217d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceInfoImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResourceInfoImpl.java
@@ -35,7 +35,7 @@ public class ResourceInfoImpl implements ResourceInfo {
     public ResourceInfoImpl(OperationResourceInfo ori) {
         this.ori = ori;
     }
-    
+
     @Override
     public Method getResourceMethod() {
         return ori == null ? null : ori.getMethodToInvoke();
@@ -44,5 +44,5 @@ public class ResourceInfoImpl implements ResourceInfo {
     public Class<?> getResourceClass() {
         return ori == null ? null : ori.getClassResourceInfo().getResourceClass();
     }
-    
+
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
index 78797a8..6854c2b 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
@@ -46,7 +46,7 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.PhaseInterceptorChain;
 
 public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
-    
+
     private int status = 200;
     private boolean statusSet;
     private Object entity;
@@ -62,13 +62,13 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
         metadata.putAll(copy.metadata);
         entity = copy.entity;
     }
-       
+
     public Response build() {
         if (entity == null && !statusSet) {
             status = 204;
         }
         ResponseImpl r = new ResponseImpl(status);
-        MetadataMap<String, Object> m = 
+        MetadataMap<String, Object> m =
             new MetadataMap<String, Object>(metadata, false, true);
         r.addMetadata(m);
         r.setEntity(entity, annotations);
@@ -102,7 +102,7 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
     public ResponseBuilder language(Locale locale) {
         return setHeader(HttpHeaders.CONTENT_LANGUAGE, locale);
     }
-    
+
     public ResponseBuilder language(String language) {
         return setHeader(HttpHeaders.CONTENT_LANGUAGE, language);
     }
@@ -111,7 +111,7 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
         if (!loc.isAbsolute()) {
             Message currentMessage = PhaseInterceptorChain.getCurrentMessage();
             if (currentMessage != null) {
-                
+
                 UriInfo ui = new UriInfoImpl(currentMessage.getExchange().getInMessage(), null);
                 loc = ui.getBaseUriBuilder()
                         .path(loc.getRawPath())
@@ -155,12 +155,12 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
     public ResponseBuilder cookie(NewCookie... cookies) {
         return addHeader(HttpHeaders.SET_COOKIE, (Object[])cookies);
     }
-    
+
     public ResponseBuilder header(String name, Object value) {
         return addHeader(name, value);
     }
 
-    
+
     @Override
     public ResponseBuilder variant(Variant variant) {
         type(variant == null ? null : variant.getMediaType());
@@ -199,7 +199,7 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
         handleVaryValue(acceptVary, acceptLangVary, acceptEncVary);
         return this;
     }
-    
+
     private void handleVaryValue(String ...values) {
         List<Object> varyValues = metadata.get(HttpHeaders.VARY);
         for (String v : values) {
@@ -213,7 +213,7 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
             }
         }
     }
-    
+
 //  CHECKSTYLE:OFF
     @Override
     public ResponseBuilder clone() {
@@ -221,14 +221,14 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
     }
 //  CHECKSTYLE:ON
 
-    
+
     private void reset() {
         metadata.clear();
         entity = null;
         annotations = null;
         status = 200;
     }
-    
+
     private ResponseBuilder setHeader(String name, Object value) {
         if (value == null) {
             metadata.remove(name);
@@ -237,22 +237,22 @@ public class ResponseBuilderImpl extends ResponseBuilder implements Cloneable {
         }
         return this;
     }
-    
+
     private ResponseBuilder addHeader(String name, Object... values) {
         if (values != null && values.length >= 1 && values[0] != null) {
             boolean isAllowHeader = HttpHeaders.ALLOW.equals(name);
             for (Object value : values) {
-                Object thevalue = isAllowHeader ? value.toString().toUpperCase() : value; 
+                Object thevalue = isAllowHeader ? value.toString().toUpperCase() : value;
                 if (!valueExists(name, thevalue)) {
                     metadata.add(name, thevalue);
                 }
             }
         } else {
             metadata.remove(name);
-        }    
+        }
         return this;
     }
-    
+
     private boolean valueExists(String key, Object value) {
         List<Object> values = metadata.get(key);
         return values == null ? false : values.contains(value);

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
index 0039923..0363650 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
@@ -62,43 +62,43 @@ import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageUtils;
 
 public final class ResponseImpl extends Response {
-    
+
     private int status;
     private Object entity;
-    private Annotation[] entityAnnotations; 
+    private Annotation[] entityAnnotations;
     private MultivaluedMap<String, Object> metadata;
-    
+
     private Message outMessage;
-    private boolean entityClosed;    
+    private boolean entityClosed;
     private boolean entityBufferred;
     private Object lastEntity;
-    
+
     ResponseImpl(int s) {
         this.status = s;
     }
-    
+
     ResponseImpl(int s, Object e) {
         this.status = s;
         this.entity = e;
     }
-    
-    public void addMetadata(MultivaluedMap<String, Object> meta) { 
+
+    public void addMetadata(MultivaluedMap<String, Object> meta) {
         this.metadata = meta;
     }
-    
-    public void setStatus(int s) { 
+
+    public void setStatus(int s) {
         this.status = s;
     }
-    
-    public void setEntity(Object e, Annotation[] anns) { 
+
+    public void setEntity(Object e, Annotation[] anns) {
         this.entity = e;
         this.entityAnnotations = anns;
     }
-    
-    public void setEntityAnnotations(Annotation[] anns) { 
+
+    public void setEntityAnnotations(Annotation[] anns) {
         this.entityAnnotations = anns;
     }
-    
+
     public Annotation[] getEntityAnnotations() {
         return entityAnnotations;
     }
@@ -106,11 +106,11 @@ public final class ResponseImpl extends Response {
     public void setOutMessage(Message message) {
         this.outMessage = message;
     }
-    
+
     public Message getOutMessage() {
         return this.outMessage;
     }
-    
+
     public int getStatus() {
         return status;
     }
@@ -123,22 +123,22 @@ public final class ResponseImpl extends Response {
             }
 
             public String getReasonPhrase() {
-                Response.Status statusEnum = Response.Status.fromStatusCode(ResponseImpl.this.status); 
+                Response.Status statusEnum = Response.Status.fromStatusCode(ResponseImpl.this.status);
                 return statusEnum != null ? statusEnum.getReasonPhrase() : "";
             }
 
             public int getStatusCode() {
                 return ResponseImpl.this.status;
-            } 
-            
+            }
+
         };
     }
-    
+
     public Object getActualEntity() {
         checkEntityIsClosed();
         return lastEntity != null ? lastEntity : entity;
     }
-    
+
     public Object getEntity() {
         return InjectionUtils.getEntity(getActualEntity());
     }
@@ -146,15 +146,15 @@ public final class ResponseImpl extends Response {
     public boolean hasEntity() {
         return getActualEntity() != null;
     }
-    
+
     public MultivaluedMap<String, Object> getMetadata() {
         return getHeaders();
     }
-    
+
     public MultivaluedMap<String, Object> getHeaders() {
         return metadata;
     }
-    
+
     public MultivaluedMap<String, String> getStringHeaders() {
         MetadataMap<String, String> headers = new MetadataMap<String, String>(metadata.size());
         for (Map.Entry<String, List<Object>> entry : metadata.entrySet()) {
@@ -168,22 +168,22 @@ public final class ResponseImpl extends Response {
         List<Object> methodValues = metadata.get(header);
         return HttpUtils.getHeaderString(toListOfStrings(header, methodValues));
     }
-    
+
     // This conversion is needed as some values may not be Strings
     private List<String> toListOfStrings(String headerName, List<Object> values) {
         if (values == null) {
-            return null; 
+            return null;
         } else {
             List<String> stringValues = new ArrayList<>(values.size());
             HeaderDelegate<Object> hd = HttpUtils.getHeaderDelegate(values.get(0));
             for (Object value : values) {
-                String actualValue = hd == null ? value.toString() : hd.toString(value); 
+                String actualValue = hd == null ? value.toString() : hd.toString(value);
                 stringValues.add(actualValue);
             }
             return stringValues;
         }
     }
-    
+
     public Set<String> getAllowedMethods() {
         List<Object> methodValues = metadata.get(HttpHeaders.ALLOW);
         if (methodValues == null) {
@@ -197,8 +197,8 @@ public final class ResponseImpl extends Response {
         }
     }
 
-    
-    
+
+
     public Map<String, NewCookie> getCookies() {
         List<Object> cookieValues = metadata.get(HttpHeaders.SET_COOKIE);
         if (cookieValues == null) {
@@ -222,7 +222,7 @@ public final class ResponseImpl extends Response {
         return value == null || value instanceof Date ? (Date)value
             : HttpUtils.getHttpDate(value.toString());
     }
-    
+
     public EntityTag getEntityTag() {
         Object header = metadata.getFirst(HttpHeaders.ETAG);
         return header == null || header instanceof EntityTag ? (EntityTag)header
@@ -252,10 +252,10 @@ public final class ResponseImpl extends Response {
 
     public MediaType getMediaType() {
         Object header = metadata.getFirst(HttpHeaders.CONTENT_TYPE);
-        return header == null || header instanceof MediaType ? (MediaType)header 
+        return header == null || header instanceof MediaType ? (MediaType)header
             : (MediaType)JAXRSUtils.toMediaType(header.toString());
     }
-    
+
     public boolean hasLink(String relation) {
         List<Object> linkValues = metadata.get(HttpHeaders.LINK);
         if (linkValues != null) {
@@ -268,7 +268,7 @@ public final class ResponseImpl extends Response {
         }
         return false;
     }
-    
+
     public Link getLink(String relation) {
         Set<Link> links = getAllLinks();
         for (Link link : links) {
@@ -305,7 +305,7 @@ public final class ResponseImpl extends Response {
             return links;
         }
     }
-    
+
     public <T> T readEntity(Class<T> cls) throws ProcessingException, IllegalStateException {
         return readEntity(cls, new Annotation[]{});
     }
@@ -316,33 +316,33 @@ public final class ResponseImpl extends Response {
 
     public <T> T readEntity(Class<T> cls, Annotation[] anns) throws ProcessingException,
         IllegalStateException {
-        
+
         return doReadEntity(cls, cls, anns);
     }
 
     @SuppressWarnings("unchecked")
     public <T> T readEntity(GenericType<T> genType, Annotation[] anns) throws ProcessingException,
         IllegalStateException {
-        return doReadEntity((Class<T>)genType.getRawType(), 
+        return doReadEntity((Class<T>)genType.getRawType(),
                             genType.getType(), anns);
     }
-    
+
     public <T> T doReadEntity(Class<T> cls, Type t, Annotation[] anns) throws ProcessingException,
         IllegalStateException {
-        
+
         checkEntityIsClosed();
-        
+
         if (lastEntity != null && cls.isAssignableFrom(lastEntity.getClass())
             && !(lastEntity instanceof InputStream)) {
             return cls.cast(lastEntity);
-        } 
-        
+        }
+
         MediaType mediaType = getMediaType();
         if (mediaType == null) {
             mediaType = MediaType.WILDCARD_TYPE;
         }
-        
-        // the stream is available if entity is IS or 
+
+        // the stream is available if entity is IS or
         // message contains XMLStreamReader or Reader
         boolean entityStreamAvailable = entityStreamAvailable();
         InputStream entityStream = null;
@@ -353,26 +353,26 @@ public final class ResponseImpl extends Response {
         } else if (entity instanceof InputStream) {
             entityStream = InputStream.class.cast(entity);
         }
-        
+
         // we need to check for readers even if no IS is set - the readers may still do it
         List<ReaderInterceptor> readers = outMessage == null ? null : ProviderFactory.getInstance(outMessage)
             .createMessageBodyReaderInterceptor(cls, t, anns, mediaType, outMessage, entityStreamAvailable, null);
-        
+
         if (readers != null) {
             try {
                 if (entityBufferred) {
                     InputStream.class.cast(entity).reset();
                 }
-                
+
                 Message responseMessage = getResponseMessage();
                 responseMessage.put(Message.PROTOCOL_HEADERS, getHeaders());
-                
-                lastEntity = JAXRSUtils.readFromMessageBodyReader(readers, cls, t, 
-                                                                       anns, 
-                                                                       entityStream, 
-                                                                       mediaType, 
+
+                lastEntity = JAXRSUtils.readFromMessageBodyReader(readers, cls, t,
+                                                                       anns,
+                                                                       entityStream,
+                                                                       mediaType,
                                                                        responseMessage);
-                autoClose(cls, false); 
+                autoClose(cls, false);
                 return castLastEntity();
             } catch (Exception ex) {
                 autoClose(cls, true);
@@ -388,18 +388,18 @@ public final class ResponseImpl extends Response {
             return castLastEntity();
         } else if (entityStreamAvailable) {
             reportMessageHandlerProblem("NO_MSG_READER", cls, mediaType, null);
-        } 
-        
+        }
+
         throw new IllegalStateException("The entity is not backed by an input stream, entity class is : "
             + (entity != null ? entity.getClass().getName() : cls.getName()));
-        
+
     }
-    
+
     @SuppressWarnings("unchecked")
     private <T> T castLastEntity() {
         return (T)lastEntity;
     }
-    
+
     public InputStream convertEntityToStreamIfPossible() {
         String stringEntity = null;
         if (entity instanceof String || entity instanceof Number) {
@@ -415,37 +415,37 @@ public final class ResponseImpl extends Response {
             return null;
         }
     }
-    
+
     private boolean entityStreamAvailable() {
         if (entity == null) {
-            Message inMessage = getResponseMessage();    
+            Message inMessage = getResponseMessage();
             return inMessage != null && (inMessage.getContent(XMLStreamReader.class) != null
                 || inMessage.getContent(Reader.class) != null);
         } else {
             return entity instanceof InputStream;
         }
     }
-    
+
     private Message getResponseMessage() {
         Message responseMessage = outMessage.getExchange().getInMessage();
         if (responseMessage == null) {
-            responseMessage = outMessage.getExchange().getInFaultMessage();    
+            responseMessage = outMessage.getExchange().getInFaultMessage();
         }
         return responseMessage;
     }
-    
+
     private void reportMessageHandlerProblem(String name, Class<?> cls, MediaType ct, Throwable cause) {
         String errorMessage = JAXRSUtils.logMessageHandlerProblem(name, cls, ct);
         throw new ResponseProcessingException(this, errorMessage, cause);
     }
-    
+
     protected void autoClose(Class<?> cls, boolean exception) {
         if (!entityBufferred && !JAXRSUtils.isStreamingOutType(cls)
             && (exception || MessageUtils.isTrue(outMessage.getContextualProperty("response.stream.auto.close")))) {
             close();
         }
     }
-    
+
     public boolean bufferEntity() throws ProcessingException {
         checkEntityIsClosed();
         if (!entityBufferred && entity instanceof InputStream) {
@@ -473,9 +473,9 @@ public final class ResponseImpl extends Response {
             entity = null;
             entityClosed = true;
         }
-        
+
     }
-    
+
     private void checkEntityIsClosed() {
         if (entityClosed) {
             throw new IllegalStateException("Entity is not available");

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
index dcd5946..612578c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
@@ -42,8 +42,8 @@ import org.apache.cxf.jaxrs.utils.ResourceUtils;
 
 
 public class RuntimeDelegateImpl extends RuntimeDelegate {
-    protected Map<Class<?>, HeaderDelegate<?>> headerProviders 
-        = new HashMap<Class<?>, HeaderDelegate<?>>();    
+    protected Map<Class<?>, HeaderDelegate<?>> headerProviders
+        = new HashMap<Class<?>, HeaderDelegate<?>>();
 
     public RuntimeDelegateImpl() {
         headerProviders.put(MediaType.class, new MediaTypeHeaderProvider());
@@ -54,13 +54,13 @@ public class RuntimeDelegateImpl extends RuntimeDelegate {
         headerProviders.put(Link.class, new LinkHeaderProvider());
         headerProviders.put(Date.class, new DateHeaderProvider());
     }
-    
-    
-    
+
+
+
     public <T> T createInstance(Class<T> type) {
         if (type.isAssignableFrom(ResponseBuilder.class)) {
             return type.cast(new ResponseBuilderImpl());
-        } 
+        }
         if (type.isAssignableFrom(UriBuilder.class)) {
             return type.cast(new UriBuilderImpl());
         }
@@ -69,8 +69,8 @@ public class RuntimeDelegateImpl extends RuntimeDelegate {
         }
         return null;
     }
-   
-    
+
+
     @SuppressWarnings("unchecked")
     @Override
     public <T> HeaderDelegate<T> createHeaderDelegate(Class<T> type) {
@@ -98,13 +98,13 @@ public class RuntimeDelegateImpl extends RuntimeDelegate {
 
     @Override
     public VariantListBuilder createVariantListBuilder() {
-        return new VariantListBuilderImpl(); 
+        return new VariantListBuilderImpl();
     }
 
 
 
     @Override
-    public <T> T createEndpoint(Application app, Class<T> endpointType) 
+    public <T> T createEndpoint(Application app, Class<T> endpointType)
         throws IllegalArgumentException, UnsupportedOperationException {
         if (app == null || (!Server.class.isAssignableFrom(endpointType)
             && !JAXRSServerFactoryBean.class.isAssignableFrom(endpointType))) {
@@ -125,6 +125,6 @@ public class RuntimeDelegateImpl extends RuntimeDelegate {
     public Link.Builder createLinkBuilder() {
         return new LinkBuilderImpl();
     }
-    
+
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
index 5127d7b..3088f62 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
@@ -33,7 +33,7 @@ import org.apache.cxf.message.Message;
 
 public class SecurityContextImpl implements SecurityContext {
     private Message m;
-    
+
     public SecurityContextImpl(Message m) {
         this.m = m;
     }
@@ -43,7 +43,7 @@ public class SecurityContextImpl implements SecurityContext {
             return SecurityContext.BASIC_AUTH;
         }
         @SuppressWarnings("unchecked")
-        Map<String, List<String>> headers = 
+        Map<String, List<String>> headers =
             (Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS);
         if (headers != null) {
             List<String> values = headers.get(HttpHeaders.AUTHORIZATION);
@@ -65,7 +65,7 @@ public class SecurityContextImpl implements SecurityContext {
         return sc == null ? null : sc.getUserPrincipal();
     }
 
-    
+
     public boolean isSecure() {
         String value = HttpUtils.getEndpointAddress(m);
         return value.startsWith("https://");

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
index 31d6606..aab96d8 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
@@ -30,19 +30,19 @@ import org.apache.cxf.transport.http.AbstractHTTPDestination;
 public class ServletOutputStreamFilter extends ServletOutputStream {
 
     private Message m;
-    private ServletOutputStream os; 
-    
+    private ServletOutputStream os;
+
     public ServletOutputStreamFilter(ServletOutputStream os, Message m) {
         this.os = os;
         this.m = m;
     }
-    
+
     @Override
     public void write(int b) throws IOException {
         setComittedStatus();
         os.write(b);
     }
-    
+
     @Override
     public void write(byte[] b) throws IOException {
         setComittedStatus();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletRequestPropertyHolder.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletRequestPropertyHolder.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletRequestPropertyHolder.java
index ccaf80d..d17cf32 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletRequestPropertyHolder.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletRequestPropertyHolder.java
@@ -34,7 +34,7 @@ public class ServletRequestPropertyHolder implements PropertyHolder {
     public ServletRequestPropertyHolder(Message m) {
         request = (HttpServletRequest)m.get("HTTP.REQUEST");
     }
-    
+
     @Override
     public Object getProperty(String name) {
         return request.getAttribute(name);
@@ -56,7 +56,7 @@ public class ServletRequestPropertyHolder implements PropertyHolder {
 
     @Override
     public Collection<String> getPropertyNames() {
-        List<String> list = new LinkedList<String>(); 
+        List<String> list = new LinkedList<String>();
         Enumeration<String> attrNames = request.getAttributeNames();
         while (attrNames.hasMoreElements()) {
             String name = attrNames.nextElement();

http://git-wip-us.apache.org/repos/asf/cxf/blob/8cea7c87/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
index 476c629..820d6b0 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
@@ -54,14 +54,14 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
     private boolean originalPathEmpty;
     private boolean leadingSlash;
     private String fragment;
-    private String schemeSpecificPart; 
+    private String schemeSpecificPart;
     private MultivaluedMap<String, String> query = new MetadataMap<String, String>();
     private MultivaluedMap<String, String> matrix = new MetadataMap<String, String>();
-    
+
     private Map<String, Object> resolvedTemplates;
     private Map<String, Object> resolvedTemplatesPathEnc;
     private Map<String, Object> resolvedEncodedTemplates;
-    
+
     /**
      * Creates builder with empty URI.
      */
@@ -70,7 +70,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
 
     /**
      * Creates builder initialized with given URI.
-     * 
+     *
      * @param uri initial value for builder
      * @throws IllegalArgumentException when uri is null
      */
@@ -87,7 +87,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         return rtemplates == null
             ? Collections.<String, Object>emptyMap() : new LinkedHashMap<String, Object>(rtemplates);
     }
-    
+
     private URI doBuild(boolean fromEncoded, boolean encodePathSlash, Object... values) {
         if (values == null) {
             throw new IllegalArgumentException("Template parameter values are set to null");
@@ -97,7 +97,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                 throw new IllegalArgumentException("Template parameter value at position " + i + " is set to null");
             }
         }
-        
+
         UriParts parts = doBuildUriParts(fromEncoded, encodePathSlash, false, values);
         try {
             return buildURI(fromEncoded, parts.path, parts.query, parts.fragment);
@@ -105,58 +105,58 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             throw new UriBuilderException("URI can not be built", ex);
         }
     }
-    
-    private UriParts doBuildUriParts(boolean fromEncoded, boolean encodePathSlash, 
+
+    private UriParts doBuildUriParts(boolean fromEncoded, boolean encodePathSlash,
                                      boolean allowUnresolved, Object... values) {
-        
+
         Map<String, Object> alreadyResolvedTs = getResolvedTemplates(resolvedTemplates);
         Map<String, Object> alreadyResolvedTsPathEnc = getResolvedTemplates(resolvedTemplatesPathEnc);
         Map<String, Object> alreadyResolvedEncTs = getResolvedTemplates(resolvedEncodedTemplates);
-        final int resolvedTsSize = alreadyResolvedTs.size() 
+        final int resolvedTsSize = alreadyResolvedTs.size()
             + alreadyResolvedEncTs.size()
             + alreadyResolvedTsPathEnc.size();
-        
+
         String thePath = buildPath();
         URITemplate pathTempl = new URITemplate(thePath);
-        thePath = substituteVarargs(pathTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
-                                    alreadyResolvedEncTs, values, 0, false, fromEncoded, 
+        thePath = substituteVarargs(pathTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc,
+                                    alreadyResolvedEncTs, values, 0, false, fromEncoded,
                                     allowUnresolved, encodePathSlash);
         int pathTemplateVarsSize = pathTempl.getVariables().size();
-        
+
         String theQuery = buildQuery();
         int queryTemplateVarsSize = 0;
         if (theQuery != null) {
             URITemplate queryTempl = new URITemplate(theQuery);
             queryTemplateVarsSize = queryTempl.getVariables().size();
             if (queryTemplateVarsSize > 0) {
-                int lengthDiff = values.length + resolvedTsSize 
-                    - alreadyResolvedTs.size() - alreadyResolvedTsPathEnc.size() - alreadyResolvedEncTs.size() 
-                    - pathTemplateVarsSize; 
-                theQuery = substituteVarargs(queryTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
-                                             alreadyResolvedEncTs, values, values.length - lengthDiff, 
+                int lengthDiff = values.length + resolvedTsSize
+                    - alreadyResolvedTs.size() - alreadyResolvedTsPathEnc.size() - alreadyResolvedEncTs.size()
+                    - pathTemplateVarsSize;
+                theQuery = substituteVarargs(queryTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc,
+                                             alreadyResolvedEncTs, values, values.length - lengthDiff,
                                              true, fromEncoded, allowUnresolved, false);
             }
         }
-        
+
         String theFragment = fragment;
         if (theFragment != null) {
             URITemplate fragmentTempl = new URITemplate(theFragment);
             if (fragmentTempl.getVariables().size() > 0) {
-                int lengthDiff = values.length  + resolvedTsSize 
+                int lengthDiff = values.length  + resolvedTsSize
                     - alreadyResolvedTs.size() - alreadyResolvedTsPathEnc.size() - alreadyResolvedEncTs.size()
-                    - pathTemplateVarsSize - queryTemplateVarsSize; 
-                theFragment = substituteVarargs(fragmentTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
-                                                alreadyResolvedEncTs, values, values.length - lengthDiff, 
+                    - pathTemplateVarsSize - queryTemplateVarsSize;
+                theFragment = substituteVarargs(fragmentTempl, alreadyResolvedTs, alreadyResolvedTsPathEnc,
+                                                alreadyResolvedEncTs, values, values.length - lengthDiff,
                                                 true, fromEncoded, allowUnresolved, false);
             }
         }
-        
+
         return new UriParts(thePath, theQuery, theFragment);
     }
-    
-    private URI buildURI(boolean fromEncoded, String thePath, String theQuery, String theFragment) 
+
+    private URI buildURI(boolean fromEncoded, String thePath, String theQuery, String theFragment)
         throws URISyntaxException {
-        if (fromEncoded) { 
+        if (fromEncoded) {
             return buildURIFromEncoded(thePath, theQuery, theFragment);
         } else if (!isSchemeOpaque()) {
             if ((scheme != null || host != null || userInfo != null)
@@ -168,7 +168,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             } catch (Exception ex) {
                 // lets try the option below
             }
-            URI uri = new URI(scheme, userInfo, host, port, 
+            URI uri = new URI(scheme, userInfo, host, port,
                            thePath, theQuery, theFragment);
             if (thePath.contains("%2F")) {
                 // TODO: the bogus case of segments containing encoded '/'
@@ -181,12 +181,12 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             return new URI(scheme, schemeSpecificPart, theFragment);
         }
     }
-    
-    private URI buildURIFromEncoded(String thePath, String theQuery, String theFragment) 
+
+    private URI buildURIFromEncoded(String thePath, String theQuery, String theFragment)
         throws URISyntaxException {
         return new URI(buildUriString(thePath, theQuery, theFragment));
     }
-    
+
     private String buildUriString(String thePath, String theQuery, String theFragment) {
         StringBuilder b = new StringBuilder();
         if (scheme != null) {
@@ -203,10 +203,10 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                 b.append(host);
             }
             if (port != -1) {
-                b.append(':').append(port);    
+                b.append(':').append(port);
             }
             if (thePath != null && thePath.length() > 0) {
-                b.append(thePath.startsWith("/") || b.length() == 0 || originalPathEmpty 
+                b.append(thePath.startsWith("/") || b.length() == 0 || originalPathEmpty
                     ? thePath : '/' + thePath);
             }
             if (theQuery != null && theQuery.length() != 0) {
@@ -220,11 +220,11 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         }
         return b.toString();
     }
-    
+
     private boolean isSchemeOpaque() {
         return schemeSpecificPart != null;
     }
-    
+
     @Override
     public URI buildFromEncoded(Object... values) throws IllegalArgumentException, UriBuilderException {
         return doBuild(true, false, values);
@@ -236,48 +236,48 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         return doBuildFromMap(map, false, true);
     }
 
-    private URI doBuildFromMap(Map<String, ? extends Object> map, boolean fromEncoded, 
-                               boolean encodePathSlash) 
+    private URI doBuildFromMap(Map<String, ? extends Object> map, boolean fromEncoded,
+                               boolean encodePathSlash)
         throws IllegalArgumentException, UriBuilderException {
         try {
             Map<String, Object> alreadyResolvedTs = getResolvedTemplates(resolvedTemplates);
             Map<String, Object> alreadyResolvedTsPathEnc = getResolvedTemplates(resolvedTemplatesPathEnc);
             Map<String, Object> alreadyResolvedEncTs = getResolvedTemplates(resolvedEncodedTemplates);
-                        
+
             String thePath = buildPath();
-            thePath = substituteMapped(thePath, map, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
+            thePath = substituteMapped(thePath, map, alreadyResolvedTs, alreadyResolvedTsPathEnc,
                                        alreadyResolvedEncTs, false, fromEncoded, encodePathSlash);
-            
+
             String theQuery = buildQuery();
             if (theQuery != null) {
-                theQuery = substituteMapped(theQuery, map, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
+                theQuery = substituteMapped(theQuery, map, alreadyResolvedTs, alreadyResolvedTsPathEnc,
                                             alreadyResolvedEncTs, true, fromEncoded, false);
             }
-            
-            String theFragment = fragment == null 
-                ? null : substituteMapped(fragment, map, alreadyResolvedTs, alreadyResolvedTsPathEnc, 
+
+            String theFragment = fragment == null
+                ? null : substituteMapped(fragment, map, alreadyResolvedTs, alreadyResolvedTsPathEnc,
                                           alreadyResolvedEncTs, true, fromEncoded, encodePathSlash);
-            
+
             return buildURI(fromEncoded, thePath, theQuery, theFragment);
         } catch (URISyntaxException ex) {
             throw new UriBuilderException("URI can not be built", ex);
         }
     }
     //CHECKSTYLE:OFF
-    private String substituteVarargs(URITemplate templ, 
+    private String substituteVarargs(URITemplate templ,
                                      Map<String, Object> alreadyResolvedTs,
                                      Map<String, Object> alreadyResolvedTsPathEnc,
                                      Map<String, Object> alreadyResolvedTsEnc,
-                                     Object[] values, 
+                                     Object[] values,
                                      int ind,
                                      boolean isQuery,
                                      boolean fromEncoded,
                                      boolean allowUnresolved,
                                      boolean encodePathSlash) {
-        
-   //CHECKSTYLE:ON     
+
+   //CHECKSTYLE:ON
         Map<String, String> varValueMap = new HashMap<String, String>();
-        
+
         // vars in set are properly ordered due to linking in hash set
         Set<String> uniqueVars = new LinkedHashSet<String>(templ.getVariables());
         if (!allowUnresolved && values.length + alreadyResolvedTs.size() + alreadyResolvedTsEnc.size()
@@ -287,14 +287,14 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                                                + " unique variable(s)");
         }
         int idx = ind;
-        Set<String> pathEncodeVars = alreadyResolvedTsPathEnc.isEmpty() && !encodePathSlash 
+        Set<String> pathEncodeVars = alreadyResolvedTsPathEnc.isEmpty() && !encodePathSlash
             ? Collections.<String>emptySet() : new HashSet<>();
         for (String var : uniqueVars) {
-            
+
             boolean resolvedPathVarHasToBeEncoded = alreadyResolvedTsPathEnc.containsKey(var);
             boolean varValueHasToBeEncoded = resolvedPathVarHasToBeEncoded || alreadyResolvedTs.containsKey(var);
-            
-            Map<String, Object> resolved = !varValueHasToBeEncoded ? alreadyResolvedTsEnc 
+
+            Map<String, Object> resolved = !varValueHasToBeEncoded ? alreadyResolvedTsEnc
                 : resolvedPathVarHasToBeEncoded ? alreadyResolvedTsPathEnc : alreadyResolvedTs;
             Object oval = resolved.isEmpty() ? null : resolved.remove(var);
             boolean valueFromEncodedMap = false;
@@ -306,7 +306,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             } else {
                 valueFromEncodedMap = resolved == alreadyResolvedTsEnc;
             }
-            
+
             if (oval == null) {
                 throw new IllegalArgumentException("No object for " + var);
             }
@@ -316,20 +316,20 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             } else {
                 value = isQuery ? HttpUtils.queryEncode(value) : HttpUtils.pathEncode(value);
             }
-            
+
             varValueMap.put(var, value);
-            
-            if (!isQuery && (resolvedPathVarHasToBeEncoded 
+
+            if (!isQuery && (resolvedPathVarHasToBeEncoded
                 || encodePathSlash && !varValueHasToBeEncoded)) {
                 pathEncodeVars.add(var);
             }
-            
+
         }
         return templ.substitute(varValueMap, pathEncodeVars, allowUnresolved);
     }
-    
+
     //CHECKSTYLE:OFF
-    private String substituteMapped(String path, 
+    private String substituteMapped(String path,
                                     Map<String, ? extends Object> varValueMap,
                                     Map<String, Object> alreadyResolvedTs,
                                     Map<String, Object> alreadyResolvedTsPathEnc,
@@ -339,7 +339,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                                     boolean encodePathSlash) {
     //CHECKSTYLE:ON
         URITemplate templ = new URITemplate(path);
-        
+
         Set<String> uniqueVars = new HashSet<>(templ.getVariables());
         if (varValueMap.size() + alreadyResolvedTs.size() + alreadyResolvedTsEnc.size()
             + alreadyResolvedTsPathEnc.size() < uniqueVars.size()) {
@@ -347,21 +347,21 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                                                + " value(s) given for " + uniqueVars.size()
                                                + " unique variable(s)");
         }
-        
-        Set<String> pathEncodeVars = alreadyResolvedTsPathEnc.isEmpty() && !encodePathSlash 
+
+        Set<String> pathEncodeVars = alreadyResolvedTsPathEnc.isEmpty() && !encodePathSlash
             ? Collections.<String>emptySet() : new HashSet<>();
-        
-        Map<String, Object> theMap = new LinkedHashMap<String, Object>(); 
+
+        Map<String, Object> theMap = new LinkedHashMap<String, Object>();
         for (String var : uniqueVars) {
             boolean isPathEncVar = !isQuery && alreadyResolvedTsPathEnc.containsKey(var);
-            
+
             boolean isVarEncoded = isPathEncVar || alreadyResolvedTs.containsKey(var) ? false : true;
-            Map<String, Object> resolved = isVarEncoded ? alreadyResolvedTsEnc 
+            Map<String, Object> resolved = isVarEncoded ? alreadyResolvedTsEnc
                 : isPathEncVar ? alreadyResolvedTsPathEnc : alreadyResolvedTs;
             Object oval = resolved.isEmpty() ? null : resolved.remove(var);
             if (oval == null) {
                 oval = varValueMap.get(var);
-            }  
+            }
             if (oval == null) {
                 throw new IllegalArgumentException("No object for " + var);
             }
@@ -381,7 +381,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
     @Override
     public URI buildFromEncodedMap(Map<String, ?> map) throws IllegalArgumentException,
         UriBuilderException {
-        
+
         Map<String, String> decodedMap = new HashMap<String, String>(map.size());
         for (Map.Entry<String, ? extends Object> entry : map.entrySet()) {
             if (entry.getValue() == null) {
@@ -390,7 +390,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             String theValue = entry.getValue().toString();
             if (theValue.contains("/")) {
                 // protecting '/' from being encoded here assumes that a given value may constitute multiple
-                // path segments - very questionable especially given that queries and fragments may also 
+                // path segments - very questionable especially given that queries and fragments may also
                 // contain template vars - technically this can be covered by checking where a given template
                 // var is coming from and act accordingly. Confusing nonetheless.
                 StringBuilder buf = new StringBuilder();
@@ -405,7 +405,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             } else {
                 decodedMap.put(entry.getKey(), HttpUtils.encodePartiallyEncoded(theValue, false));
             }
-            
+
         }
         return doBuildFromMap(decodedMap, true, false);
     }
@@ -425,16 +425,16 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         builder.schemeSpecificPart = schemeSpecificPart;
         builder.leadingSlash = leadingSlash;
         builder.originalPathEmpty = originalPathEmpty;
-        builder.resolvedEncodedTemplates = 
+        builder.resolvedEncodedTemplates =
             resolvedEncodedTemplates == null ? null : new HashMap<String, Object>(resolvedEncodedTemplates);
-        builder.resolvedTemplates = 
+        builder.resolvedTemplates =
             resolvedTemplates == null ? null : new HashMap<String, Object>(resolvedTemplates);
-        builder.resolvedTemplatesPathEnc = 
+        builder.resolvedTemplatesPathEnc =
             resolvedTemplatesPathEnc == null ? null : new HashMap<String, Object>(resolvedTemplatesPathEnc);
         return builder;
     }
     // CHECKSTYLE:ON
-    
+
     @Override
     public UriBuilder fragment(String theFragment) throws IllegalArgumentException {
         this.fragment = theFragment;
@@ -466,7 +466,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
     }
 
     @Override
-    public UriBuilder path(@SuppressWarnings("rawtypes") Class resource, String method) 
+    public UriBuilder path(@SuppressWarnings("rawtypes") Class resource, String method)
         throws IllegalArgumentException {
         if (resource == null) {
             throw new IllegalArgumentException("resource is null");
@@ -491,7 +491,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         // path(String) decomposes multi-segment path when necessary
         return path(foundAnn.value());
     }
-    
+
 
     @Override
     public UriBuilder path(Method method) throws IllegalArgumentException {
@@ -526,10 +526,10 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                     return uriAsTemplate(path);
                 }
                 String pathEncoded = HttpUtils.pathEncode(path);
-                // Bad hack to bypass the TCK usage of bogus URI with empty paths containing matrix parameters, 
+                // Bad hack to bypass the TCK usage of bogus URI with empty paths containing matrix parameters,
                 // which even URI class chokes upon; cheaper to do the following than try to challenge,
                 // given that URI RFC mentions the possibility of empty paths, though no word on the possibility of
-                // such empty paths having matrix parameters... 
+                // such empty paths having matrix parameters...
                 int schemeIndex = pathEncoded.indexOf("//");
                 if (schemeIndex != -1) {
                     int pathComponentStart = pathEncoded.indexOf("/", schemeIndex + 2);
@@ -543,16 +543,16 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                     }
                 }
                 setUriParts(URI.create(pathEncoded));
-            } 
+            }
             return this;
         }
-        
+
         if (paths.isEmpty()) {
             leadingSlash = path.startsWith("/");
         }
-        
+
         List<PathSegment> segments;
-        if (checkSegments) { 
+        if (checkSegments) {
             segments = JAXRSUtils.getPathSegments(path, false, false);
         } else {
             segments = new ArrayList<>();
@@ -566,11 +566,11 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         paths.addAll(segments);
         matrix.clear();
         if (!paths.isEmpty()) {
-            matrix = paths.get(paths.size() - 1).getMatrixParameters();        
+            matrix = paths.get(paths.size() - 1).getMatrixParameters();
         }
         return this;
     }
-    
+
     @Override
     public UriBuilder port(int thePort) throws IllegalArgumentException {
         if (thePort < 0 && thePort != -1) {
@@ -623,7 +623,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             scheme = theScheme;
         }
         String rawPath = uri.getRawPath();
-        if (!uri.isOpaque() 
+        if (!uri.isOpaque()
             && (theScheme != null || rawPath != null && rawPath.startsWith("/"))) {
             port = uri.getPort();
             host = uri.getHost();
@@ -654,7 +654,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             matrix.clear();
         }
     }
-    
+
     private String buildPath() {
         StringBuilder sb = new StringBuilder();
         Iterator<PathSegment> iter = paths.iterator();
@@ -747,25 +747,25 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         paths.clear();
         matrix.clear();
     }
-    
+
     private boolean isAbsoluteUriPath(String path) {
-        // This is the cheapest way to figure out if a given path is an absolute 
-        // URI with the http(s) scheme, more expensive way is to always convert 
+        // This is the cheapest way to figure out if a given path is an absolute
+        // URI with the http(s) scheme, more expensive way is to always convert
         // a path to URI and check if it starts from some scheme or not
-        
+
         // Given that the list of schemes can be open-ended it is recommended that
         // UriBuilder.fromUri is called instead for schemes like 'file', 'jms', etc
         // be supported though the use of non-http schemes for *building* new URIs
         // is pretty limited in the context of working with JAX-RS services
-         
+
         return path.startsWith("http:") || path.startsWith("https:");
     }
-    
+
     @Override
     public UriBuilder replaceQuery(String queryValue) throws IllegalArgumentException {
         if (queryValue != null) {
-            // workaround to do with a conflicting and confusing requirement where spaces 
-            // passed as part of replaceQuery are encoded as %20 while those passed as part 
+            // workaround to do with a conflicting and confusing requirement where spaces
+            // passed as part of replaceQuery are encoded as %20 while those passed as part
             // of quertyParam are encoded as '+'
             queryValue = queryValue.replace(" ", "%20");
         }
@@ -800,7 +800,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
     /**
      * Query or matrix params convertion from object values vararg to list of strings. No encoding is
      * provided.
-     * 
+     *
      * @param values entry vararg values
      * @return list of strings
      * @throws IllegalArgumentException when one of values is null
@@ -828,10 +828,10 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
 
     /**
      * Builds param string for query part or matrix part of URI.
-     * 
+     *
      * @param map query or matrix multivalued map
      * @param separator params separator, '&' for query ';' for matrix
-     * @param fromEncoded if true then values will be decoded 
+     * @param fromEncoded if true then values will be decoded
      * @return stringified params.
      */
     private String buildParams(MultivaluedMap<String, String> map, char separator) {
@@ -842,7 +842,7 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             for (Iterator<String> sit = entry.getValue().iterator(); sit.hasNext();) {
                 String val = sit.next();
                 boolean templateValue = val.startsWith("{") && val.endsWith("}");
-                if (!templateValue) { 
+                if (!templateValue) {
                     val = HttpUtils.encodePartiallyEncoded(val, isQuery);
                     if (!isQuery) {
                         val = val.replaceAll("/", "%2F");
@@ -861,20 +861,20 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         }
         return b.length() > 0 ? b.toString() : null;
     }
-    
+
     /**
      * Builds param string for matrix part of URI.
-     * 
-     * @param sb buffer to add the matrix part to, will get ';' added if map is not empty 
+     *
+     * @param sb buffer to add the matrix part to, will get ';' added if map is not empty
      * @param map matrix multivalued map
-     */    
+     */
     private void buildMatrix(StringBuilder sb, MultivaluedMap<String, String> map) {
         if (!map.isEmpty()) {
             sb.append(';');
             sb.append(buildParams(map, ';'));
         }
     }
-    
+
     private PathSegment replacePathSegment(PathSegment ps) {
         StringBuilder sb = new StringBuilder();
         sb.append(ps.getPath());
@@ -891,18 +891,18 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
             return uri(URI.create(uriTemplate));
         } catch (Exception ex) {
             if (new URITemplate(uriTemplate).getVariables().isEmpty()) {
-                throw new IllegalArgumentException(ex);    
+                throw new IllegalArgumentException(ex);
             } else {
                 return uriAsTemplate(uriTemplate);
             }
-            
+
         }
     }
 
     public UriBuilder uriAsTemplate(String uri) {
         // This can be a start of replacing URI class Parser completely
-        // but it can be too complicated, the following code is needed for now 
-        // to deal with URIs containing template variables. 
+        // but it can be too complicated, the following code is needed for now
+        // to deal with URIs containing template variables.
         int index = uri.indexOf(":");
         if (index != -1) {
             this.scheme = uri.substring(0, index);
@@ -914,11 +914,11 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
                     String[] schemePair = uri.substring(0, index).split(":");
                     this.host = schemePair[0];
                     this.port = schemePair.length == 2 ? Integer.parseInt(schemePair[1]) : -1;
-                    
+
                 }
                 uri = uri.substring(index);
             }
-            
+
         }
         String rawQuery = null;
         index = uri.indexOf("?");
@@ -930,17 +930,17 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         if (rawQuery != null) {
             query = JAXRSUtils.getStructuredParams(rawQuery, "&", false, true);
         }
-        
+
         return this;
     }
-    
+
     //the clarified rules for encoding values of uri templates are:
     //  - encode each value contextually based on the URI component containing the template
-    //  - in path templates, by default, encode also slashes (i.e. treat all path templates as 
+    //  - in path templates, by default, encode also slashes (i.e. treat all path templates as
     //    part of a single path segment, to be consistent with @Path annotation templates)
-    //  - for special cases when the slash encoding in path templates is not desired, 
+    //  - for special cases when the slash encoding in path templates is not desired,
     //    users may use the newly added build methods to override the default behavior
-    
+
     @Override
     public URI build(Object[] vars, boolean encodePathSlash) throws IllegalArgumentException, UriBuilderException {
         return doBuild(false, encodePathSlash, vars);
@@ -958,25 +958,25 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         UriParts parts = doBuildUriParts(false, false, true);
         return buildUriString(parts.path, parts.query, parts.fragment);
     }
-    
+
     @Override
     public UriBuilder resolveTemplate(String name, Object value) throws IllegalArgumentException {
         return resolveTemplate(name, value, true);
     }
-    
+
     @Override
-    public UriBuilder resolveTemplate(String name, Object value, boolean encodePathSlash) 
+    public UriBuilder resolveTemplate(String name, Object value, boolean encodePathSlash)
         throws IllegalArgumentException {
         return resolveTemplates(Collections.singletonMap(name, value), encodePathSlash);
     }
-    
+
     @Override
     public UriBuilder resolveTemplates(Map<String, Object> values) throws IllegalArgumentException {
         return resolveTemplates(values, true);
     }
-    
+
     @Override
-    public UriBuilder resolveTemplates(Map<String, Object> values, boolean encodePathSlash) 
+    public UriBuilder resolveTemplates(Map<String, Object> values, boolean encodePathSlash)
         throws IllegalArgumentException {
         if (encodePathSlash) {
             resolvedTemplatesPathEnc = fillInResolveTemplates(resolvedTemplatesPathEnc, values);
@@ -985,20 +985,20 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         }
         return this;
     }
-    
+
     @Override
     public UriBuilder resolveTemplateFromEncoded(String name, Object value) throws IllegalArgumentException {
         return resolveTemplatesFromEncoded(Collections.singletonMap(name, value));
     }
-    
+
     @Override
-    public UriBuilder resolveTemplatesFromEncoded(Map<String, Object> values) 
+    public UriBuilder resolveTemplatesFromEncoded(Map<String, Object> values)
         throws IllegalArgumentException {
         resolvedEncodedTemplates = fillInResolveTemplates(resolvedEncodedTemplates, values);
         return this;
     }
-    
-    private static Map<String, Object> fillInResolveTemplates(Map<String, Object> map, Map<String, Object> values) 
+
+    private static Map<String, Object> fillInResolveTemplates(Map<String, Object> map, Map<String, Object> values)
         throws IllegalArgumentException {
         if (values == null) {
             throw new IllegalArgumentException();
@@ -1015,12 +1015,12 @@ public class UriBuilderImpl extends UriBuilder implements Cloneable {
         }
         return map;
     }
-    
+
     private static class UriParts {
         String path;
         String query;
         String fragment;
-        
+
         UriParts(String path, String query, String fragment) {
             this.path = path;
             this.query = query;


Mime
View raw message