-
Notifications
You must be signed in to change notification settings - Fork 11
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
Consolidate default values for configuration properties #754
Comments
Comment #1 originally posted by Omertron on 2009-04-29T06:18:47.000Z: Good idea. |
Comment #2 originally posted by Omertron on 2009-04-29T06:23:59.000Z: OK, as long as there is never the situation where you want to override the default I've been meaning to do a code review and look for all the properties as I'm sure |
Comment #3 originally posted by Omertron on 2009-04-29T06:26:56.000Z: If you think that's an important feature, I can make sure it remains available. |
Comment #4 originally posted by Omertron on 2009-04-29T13:58:46.000Z: Just thinking aloud really. |
Comment #5 originally posted by Omertron on 2009-04-29T18:44:35.000Z: These changes would probably also help make Issue 681 easier for localized strings. |
Comment #6 originally posted by Omertron on 2009-04-29T19:39:24.000Z: How about just having a default.properties file with all the default values? Something like this: FileReader rdr = new FileReader( "default.properties" ); rdr = new FileReader( "moviejukebox.properties" ); rdr = new FileReader( "skin.properties" ); The default moviejukebox.properties would just be a copy of default.properties. |
Comment #7 originally posted by Omertron on 2009-04-29T22:32:25.000Z: That's a very good idea. |
Comment #8 originally posted by Omertron on 2009-08-25T07:42:41.000Z: <empty> |
Comment #9 originally posted by Omertron on 2010-08-24T13:43:49.000Z: This has sort of been implemeted with the moviejukebox-default.properties file. However, having a single place to define what is considered "default" in yamj and not have to look/guess/find the property that it corresponds to would be good. I know Vincent was looking at implementing something similar. Perhaps he can enlighten us on the work so far |
Original issue 755 created by Omertron on 2009-04-29T01:55:30.000Z:
I find the current method of specifying default values for configuration properties to be tedious
and repetitive, which makes it error-prone. Basically, I don't like that we have to mention the
default value every time we grab the property from the Properties collection.
I would much rather consolidate all the default values into one location, eg a static initializer in
the PropertiesUtil class. That way properties will always be set to their defaults if not
overridden by the user, so the version of getProperty that takes two arguments would never
need to be used.
Bonus points if we can have the build process generate the default moviejukebox.properties
file based on those defaults.
The text was updated successfully, but these errors were encountered: