You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2010/05/27 14:08:30 UTC
[jira] Updated: (DERBY-4678) Avoid code duplication in
GenericConglomerateController.fetch()
[ https://issues.apache.org/jira/browse/DERBY-4678?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-4678:
--------------------------------------
Attachment: fetch.diff
derby-4678-1a.diff
Attaching derby-4678-1a.diff which replaces the body of fetch(RowLocation, DataValueDescriptor[], FormatableBitSet) with a call to fetch(RowLocation, DataValueDescriptor[], FormatableBitSet, boolean). All the regression tests ran cleanly with the patch.
I'm also attaching fetch.diff, which contains the output from "diff -bu" on the two fetch() methods in the existing code. The output should make it clear that the two methods are identical, modulo the parameter.
> Avoid code duplication in GenericConglomerateController.fetch()
> ---------------------------------------------------------------
>
> Key: DERBY-4678
> URL: https://issues.apache.org/jira/browse/DERBY-4678
> Project: Derby
> Issue Type: Improvement
> Components: Store
> Affects Versions: 10.7.0.0
> Reporter: Knut Anders Hatlen
> Assignee: Knut Anders Hatlen
> Priority: Minor
> Attachments: derby-4678-1a.diff, fetch.diff
>
>
> GenericConglomerateController has two methods named fetch(). One of these methods has a parameter called waitForLock, whereas the other one doesn't have such a parameter. When I diffed the two methods, the only difference I found, apart from a couple of whitespace diffs, was that the method with the waitForLock parameter called lockPosititionForRead/lockPositionForWrite using the parameter value, and the other method called them with a hard-coded value of true.
> To avoid duplication of code, fetch(RowLocation,DataValueDescriptor[],FormatableBitSet) should forward calls to fetch(RowLocation,DataValueDescriptor[],FormatableBitSet,boolean).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.