- From: Mercurial notifier <nobody@w3.org>
- Date: Tue, 06 Jul 2010 18:05:43 +0000
- To: Unicorn Updates <www-validator-cvs@w3.org>
changeset: 1311:4b03618b193b tag: tip user: Thomas Gambet <tgambet@w3.org> date: Tue Jul 06 14:05:26 2010 -0400 files: src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java description: if cond attribute if absent or set to an incorrect value, "true" is used diff -r 8a60e89e3911 -r 4b03618b193b src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java --- a/src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java Tue Jul 06 14:04:13 2010 -0400 +++ b/src/org/w3c/unicorn/tasklist/TaskListUnmarshallerBeans.java Tue Jul 06 14:05:26 2010 -0400 @@ -404,13 +404,19 @@ final Observer obs = Framework.mapOfObserver.get(condlist .getObserver()); myCond.setObserver(obs); - myCond - .setResult(condlist.getResult().equals("passed") ? true - : false); + if (!condlist.isSetResult()) { + logger.debug("Condition with no result attribute, condition result will be true."); + myCond.setResult(true); + } else if (condlist.getResult().equals("failed")) { + myCond.setResult(false); + } else if (condlist.getResult().equals("passed")) { + myCond.setResult(true); + } else { + logger.warn("Result attribute of cond element set to an invalid value: " + condlist.getResult()); + myCond.setResult(true); + } myCond.setType(condlist.getType().toString()); - myCond.setParameter(condlist.getParameter()); - myCond.setValue(condlist.getValue()); ifnode.addCond(myCond);
Received on Tuesday, 6 July 2010 18:05:44 UTC