mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject [1/3] git commit: Removed a SONAR critical warning
Date Thu, 16 May 2013 11:22:08 GMT
Updated Branches:
  refs/heads/trunk 5a0bb4868 -> 9e8b47739


Removed a SONAR critical warning

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

Branch: refs/heads/trunk
Commit: cefe405b7d70c408443c005452ccd59d5f9f129d
Parents: aa89af1
Author: Emmanuel L├ęcharny <elecharny@apache.org>
Authored: Wed May 15 17:02:04 2013 +0200
Committer: Emmanuel L├ęcharny <elecharny@apache.org>
Committed: Wed May 15 17:02:04 2013 +0200

----------------------------------------------------------------------
 .../java/org/apache/mina/http/HttpRequestImpl.java |   19 +++++++--------
 1 files changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/cefe405b/http/src/main/java/org/apache/mina/http/HttpRequestImpl.java
----------------------------------------------------------------------
diff --git a/http/src/main/java/org/apache/mina/http/HttpRequestImpl.java b/http/src/main/java/org/apache/mina/http/HttpRequestImpl.java
index bed1a39..0c78497 100644
--- a/http/src/main/java/org/apache/mina/http/HttpRequestImpl.java
+++ b/http/src/main/java/org/apache/mina/http/HttpRequestImpl.java
@@ -144,20 +144,19 @@ public class HttpRequestImpl implements HttpRequest {
      */
     @Override
     public String toString() {
-        String result = "HTTP REQUEST METHOD: " + method + "\n";
-        result += "VERSION: " + version + "\n";
-        result += "PATH: " + requestedPath + "\n";
+        StringBuilder sb = new StringBuilder();
+
+        sb.append("HTTP REQUEST METHOD: ").append(method).append('\n');
+        sb.append("VERSION: ").append(version).append('\n');
+        sb.append("PATH: ").append(requestedPath).append('\n');
+
+        sb.append("--- HEADER --- \n");
 
-        result += "--- HEADER --- \n";
         for (String key : headers.keySet()) {
             String value = headers.get(key);
-            result += key + ":" + value + "\n";
+            sb.append(key).append(':').append(value).append('\n');
         }
 
-        /*
-         * result += "--- PARAMETERS --- \n"; for (String key : parameters.keySet()) { Collection<String>
values =
-         * parameters.get(key); for (String value : values) { result += key + ":" + value
+ "\n"; } }
-         */
-        return result;
+        return sb.toString();
     }
 }
\ No newline at end of file


Mime
View raw message