axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas Ternisien (JIRA)" <>
Subject [jira] Created: (AXIS2-1890) Add @SuppressWarnings({"unchecked","unused"}) to Java code template
Date Tue, 19 Dec 2006 13:23:24 GMT
Add @SuppressWarnings({"unchecked","unused"}) to Java code template

                 Key: AXIS2-1890
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Improvement
          Components: codegen
         Environment: Linux, Tomcat 5.5.20, Eclipse
            Reporter: Nicolas Ternisien
            Priority: Minor

To better include Java generated stub code of Axis2 Web services (using wsdl2java ant task),
it will be better is these classes uses the Java 5 annotation to ignore compilation warnings
 : @SuppressWarnings({"unchecked","unused"})

It will help people on big project to see where are the real warnings, and those generated
by the codegen API. This could be added only if the user set a java version from the command
line or the Ant task, for compatibility with old Java versions.

Here is a little patch explaining my improvement :

Index: src/org/apache/axis2/schema/template/PlainBeanTemplate.xsl
--- src/org/apache/axis2/schema/template/PlainBeanTemplate.xsl  (révision 488663)
+++ src/org/apache/axis2/schema/template/PlainBeanTemplate.xsl  (copie de travail)
@@ -15,7 +15,8 @@

         *  <xsl:value-of select="$name"/> wrapped bean classes
-        */
+        */
+        @SuppressWarnings({"unchecked","unused"})
         public class <xsl:value-of select="$name"/>{

Index: src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
--- src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl    (révision 488663)
+++ src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl    (copie de travail)
@@ -58,6 +58,7 @@
             *  <xsl:value-of select="$name"/> bean class
+            @SuppressWarnings({"unchecked","unused"})
         public <xsl:if test="not(@unwrapped) or (@skip-write)">static</xsl:if>
class <xsl:value-of select="$name"/> <xsl:if test="$extension"> extends <xsl:value-of
select="$extension"/></xsl:if> <xsl:if test="$restriction"> extends <xsl:value-of
         implements org.apache.axis2.databinding.ADBBean{

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message