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

2006/unicorn/src/org/w3c/unicorn/response/impl OldMessageXBeans.java,1.1,1.2

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 19 Oct 2009 16:21:07 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mzuyp-0004eJ-SA@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl
In directory hutz:/tmp/cvs-serv17850/src/org/w3c/unicorn/response/impl

Modified Files:
	OldMessageXBeans.java 
Log Message:
fixed potential NPE if a messageList is empty

Index: OldMessageXBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/OldMessageXBeans.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- OldMessageXBeans.java	19 Oct 2009 12:41:24 -0000	1.1
+++ OldMessageXBeans.java	19 Oct 2009 16:21:04 -0000	1.2
@@ -44,7 +44,7 @@
 	public OldMessageXBeans(Info info) {
 		type = INFO;
 		level = 0;
-		if (info.getMessageList() != null)
+		if (info.getMessageList() != null && info.getMessageList().size() > 0)
 			title = info.getMessageList().get(0);
 		else
 			title = "";
Received on Monday, 19 October 2009 16:21:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:39 UTC