commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36196] - [jci] compiler implementations: streams remain open ... and other minor issues
Date Tue, 16 Aug 2005 09:58:22 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36196>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36196





------- Additional Comments From joerg.heinicke@gmx.de  2005-08-16 11:58 -------
Another issue with the EclipseJavaCompiler around line 130:

for (int i = 0; i < packageName.length; i++) {
    if (i != 0) {
        result.append('.');
    }
    result.append(packageName[i]);
}
result.append('.');
result.append(typeName);

IMO this code could be optimized to:

for (int i = 0; i < packageName.length; i++) {
    result.append(packageName[i]);
    result.append('.');
}
result.append(typeName);

But this would change the result for an empty packageName array. While code 1
returns ("." + typeName), code 2 would return just (typeName). I don't know what
the contract of this method is, but having a class name starting with a dot does
not sound that logical. So the optimized code might even fix this issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message