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

2006/unicorn/src/org/w3c/unicorn/action ObserveAction.java,1.45,1.46

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 30 Sep 2009 17:08:00 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mt2em-0005mL-Ic@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv22199/src/org/w3c/unicorn/action

Modified Files:
	ObserveAction.java 
Log Message:
starts by checking the presence of something to validate before checking task and language parameter

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- ObserveAction.java	29 Sep 2009 16:01:40 -0000	1.45
+++ ObserveAction.java	30 Sep 2009 17:07:58 -0000	1.46
@@ -199,15 +199,6 @@
 			else
 				aUnicornCall.setLang(lang + "," + aLocale);
 		}
-		if (!reqParams.containsKey(paramPrefix + "task")) {
-			String task = getTask(null, messages);
-			reqParams.put(paramPrefix + "task", task);
-			logger.debug("No task parameter found. Task parameter is set to task id: " + task);
-			mapOfStringObject.put("default_task", Framework.mapOfTask.get(Framework.mapOfTask.getDefaultTaskId()));
-			mapOfStringObject.put("current_task", Framework.mapOfTask.get(task));
-			aUnicornCall.setTask(task);
-		}
-		
 		OutputModule aOutputModule = OutputFactory.createOutputModule(mapOfOutputParameter, mapOfSpecificParameter);
 		resp.setContentType(aOutputModule.getMimeType() + "; charset=UTF-8");
 		
@@ -216,6 +207,14 @@
 			aOutputModule.produceError( mapOfStringObject, resp.getWriter());
 			return;
 		}
+		if (!reqParams.containsKey(paramPrefix + "task")) {
+			String task = getTask(null, messages);
+			reqParams.put(paramPrefix + "task", task);
+			logger.debug("No task parameter found. Task parameter is set to task id: " + task);
+			mapOfStringObject.put("default_task", Framework.mapOfTask.get(Framework.mapOfTask.getDefaultTaskId()));
+			mapOfStringObject.put("current_task", Framework.mapOfTask.get(task));
+			aUnicornCall.setTask(task);
+		}
 		
 		for (Object objKey : reqParams.keySet()) {
 			String key = (String) objKey;
Received on Wednesday, 30 September 2009 17:08:03 GMT

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