...
In this noncompliant code example, multiple threads can invoke the setValues()
method to set the a
and b
fields. Because this class does not test for integer overflow, a user of the Adder
class must ensure that the arguments to the setValues()
method can be added without overflow. (For more information, see guideline INT00NUM00-J. Ensure that integer operations do not result in overflow.)
...