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=34318>. 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=34318 Summary: JavaClass.dump(OutputStream/DataOutputStream) shouldnt call close Product: BCEL Version: 5.1 Platform: All OS/Version: other Status: NEW Severity: minor Priority: P2 Component: Main AssignedTo: bcel-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] I think it would be more helpful if JavaClass.dump(*OutputStream) didnt call close as the caller may not be finished with the stream. Only for JavaClass.dump(File) does BCEL "own" the OutputStream. It also looks like the caller should provide an extra finally {... os.close() } as JavaClass.dump may not close the stream in the event of an error. For a concrete example: When writing a JAR using JarOutputStream the stream shouldnt be closed till multiple classes have been written. So the real stream has to be wrapped with a Filter/Proxy that ignores close. This problem also appears for ClassParser. Many thanks for your excellent code. -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]