You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/07/07 05:58:26 UTC

svn commit: r1358495 - /axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl

Author: sagara
Date: Sat Jul  7 03:58:25 2012
New Revision: 1358495

URL: http://svn.apache.org/viewvc?rev=1358495&view=rev
Log:
Axis2-5357 - Changed ADBBeanTemplate  to return more descriptive error messages when validation fails. 

Modified:
    axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl

Modified: axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl?rev=1358495&r1=1358494&r2=1358495&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl (original)
+++ axis/axis2/java/core/trunk/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl Sat Jul  7 03:58:25 2012
@@ -160,12 +160,12 @@
                          protected void validate<xsl:value-of select="$javaName"/>(<xsl:value-of select="$propertyType"/> param){
                          <xsl:if test="not(@unbound) and @array">
                               if ((param != null) &amp;&amp; (param.length &gt; <xsl:value-of select="@maxOccurs"/>)){
-                                throw new java.lang.RuntimeException();
+                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                               }
                          </xsl:if>
                          <xsl:if test="$min!=0 and @array">
                               if ((param != null) &amp;&amp; (param.length &lt; <xsl:value-of select="$min"/>)){
-                                throw new java.lang.RuntimeException();
+                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                               }
                          </xsl:if>
                          }
@@ -332,12 +332,12 @@
                               protected void validate<xsl:value-of select="$javaName"/>(<xsl:value-of select="$propertyType"/> param){
                              <xsl:if test="not(@unbound)">
                               if ((param != null) &amp;&amp; (param.length &gt; <xsl:value-of select="@maxOccurs"/>)){
-                                throw new java.lang.RuntimeException();
+                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                               }
                               </xsl:if>
                               <xsl:if test="$min!=0">
                               if ((param != null) &amp;&amp; (param.length &lt; <xsl:value-of select="$min"/>)){
-                                throw new java.lang.RuntimeException();
+                                throw new java.lang.RuntimeException("Input values do not follow defined XSD restrictions");
                               }
                               </xsl:if>
                               }