Permalink
Browse files

Use slightly different approach to flushing an input stream as InputS…

…tream#available might not always yield a valid result.
  • Loading branch information...
1 parent 439dc81 commit 3be1bc5a1089caeb7385747dd2ef0a1a03d2a60f @jawi committed Aug 15, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 util/src/main/java/nl/lxtreme/ols/util/HostUtils.java
@@ -176,9 +176,8 @@ public static final void flushInputStream( final InputStream aResource ) throws
{
if ( aResource != null )
{
- while ( aResource.available() > 0 )
+ while ( aResource.read() >= 0 )
{
- aResource.read();
}
}
}

0 comments on commit 3be1bc5

Please sign in to comment.