[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22768] gnu/java/security/util/Prime.java ignores return v
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22768] gnu/java/security/util/Prime.java ignores return value of BigInteger methods |
Date: |
16 Oct 2005 01:27:06 -0000 |
At 4 places in gnu/java/security/util/Prime.java, add is called on a BigInteger
as though it mutates the BigInteger it is invoked on (lines 58, 63, 79 and
125).
BigInteger is immutable. Thus, methods such as BigInteger.add return a new
BigInteger, rather than mutating the BigInteger they are applied to.
This bug was found with our static analysis tool for finding bugs in Java
programs, FindBugs:
http://findbugs.sourceforge.net/
------- Comment #1 from from-classpath at savannah dot gnu dot org 2004-08-17
03:09 -------
I've checked in the fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22768
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22768] gnu/java/security/util/Prime.java ignores return value of BigInteger methods,
gcc-bugzilla at gcc dot gnu dot org <=