- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 07 Oct 2009 15:52:22 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/output In directory hutz:/tmp/cvs-serv8502/src/org/w3c/unicorn/output Modified Files: SimpleOutputFormater.java Log Message: checks that mapOfStringObject is not null, in which case nothing is added to aVelocityContext Index: SimpleOutputFormater.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/output/SimpleOutputFormater.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SimpleOutputFormater.java 29 Sep 2009 16:07:08 -0000 1.8 +++ SimpleOutputFormater.java 7 Oct 2009 15:52:20 -0000 1.9 @@ -41,8 +41,9 @@ logger.debug("Map of String -> Object : " + mapOfStringObject + "."); logger.debug("Writer : " + output + "."); - for (String sObjectName : mapOfStringObject.keySet()) - aVelocityContext.put(sObjectName, mapOfStringObject.get(sObjectName)); + if (mapOfStringObject != null) + for (String sObjectName : mapOfStringObject.keySet()) + aVelocityContext.put(sObjectName, mapOfStringObject.get(sObjectName)); Templates.write(format + ".vm", aVelocityContext, output); try { @@ -56,8 +57,9 @@ logger.trace("produceError"); logger.debug("Writer : " + output + "."); - for (String sObjectName : mapOfStringObject.keySet()) - aVelocityContext.put(sObjectName, mapOfStringObject.get(sObjectName)); + if (mapOfStringObject != null) + for (String sObjectName : mapOfStringObject.keySet()) + aVelocityContext.put(sObjectName, mapOfStringObject.get(sObjectName)); Templates.write(format + ".error.vm", aVelocityContext, output); try {
Received on Wednesday, 7 October 2009 15:52:25 UTC