On Sep 1, 2006, at 9:53 AM, Claudio Corsi wrote:
Curt,
Would you consider changing this to use a String array such that it
calls the length method to set the suffixLength. For example,
String suffixs[] = { ".gz", ".zip" };
for(int idx = 0 ; idx < suffixs.length ; idx++ ) {
if( lastFileName.endsWith(suffixs[idx]) {
suffixLenth = suffixs[idx].length;
break;
}
}
--Claudio
When responding to a bug report, I typically try to keep the changes
to the minimum necessary to resolve the problem. In this case, all I
needed to change was one integer literal. Your suggestion would
definitely scale better that the original if more suffixes were
added. But I don't see any compelling reason to switch at this time.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]