W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

2006/unicorn/src/org/w3c/unicorn RequestThread.java,1.6,1.7

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 21 Sep 2009 15:56:05 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MplFF-0001qU-Kx@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn
In directory hutz:/tmp/cvs-serv7080/src/org/w3c/unicorn

Modified Files:
	RequestThread.java 
Log Message:
cleaned

Index: RequestThread.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/RequestThread.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- RequestThread.java	21 Sep 2009 12:14:34 -0000	1.6
+++ RequestThread.java	21 Sep 2009 15:56:03 -0000	1.7
@@ -5,7 +5,6 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStreamWriter;
-import java.net.MalformedURLException;
 import java.util.ArrayList;
 
 import org.apache.commons.logging.Log;
@@ -75,21 +74,15 @@
 	 */
 	@Override
 	public void run() {
-		//Response aResponse = null;
 		try {
-			// Uncomment/comment next lines to test io_error
-			//throw new Exception("Message test de l'exception");
 			aResponse = this.aRequest.doRequest();
+			aResponse.setObserverId(obsID);
 		} catch (final UnicornException e) {
 			messages.add(e.getUnicornMessage());
 		} catch (final Exception e) {
 			RequestThread.logger.error("Exception : " + e.getMessage(), e);
 			try {
 				StringBuilder builder = new StringBuilder();
-				//String lang[] = unicornCall.getMapOfStringParameter().get(
-				//		Property.get("UNICORN_PARAMETER_PREFIX") + "lang");
-				//String lang = unicornCall.getLang();
-
 				VelocityContext context = new VelocityContext(Framework.getLanguageContexts().get(lang));
 				EventCartridge aEventCartridge = new EventCartridge();
 				aEventCartridge.addEventHandler(new EscapeXMLEntities());
@@ -112,10 +105,6 @@
 				}
 				aResponse = ResponseParserFactory.parse(builder.toString(), "default");				
 				aResponse.setXml(builder);				
-			} catch (MalformedURLException e1) {
-				RequestThread.logger
-						.error("Exception : " + e1.getMessage(), e1);
-				e1.printStackTrace();
 			} catch (IOException e1) {
 				RequestThread.logger
 						.error("Exception : " + e1.getMessage(), e1);
@@ -126,8 +115,6 @@
 				e1.printStackTrace();
 			}
 		}
-		
-		this.aResponse.setObserverId(obsID);
 	}
 
 	public String getObsID() {
@@ -150,7 +137,5 @@
 		this.messages = messages;
 	}
 
-	
-	
 }
 
Received on Monday, 21 September 2009 15:56:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:14 GMT