[jboss-svn-commits] JBoss Common SVN: r2986 - in jbossxb/trunk/src: test/java/org/jboss/test/xml/elementorder/test and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Feb 18 10:55:43 EST 2009
Author: alex.loubyansky at jboss.com
Date: 2009-02-18 10:55:43 -0500 (Wed, 18 Feb 2009)
New Revision: 2986
Modified:
jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
jbossxb/trunk/src/test/java/org/jboss/test/xml/elementorder/test/ElementOrderUnitTestCase.java
Log:
imporved error message to include dtd occurence symbol
Modified: jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
===================================================================
--- jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java 2009-02-18 12:58:39 UTC (rev 2985)
+++ jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java 2009-02-18 15:55:43 UTC (rev 2986)
@@ -508,6 +508,10 @@
}
else
sb.append("{wildcard}");
+ if(p.getMaxOccursUnbounded())
+ sb.append(p.getMinOccurs() == 0 ? '*' : '!');
+ else if(p.getMinOccurs() == 0)
+ sb.append('?');
}
throw new JBossXBRuntimeException(sb.toString());
Modified: jbossxb/trunk/src/test/java/org/jboss/test/xml/elementorder/test/ElementOrderUnitTestCase.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xml/elementorder/test/ElementOrderUnitTestCase.java 2009-02-18 12:58:39 UTC (rev 2985)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xml/elementorder/test/ElementOrderUnitTestCase.java 2009-02-18 15:55:43 UTC (rev 2986)
@@ -61,7 +61,7 @@
{
JBossXBRuntimeException re = (JBossXBRuntimeException) e.getCause();
assertEquals("Element first cannot appear in this position (possibly child elements of root are in the wrong order). " +
- "Correct order of the current sequence group: first second {sequence abSequence} {sequence cdSequence}", re.getMessage());
+ "Correct order of the current sequence group: first? second? {sequence abSequence}? {sequence cdSequence}*", re.getMessage());
}
}
@@ -85,7 +85,7 @@
{
JBossXBRuntimeException re = (JBossXBRuntimeException) e.getCause();
assertEquals("Element a cannot appear in this position (possibly child elements of root are in the wrong order). " +
- "Correct order of the current sequence group: first second {sequence abSequence} {sequence cdSequence}", re.getMessage());
+ "Correct order of the current sequence group: first? second? {sequence abSequence}? {sequence cdSequence}*", re.getMessage());
}
}
More information about the jboss-svn-commits
mailing list