Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract all config constants in one interface #132

Closed
Riduidel opened this issue Aug 28, 2014 · 1 comment
Closed

Extract all config constants in one interface #132

Riduidel opened this issue Aug 28, 2014 · 1 comment
Assignees
Milestone

Comments

@Riduidel
Copy link

Currently, config values are scattered all across the application, which makes their finding difficult.
What makes it worse is they are only present as String value.

Example with the code added for #30

    if (config.getString("default.status") != null) {
        // default status has been set
        if (content.get("status") == null) {
            // file hasn't got status so use default
            content.put("status", config.getString("default.status"));
        }
    }

i suggest moving all these constants into a Config interface, defined as public static inner interface of ConfigUtils. This way they're both easier to locate, and to document.

@jonbullock
Copy link
Member

Thanks for raising an issue for this, the values should be centralised somewhere.

@jonbullock jonbullock added this to the v2.3.3 milestone Oct 28, 2014
@jonbullock jonbullock self-assigned this Oct 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants