axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4405) (int)Math.random() always returns 0
Date Fri, 26 Jun 2009 19:51:47 GMT

    [ 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.


Mime
View raw message