db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mohamed Nufail (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-5786) Duplicate copies of InputStreamUtil.java and DynamicByteArrayOutputStream.java classes in client.net package
Date Mon, 28 May 2012 07:08:23 GMT

    [ https://issues.apache.org/jira/browse/DERBY-5786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13284307#comment-13284307

Mohamed Nufail commented on DERBY-5786:

I analysed the usages of InputStreamUtil.java and DynamicByteArrayOutputStream.java in the
network client. InputStreamUtil is used only inside a method in DynamicByteArrayOutputStream
which is never used. So it can be removed without a problem.

But DynamicByteArrayOutputStream has some dynamic resizing abilities, optimized for performance
and memory reduction. If PublicBufferOutputStream is used, it will only have ByteArrayOutputStream's
resizing capability which just doubles the size of the byte array. So will it be safe to replace
DynamicByteArrayOutputStream with PublicBufferOutputStream? Or is it better to leave it as
it is?
> Duplicate copies of InputStreamUtil.java and DynamicByteArrayOutputStream.java classes
in client.net package
> ------------------------------------------------------------------------------------------------------------
>                 Key: DERBY-5786
>                 URL: https://issues.apache.org/jira/browse/DERBY-5786
>             Project: Derby
>          Issue Type: Task
>            Reporter: Mohamed Nufail
>            Assignee: Mohamed Nufail
>            Priority: Minor
> In solving DERBY-4491, InputStreamUtil.java and DynamicByteArrayOutputStream.java classes
which are present in org.apache.derby.iapi.services.io package was needed for the network
client also. So now there are duplicate copies of those classes in org.apache.derby.client.net
> But the client uses only a small part of the functionality those classes provide. In
a discussion in dev list (http://mail-archives.apache.org/mod_mbox/db-derby-dev/201205.mbox/%3Cwjo8r4ucgtfv.fsf%40oracle.com%3E)
it was decided to use EncodedInputStream.PublicBufferOutputStream which is already in the
client.net package instead of the duplicated classes. In order to do this PublicBufferOutputStream
will first be made into a stand-alone class.
> Doing this would help to reduce the code size and increase code coverage, as the duplicate
classes currently have no code coverage.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message