...
Code Block | ||
---|---|---|
| ||
public class DoNotIgnore { public static void main(String[] args) { String original = "insecure"; original = original.replace( 'i', '9' ); System.out.println (original); } } |
Yet another source of coding bugs caused by ignoring return values is detailed in FIO03-J. Keep track of bytes read and account for character encoding while reading data.
Risk Assessment
Ignoring method return values may lead to erroneous computation which, in turn, may lead to security risks.
...