You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by je...@apache.org on 2001/05/01 10:08:32 UTC
cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/lib ResponseInputStream.java
jericho 01/05/01 01:08:32
Modified: src/webdav/client/src/org/apache/webdav/lib
ResponseInputStream.java
Log:
- Fix a bug, in order to do the null checking.
Revision Changes Path
1.10 +8 -6 jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/ResponseInputStream.java
Index: ResponseInputStream.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/ResponseInputStream.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ResponseInputStream.java 2001/04/18 21:05:41 1.9
+++ ResponseInputStream.java 2001/05/01 08:08:31 1.10
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/ResponseInputStream.java,v 1.9 2001/04/18 21:05:41 remm Exp $
- * $Revision: 1.9 $
- * $Date: 2001/04/18 21:05:41 $
+ * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/ResponseInputStream.java,v 1.10 2001/05/01 08:08:31 jericho Exp $
+ * $Revision: 1.10 $
+ * $Date: 2001/05/01 08:08:31 $
*
* ====================================================================
*
@@ -74,7 +74,7 @@
* Socket input stream wrapper.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.9 $ $Date: 2001/04/18 21:05:41 $
+ * @version $Revision: 1.10 $ $Date: 2001/05/01 08:08:31 $
*/
public class ResponseInputStream
@@ -314,8 +314,10 @@
if (chunk) {
try {
- String numberValue = readLineFromStream().trim();
- length = Integer.parseInt(numberValue, 16);
+ String numberValue = readLineFromStream();
+ if (numberValue == null)
+ throw new NumberFormatException();
+ length = Integer.parseInt(numberValue.trim(), 16);
} catch (NumberFormatException e) {
// Critical error, unable to parse the chunk length
length = 0;