[
https://issues.apache.org/jira/browse/DERBY-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tiago R. Espinha updated DERBY-4746:
------------------------------------
Attachment: DERBY-4746_p3.diff
Thank you Knut for your comments. I've included the changes you suggested in
this patch as indeed, we were creating unnecessary byte arrays. As for removing
them from the getByteLength(), that might be a little more tricky as we
actually need to convert the String into UTF-8 bytes to get the length. I'm not
sure if there'd be an easier way to go about this, considering that UTF-8 is a
variable-length encoding scheme.
Maybe we could individually get the length for each of the characters and keep
a sum variable where we update the length. This way we'd only have a byte array
with 4 bytes used at any given time. I'll leave this for future improvements
though as the byte array should be collected by the GC anyway, so I don't think
it will have any immediate noticeable impact for now.
I've already ran suites.All and derbyall on this patch with no failures, so
I'll leave it until tomorrow evening (GMT) and if no one objects, I'll go ahead
and commit it.
> (Server) Implement UTF8 support on DRDA
> ---------------------------------------
>
> Key: DERBY-4746
> URL: https://issues.apache.org/jira/browse/DERBY-4746
> Project: Derby
> Issue Type: Sub-task
> Affects Versions: 10.7.0.0
> Reporter: Tiago R. Espinha
> Assignee: Tiago R. Espinha
> Fix For: 10.7.0.0
>
> Attachments: DERBY-4746.diff, DERBY-4746.diff, DERBY-4746.diff,
> DERBY-4746_p2-impl.diff, DERBY-4746_p2-impl.diff, DERBY-4746_p2-tests.diff,
> DERBY-4746_p2-tests.diff, DERBY-4746_p3.diff, DERBY-4746_p3.diff,
> DERBY-4746_p3.diff, DERBY-4746_p3.diff, TestClient.java
>
>
> I'm branching out this issue into server and client changes. Since the
> changes are incremental and small, DERBY-728 would soon become confusing if
> it had to bear the patches for both server and client.
> For future reference, some patches have actually been applied in DERBY-728.
> These **ARE** also required for the server implementation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.