jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse ResetTestServlet.java
Date Mon, 19 Jun 2000 23:40:07 GMT
craigmcc    00/06/19 16:40:07

  Modified:    src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletResponse
                        ResetTest.java
               src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse
                        ResetTestServlet.java
  Log:
  Fix a false FAIL indication on ResetTest for Tomcat 3.2dev.  The client
  code was throwing a bogus NullPointerException.
  
  Both Tomcat 3.2dev and Catalina pass all the servlet tests.
  
  Revision  Changes    Path
  1.3       +8 -4      jakarta-watchdog/src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletResponse/ResetTest.java
  
  Index: ResetTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog/src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletResponse/ResetTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResetTest.java	1999/11/09 20:47:40	1.2
  +++ ResetTest.java	2000/06/19 23:40:05	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-watchdog/src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletResponse/ResetTest.java,v
1.2 1999/11/09 20:47:40 costin Exp $ 
  - * $Date: 1999/11/09 20:47:40 $ 
  - * $Revision: 1.2 $
  + * $Header: /home/cvs/jakarta-watchdog/src/clients/org/apache/jcheck/servlet/client/javax_servlet/ServletResponse/ResetTest.java,v
1.3 2000/06/19 23:40:05 craigmcc Exp $ 
  + * $Date: 2000/06/19 23:40:05 $ 
  + * $Revision: 1.3 $
    * 
    * The Apache Software License, Version 1.1
    *
  @@ -95,11 +95,15 @@
   		 *	(text/plain) here
   		 */
   
  -			if(connection.getContentType().equals("text/html")) {
  +			String contentType = connection.getContentType();
  +			if (contentType == null)
  +			    contentType = "";
  +			if (contentType.equals("text/html")) {
   				Exception e = new Exception("Problem with clearBuffer");
   				testResult = getTestResult(testResult,e);
   			}	     		     	
   			else {
  +
   
   				// if it comes here it is 
   				// obvious that it passes
  
  
  
  1.3       +5 -7      jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java
  
  Index: ResetTestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ResetTestServlet.java	1999/11/09 20:55:09	1.2
  +++ ResetTestServlet.java	2000/06/19 23:40:06	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java,v
1.2 1999/11/09 20:55:09 costin Exp $ 
  - * $Date: 1999/11/09 20:55:09 $ 
  - * $Revision: 1.2 $
  + * $Header: /home/cvs/jakarta-watchdog/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/ResetTestServlet.java,v
1.3 2000/06/19 23:40:06 craigmcc Exp $ 
  + * $Date: 2000/06/19 23:40:06 $ 
  + * $Revision: 1.3 $
    * 
    * The Apache Software License, Version 1.1
    *
  @@ -103,19 +103,17 @@
   
   			props.put(Constants.Response.Title, getTitle());
   			props.put(Constants.Response.Description,getDescription());
  -
   			sos = response.getOutputStream();
   
   			//set buffer size
   			response.setBufferSize(20);
   
  -
   			//Write some data to the stream
   			response.setContentType("text/html");
   
  +			// Reset the response
   			response.reset();
   
  -
   			props.put(Constants.Response.Status,"true");
   			props.put(Constants.Response.Message,"");
   
  @@ -134,8 +132,8 @@
   
   
   		props.put(Constants.Response.TestClass,this.getClass().getName());
  -
   		props.save(sos, this.getClass().getName());	 
  +
   	}	
   
   
  
  
  

Mime
View raw message