[ 
https://issues.apache.org/jira/browse/DERBY-6535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Knut Anders Hatlen updated DERBY-6535:
--------------------------------------

    Attachment: d6535-1a.diff

The attached patch removes the storageFactory field from the subclasses, and 
makes InputStreamFile take a type parameter so that the subclasses don't have 
to cast InputStreamFile.storageFactory to the specific type of factory 
associated with that implementation.

The patch also replaces InputStreamFile's use of synchronized StringBuffers 
with unsynchronized StringBuilders.

All regression tests ran cleanly with the patch.

> Remove storageFactory field from subclasses of InputStreamFile
> --------------------------------------------------------------
>
>                 Key: DERBY-6535
>                 URL: https://issues.apache.org/jira/browse/DERBY-6535
>             Project: Derby
>          Issue Type: Improvement
>          Components: Store
>    Affects Versions: 10.11.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Trivial
>         Attachments: d6535-1a.diff
>
>
> The InputStreamFile class has a field called storageFactory which holds the 
> BaseStorageFactory instance that created it. This field is accessible by all 
> subclasses of InputStream. Still, each subclass has its own storageFactory 
> field which shadows the field in the parent class and holds a reference to 
> the exact same factory instance as the parent.
> I'd like to remove the extra fields in the subclasses in order to simply the 
> code and silence IDE warnings about the shadowing.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to