accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Havanki (JIRA)" <>
Subject [jira] [Updated] (ACCUMULO-3012) Simplify DefaultConfiguration
Date Wed, 13 Aug 2014 14:54:15 GMT


Bill Havanki updated ACCUMULO-3012:

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

After a delay, committed reviewed changes.

Reminder: there were two commits here, one for 1.5.x and one for 1.6.x. I did a merge -sours
from 1.5.2-SNAPSHOT to 1.6.1-SNAPSHOT before committing the 1.6.x-specific change, so hopefully
the history is tied up nicely.

Note: after committing, I noticed that I also fixed the usage statement for {{main()}} in
{{DefaultConfiguration}} moved to {{ConfigurationDocGen}} - it still specified the option
"generate-latex" instead of "generate-asciidoc". (See ACCUMULO-1327.)

> Simplify DefaultConfiguration
> -----------------------------
>                 Key: ACCUMULO-3012
>                 URL:
>             Project: Accumulo
>          Issue Type: Sub-task
>            Reporter: Bill Havanki
>            Assignee: Bill Havanki
>            Priority: Minor
>             Fix For: 1.5.2, 1.6.1, 1.7.0
>          Time Spent: 50m
>  Remaining Estimate: 0h
> The current implementation of {{DefaultConfiguration}} has some downsides:
> * Its internal map of configuration defaults is built on-demand in its singleton instance,
which drives the need to synchronize access to the singleton. The map could be built statically.
> * That same map could be made immutable as well.
> * Even though it uses a singleton, {{new DefaultConfiguration()}} is still permitted
since the no-arg constructor isn't defined as private.
> * Calls to {{DefaultConfiguration.getInstance()}} cannot be easily mocked.
> * Its main method no longer has anything to do with it, and instead belongs in {{ConfigurationDocGen}}.
> Improve and simplify {{DefaultConfiguration}}.

This message was sent by Atlassian JIRA

View raw message