hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1698014 - /httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java
Date Wed, 26 Aug 2015 22:02:53 GMT
Author: ggregory
Date: Wed Aug 26 22:02:53 2015
New Revision: 1698014

URL: http://svn.apache.org/r1698014
Log:
Statement unnecessarily nested within else clause.

Modified:
    httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java

Modified: httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java?rev=1698014&r1=1698013&r2=1698014&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java
(original)
+++ httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/entity/DefaultContentLengthStrategy.java
Wed Aug 26 22:02:53 2015
@@ -71,9 +71,8 @@ public class DefaultContentLengthStrateg
             final String s = transferEncodingHeader.getValue();
             if (HeaderElements.CHUNKED_ENCODING.equalsIgnoreCase(s)) {
                 return CHUNKED;
-            } else {
-                throw new NotImplementedException("Unsupported transfer encoding: " + s);
             }
+            throw new NotImplementedException("Unsupported transfer encoding: " + s);
         }
         if (message.containsHeaders(HttpHeaders.CONTENT_LENGTH) > 1) {
             throw new ProtocolException("Multiple Content-Length headers");



Mime
View raw message