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

2006/unicorn/src/org/w3c/unicorn/action Action.java,1.9,1.10 ObserveAction.java,1.40,1.41

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 23 Sep 2009 14:08:48 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MqSWW-0003d6-EW@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv13938/src/org/w3c/unicorn/action

Modified Files:
	Action.java ObserveAction.java 
Log Message:
automatically tries to initialize Unicorn if it isn't already

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- ObserveAction.java	23 Sep 2009 09:14:27 -0000	1.40
+++ ObserveAction.java	23 Sep 2009 14:08:46 -0000	1.41
@@ -76,8 +76,11 @@
 		
 		// Protects the action in case that Framework is not initialized
 		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;
+			}
 		}
 		
 		// Objects initialization

Index: Action.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/Action.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- Action.java	14 Sep 2009 10:09:38 -0000	1.9
+++ Action.java	23 Sep 2009 14:08:46 -0000	1.10
@@ -26,8 +26,11 @@
 			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;
+			}
 		}
 	}
 
Received on Wednesday, 23 September 2009 14:08:58 GMT

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