In:

AbstractMessageParser.parse()

Findbugs points out that the field "this.state" is overwritten by the
fall-through.

It looks like the state can never be left set to HEADERS, and the
switch statement could be eliminated entirely.

On 22/07/2009, [email protected] <[email protected]> wrote:
> Author: sebb
>  Date: Wed Jul 22 10:40:27 2009
>  New Revision: 796661
>
>  URL: http://svn.apache.org/viewvc?rev=796661&view=rev
>  Log:
>  Annotate switch fall-through to stop Eclipse complaining
>
>  Modified:
>     
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
>     
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
>
>  Modified: 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
>  URL: 
> http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java?rev=796661&r1=796660&r2=796661&view=diff
>  
> ==============================================================================
>  --- 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
>  (original)
>  +++ 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/AbstractMessageParser.java
>  Wed Jul 22 10:40:27 2009
>  @@ -254,6 +254,7 @@
>                  throw new ProtocolException(px.getMessage(), px);
>              }
>              this.state = HEADERS;
>  +            //$FALL-THROUGH$
>          case HEADERS:
>              Header[] headers = AbstractMessageParser.parseHeaders(
>                      this.sessionBuffer,
>
>  Modified: 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
>  URL: 
> http://svn.apache.org/viewvc/httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java?rev=796661&r1=796660&r2=796661&view=diff
>  
> ==============================================================================
>  --- 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
>  (original)
>  +++ 
> httpcomponents/httpcore/trunk/httpcore/src/main/java/org/apache/http/impl/io/ChunkedInputStream.java
>  Wed Jul 22 10:40:27 2009
>  @@ -230,6 +230,7 @@
>                      "Unexpected content at the end of chunk");
>              }
>              state = CHUNK_LEN;
>  +            //$FALL-THROUGH$
>          case CHUNK_LEN:
>              this.buffer.clear();
>              i = this.in.readLine(this.buffer);
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to