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 "Andreas Veithen (JIRA)" <ji...@apache.org> on 2009/06/26 21:51:47 UTC

[jira] Commented: (AXIS2-4405) (int)Math.random() always returns 0

    [ https://issues.apache.org/jira/browse/AXIS2-4405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12724676#action_12724676 ] 

Andreas Veithen commented on AXIS2-4405:
----------------------------------------

This part of the template is responsible for code generation in "helper mode" in which the schema compiler separates the parser/serializer code from the beans. Apparently this has not been updated for quite some time and there are not many people using this mode. Note that AXIS2-2366 fixed the issue, but only for normal mode.

> (int)Math.random() always returns 0
> -----------------------------------
>
>                 Key: AXIS2-4405
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4405
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>            Reporter: Neil Fraser
>
> This file:
> modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
> Contains the following code:
> private java.lang.String createPrefix() {
>                 return "ns" + (int)Math.random();
> }
> This code is clearly defective, since (int)Math.random() will always return 0.
> It is unknown if this is causing errors or if the code is ever executed.  This bug was found through static analysis.
> Note that bug AXIS2-2366 dealt with this two years ago, but the code remains.

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