Skip to content

Default the 'disable PCS' option to true.#923

Merged
pmuetschard merged 1 commit intogoogle:masterfrom
pmuetschard:pcs
Aug 17, 2017
Merged

Default the 'disable PCS' option to true.#923
pmuetschard merged 1 commit intogoogle:masterfrom
pmuetschard:pcs

Conversation

@pmuetschard
Copy link
Copy Markdown
Member

No description provided.

@pmuetschard pmuetschard changed the title Default the 'disable PCS' option default to true. Default the 'disable PCS' option to true. Aug 16, 2017

private static boolean getBoolean(Properties properties, String name, boolean dflt) {
return "true".equalsIgnoreCase(properties.getProperty(name, dflt ? "true" : "false"));
if (dflt) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implementation is making me go cross eyed trying to figure out the logic. What was wrong with the old implementation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is now consistent (it was slightly inconsistent before):
if dflt is true only a value of "false" will cause the result to be false, similar to how if dflt is false, only "true" will cause the result to be true.

@pmuetschard pmuetschard merged commit eb052f6 into google:master Aug 17, 2017
@pmuetschard pmuetschard deleted the pcs branch August 17, 2017 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants