#26 Unecessary null check in BufferConsumer.append()

open
nobody
None
5
2009-11-18
2009-11-18
Anonymous
No

null check in append() is not necessary since allocate() never returns null.

protected void append(byte[] array, int off, int len) throws IOException {
Buffer buffer = allocate();
//if(buffer != null) {
buffer.append(array, off, len);
//}
}

protected Buffer allocate() throws IOException {
return new ArrayBuffer();
}

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks