- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 13 Oct 2009 15:23:57 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn In directory hutz:/tmp/cvs-serv9516/src/org/w3c/unicorn Modified Files: RequestThread.java UnicornCall.java Log Message: the use of io_error.vm has been replaced by Unicorn Messages Index: RequestThread.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/RequestThread.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- RequestThread.java 23 Sep 2009 09:16:00 -0000 1.8 +++ RequestThread.java 13 Oct 2009 15:23:55 -0000 1.9 @@ -1,23 +1,13 @@ package org.w3c.unicorn; -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; import java.util.ArrayList; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.event.EventCartridge; import org.w3c.unicorn.exceptions.UnicornException; import org.w3c.unicorn.request.Request; import org.w3c.unicorn.response.Response; -import org.w3c.unicorn.response.parser.ResponseParserFactory; -import org.w3c.unicorn.util.EscapeXMLEntities; import org.w3c.unicorn.util.Message; -import org.w3c.unicorn.util.Templates; /** * Thread executing a request @@ -42,8 +32,6 @@ * ID of the Observer */ private String obsID; - - private String lang; private ArrayList<Message> messages; @@ -61,11 +49,9 @@ */ public RequestThread( Request aRequest, - String obsID, - String lang) { + String obsID) { this.aRequest = aRequest; this.obsID = obsID; - this.lang = lang; messages = new ArrayList<Message>(); } @@ -80,8 +66,9 @@ } catch (final UnicornException e) { messages.add(e.getUnicornMessage()); } catch (final Exception e) { - logger.error("Exception : " + e.getMessage(), e); - try { + messages.add(new Message(e)); + logger.error(e.getMessage(), e); + /*try { StringBuilder builder = new StringBuilder(); VelocityContext context = new VelocityContext(Framework.getLanguageContexts().get(lang)); EventCartridge aEventCartridge = new EventCartridge(); @@ -111,7 +98,7 @@ } catch (Exception e1) { logger.error("Exception : " + e1.getMessage(), e1); e1.printStackTrace(); - } + }*/ } } Index: UnicornCall.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/UnicornCall.java,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- UnicornCall.java 6 Oct 2009 10:00:28 -0000 1.35 +++ UnicornCall.java 13 Oct 2009 15:23:55 -0000 1.36 @@ -352,7 +352,7 @@ for (final String obsID : requests.keySet()) { // send request to observer - threadsList.add(new RequestThread(requests.get(obsID), obsID, this.getLang())); + threadsList.add(new RequestThread(requests.get(obsID), obsID)); logger.debug("Request " + requests.get(obsID) + " added to threadsList"); } for (RequestThread thread : threadsList) {
Received on Tuesday, 13 October 2009 15:24:01 UTC