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

2006/unicorn/src/org/w3c/unicorn/response/impl OldMessageXBeans.java,1.3,1.4

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 19 Oct 2009 18:07:29 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mzwdl-0000po-3d@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl
In directory hutz:/tmp/cvs-serv3194/src/org/w3c/unicorn/response/impl

Modified Files:
	OldMessageXBeans.java 
Log Message:
fixed exception if <line> or <column> tags are empty

Index: OldMessageXBeans.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/OldMessageXBeans.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- OldMessageXBeans.java	19 Oct 2009 16:31:10 -0000	1.3
+++ OldMessageXBeans.java	19 Oct 2009 18:07:27 -0000	1.4
@@ -72,12 +72,21 @@
 		description = buildDescription(warning.getLongmessageList());
 		Integer line;
 		Integer column;
-		if (warning.getLine() != null)
-			line = warning.getLine().intValue();
+		if (warning.isSetLine()) {
+			try {
+				line = warning.getLine().intValue();
+			} catch (Exception e) {
+				line = null;
+			}
+		}
 		else
 			line = null;
-		if (warning.getColumn() != null)
-			column = warning.getColumn().intValue();
+		if (warning.isSetColumn())
+			try {
+				column = warning.getColumn().intValue();
+			} catch (Exception e) {
+				column = null;
+			}
 		else
 			column = null;
 		contexts.add((Context) new OldContextXBeans(warning.getContext(), line, column));
Received on Monday, 19 October 2009 18:07:30 UTC

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