- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 19 Oct 2009 18:26:11 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl In directory hutz:/tmp/cvs-serv4769/src/org/w3c/unicorn/response/impl Modified Files: OldMessageXBeans.java Log Message: exception catching in case that line or column tags are empty (which is not allowed by observer-response.xsd) Index: OldMessageXBeans.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/response/impl/OldMessageXBeans.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- OldMessageXBeans.java 19 Oct 2009 18:07:27 -0000 1.4 +++ OldMessageXBeans.java 19 Oct 2009 18:26:09 -0000 1.5 @@ -30,12 +30,21 @@ description = buildDescription(error.getLongmessageList()); Integer line; Integer column; - if (error.getLine() != null) - line = error.getLine().intValue(); + if (error.isSetLine()) { + try { + line = error.getLine().intValue(); + } catch (Exception e) { + line = null; + } + } else line = null; - if (error.getColumn() != null) - column = error.getColumn().intValue(); + if (error.isSetColumn()) + try { + column = error.getColumn().intValue(); + } catch (Exception e) { + column = null; + } else column = null; contexts.add((Context) new OldContextXBeans(error.getContext(), line, column)); @@ -51,12 +60,21 @@ description = buildDescription(info.getLongmessageList()); Integer line; Integer column; - if (info.getLine() != null) - line = info.getLine().intValue(); + if (info.isSetLine()) { + try { + line = info.getLine().intValue(); + } catch (Exception e) { + line = null; + } + } else line = null; - if (info.getColumn() != null) - column = info.getColumn().intValue(); + if (info.isSetColumn()) + try { + column = info.getColumn().intValue(); + } catch (Exception e) { + column = null; + } else column = null; contexts.add((Context) new OldContextXBeans(info.getContext(), line, column));
Received on Monday, 19 October 2009 18:26:15 UTC