You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Rick Berman <ri...@moai.com> on 2003/07/17 03:37:55 UTC

Bad code snippets?

I've been using Eclipse while working on a patch.  It has a habit of
complaining about a variety of things.  A couple I thought I'd ask whether I
should bother reporting in Bugzilla or submitting patches.  The first two
seem to be more likely to be an real problem.

1) The UnknownRecord constructor "public UnknownRecord(short id, short size,
byte [] data)" has an assignment statement that does nothing.  It should
probably read "this.size = size" rather than "size = size".

2) Likewise in UnknownRecord, the "protected void fillFields(byte [] data,
short sid)" method should probably have "this.sid = sid" rather than "sid =
sid".

3) The first statement in the HSSF constructor "public HSSF(String infile,
String outfile, boolean write)" contains an assignment of this.filename =
filename.  Since filename is not an argument to the constructor there is no
point to the statement.

Comments?
Rick