You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Mauro Molinari (JIRA)" <ji...@apache.org> on 2007/12/07 15:47:43 UTC
[jira] Commented: (AXIS2-1890) Add
@SuppressWarnings({"unchecked","unused"}) to Java code template
[ https://issues.apache.org/jira/browse/AXIS2-1890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12549424 ]
Mauro Molinari commented on AXIS2-1890:
---------------------------------------
I agree with this. Axis2 generated code is full of such warnings... As of now, I'm manually adding @SuppressWarnings("all") to all generated classes...
Mauro.
> Add @SuppressWarnings({"unchecked","unused"}) to Java code template
> -------------------------------------------------------------------
>
> Key: AXIS2-1890
> URL: https://issues.apache.org/jira/browse/AXIS2-1890
> Project: Axis 2.0 (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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org