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

2006/unicorn/src/org/w3c/unicorn/action IndexAction.java,1.16,1.17

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 16 Sep 2009 12:29:11 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MntdH-0004ed-2z@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv17877/src/org/w3c/unicorn/action

Modified Files:
	IndexAction.java 
Log Message:
if unicorn is not initialized, IndexAction tries to initialize it once before sending a 500 error

Index: IndexAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/IndexAction.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- IndexAction.java	15 Sep 2009 15:14:02 -0000	1.16
+++ IndexAction.java	16 Sep 2009 12:29:09 -0000	1.17
@@ -34,8 +34,11 @@
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
 		
 		if (!Framework.isUcnInitialized) {
-			resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
-			return;
+			Framework.init();
+			if (!Framework.isUcnInitialized) {
+				resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+				return;
+			}
 		}
 		
 		resp.setContentType("text/html; charset=UTF-8");
Received on Wednesday, 16 September 2009 12:29:20 GMT

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