axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neil Fraser (JIRA)" <>
Subject [jira] Created: (AXIS2-4405) (int)Math.random() always returns 0
Date Wed, 24 Jun 2009 00:07:07 GMT
(int)Math.random() always returns 0

                 Key: AXIS2-4405
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: adb
            Reporter: Neil Fraser

This file:

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.

View raw message