tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r1356880 - /tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
Date Tue, 03 Jul 2012 19:29:17 GMT
Author: fhanik
Date: Tue Jul  3 19:29:17 2012
New Revision: 1356880

URL: http://svn.apache.org/viewvc?rev=1356880&view=rev
Log:
Fix where body can be null

Modified:
    tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java

Modified: tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java?rev=1356880&r1=1356879&r2=1356880&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java (original)
+++ tomcat/trunk/test/org/apache/catalina/startup/TomcatBaseTest.java Tue Jul  3 19:29:17
2012
@@ -299,13 +299,13 @@ public abstract class TomcatBaseTest ext
 
             @Override
             public int getLength() {
-                return body.length;
+                return body!=null?body.length:0;
             }
 
             @Override
             public int available() {
-                if (done || body == null) return 0;
-                else return body.length;
+                if (done) return 0;
+                else return getLength();
             }
         };
         return postUrl(false,s,path,out,reqHead,resHead);



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message