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

2006/unicorn/src/org/w3c/unicorn/util Language.java,1.7,1.8

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 06 Oct 2009 10:02:48 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mv6sa-0008JB-Pu@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv31918/src/org/w3c/unicorn/util

Modified Files:
	Language.java 
Log Message:
removed potential NPE

Index: Language.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Language.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Language.java	6 Oct 2009 08:16:02 -0000	1.7
+++ Language.java	6 Oct 2009 10:02:46 -0000	1.8
@@ -103,6 +103,8 @@
 		String message = Framework.getLanguageProperties().get(lang).getProperty(messageKey.replace("$", ""));
 		String result = message;
 		int i = 1;
+		if (args == null)
+			return result;
 		for (String str : args) {
 			result = result.replaceAll("%"+i, str);
 			i++;
Received on Tuesday, 6 October 2009 10:02:50 GMT

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