axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Afkham Azeez (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-1890) Add @SuppressWarnings({"unchecked","unused"}) to Java code template
Date Thu, 06 Jan 2011 11:24:48 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Afkham Azeez resolved AXIS2-1890.
---------------------------------

    Resolution: Fixed

> Add @SuppressWarnings({"unchecked","unused"}) to Java code template
> -------------------------------------------------------------------
>
>                 Key: AXIS2-1890
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1890
>             Project: Axis2
>          Issue Type: Improvement
>          Components: codegen
>         Environment: Linux, Tomcat 5.5.20, Eclipse
>            Reporter: Nicolas Ternisien
>            Assignee: Amila Chinthaka Suriarachchi
>            Priority: Minor
>         Attachments: axis2-codegen-annotation-on-templates.patch
>
>
> 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"/>{
>          <xsl:apply-templates/>
> 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"})
>          </xsl:if>
>          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
select="$restriction"/></xsl:if>
>          implements org.apache.axis2.databinding.ADBBean{

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message