Author: markt
Date: Thu Jan 17 15:41:40 2013
New Revision: 1434735
URL: http://svn.apache.org/viewvc?rev=1434735&view=rev
Log:
FindBugs - avoid NPEs
Modified:
tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java
Modified: tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java?rev=1434735&r1=1434734&r2=1434735&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java
(original)
+++ tomcat/trunk/test/org/apache/coyote/http11/upgrade/TestUpgrade.java Thu Jan
17 15:41:40 2013
@@ -132,12 +132,15 @@ public class TestUpgrade extends TomcatB
String status = reader.readLine();
+ Assert.assertNotNull(status);
Assert.assertEquals("HTTP/1.1 101 Switching Protocols",
status.substring(0, 32));
// Skip the remaining response headers
- while (reader.readLine().length() > 0) {
+ String line = reader.readLine();
+ while (line != null && line.length() > 0) {
// Skip
+ line = reader.readLine();
}
return new UpgradeConnection(writer, reader);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]