Community
Participate
Working Groups
Sorry, that was too quick I20080226-1155 Given: public class Foo { public void foo() { StringBuffer b1 = null; if (bar()) { b1= new StringBuffer(); } b1.append(true); } private boolean bar() { return false; } } 1. Quick fix at b1: Potential null pointer access: The variable b1 may be null at this location Is: Add suppress warning is the only available quick fix (pretty useless) Should: 'Add null check' with result: StringBuffer b1 = null; if (b1 != null) { b1.append(true); }
*** This bug has been marked as a duplicate of bug 178254 ***