2006/unicorn/src/org/w3c/unicorn/action IndexAction.java,1.15,1.16 ObserveAction.java,1.30,1.31

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv5890/src/org/w3c/unicorn/action

Modified Files:
	IndexAction.java ObserveAction.java 
Log Message:
fixed protection were not in effect in case unicorn is not initialized

Index: IndexAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/IndexAction.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- IndexAction.java	10 Sep 2009 15:50:10 -0000	1.15
+++ IndexAction.java	15 Sep 2009 15:14:02 -0000	1.16
@@ -33,7 +33,10 @@
 	@Override
 	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
 		
-		super.doGet(req, resp);
+		if (!Framework.isUcnInitialized) {
+			resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+			return;
+		}
 		
 		resp.setContentType("text/html; charset=UTF-8");
 		

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ObserveAction.java	15 Sep 2009 13:38:21 -0000	1.30
+++ ObserveAction.java	15 Sep 2009 15:14:02 -0000	1.31
@@ -75,7 +75,10 @@
 			throws ServletException, IOException {
 		
 		// Protects the action in case that Framework is not initialized
-		super.doGet(req, resp);
+		if (!Framework.isUcnInitialized) {
+			resp.sendError(500, "Unicorn is not initialized properly. Check logs.");
+			return;
+		}
 		
 		// Objects initialization
 		FileItem aFileItemUploaded = null;

Received on Tuesday, 15 September 2009 15:14:18 UTC