hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r613000 - in /httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs: AbstractMessageParser.java ChunkDecoder.java
Date Thu, 17 Jan 2008 22:49:20 GMT
Author: sebb
Date: Thu Jan 17 14:49:03 2008
New Revision: 613000

URL: http://svn.apache.org/viewvc?rev=613000&view=rev
Log:
Remove unnecessary casts

Modified:
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
    httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java?rev=613000&r1=612999&r2=613000&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/AbstractMessageParser.java
Thu Jan 17 14:49:03 2008
@@ -113,7 +113,7 @@
         int count = this.headerBufs.size();
         if ((this.lineBuf.charAt(0) == ' ' || this.lineBuf.charAt(0) == '\t') &&
count > 0) {
             // Handle folded header line
-            CharArrayBuffer previous = (CharArrayBuffer)this.headerBufs.get(count - 1);
+            CharArrayBuffer previous = this.headerBufs.get(count - 1);
             int i = 0;
             while (i < current.length()) {
                 char ch = current.charAt(i);
@@ -178,7 +178,7 @@
         }
         if (this.state == COMPLETED) {
             for (int i = 0; i < this.headerBufs.size(); i++) {
-                CharArrayBuffer buffer = (CharArrayBuffer) this.headerBufs.get(i);
+                CharArrayBuffer buffer = this.headerBufs.get(i);
                 try {
                     this.message.addHeader(lineParser.parseHeader(buffer));
                 } catch (ParseException ex) {

Modified: httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java?rev=613000&r1=612999&r2=613000&view=diff
==============================================================================
--- httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
(original)
+++ httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/impl/nio/codecs/ChunkDecoder.java
Thu Jan 17 14:49:03 2008
@@ -114,7 +114,7 @@
         int count = this.trailerBufs.size();
         if ((this.lineBuf.charAt(0) == ' ' || this.lineBuf.charAt(0) == '\t') &&
count > 0) {
             // Handle folded header line
-            CharArrayBuffer previous = (CharArrayBuffer)this.trailerBufs.get(count - 1);
+            CharArrayBuffer previous = this.trailerBufs.get(count - 1);
             int i = 0;
             while (i < current.length()) {
                 char ch = current.charAt(i);
@@ -136,7 +136,7 @@
         if (count > 0) {
             this.footers = new Header[this.trailerBufs.size()];
             for (int i = 0; i < this.trailerBufs.size(); i++) {
-                CharArrayBuffer buffer = (CharArrayBuffer) this.trailerBufs.get(i);
+                CharArrayBuffer buffer = this.trailerBufs.get(i);
                 try {
                     this.footers[i] = new BufferedHeader(buffer);
                 } catch (ParseException ex) {



Mime
View raw message