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

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