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

when useSecureAPI config value is false, it is ignored #13

Closed
fourgablesguy opened this issue Nov 6, 2013 · 0 comments
Closed

when useSecureAPI config value is false, it is ignored #13

fourgablesguy opened this issue Nov 6, 2013 · 0 comments
Assignees
Milestone

Comments

@fourgablesguy
Copy link

Workaround is that I must configure with
useSecureAPI = 'false'
If I use
useSecureAPI = false
the actual value used is set to true

Bug is in here

class ConfigHelper {
public static booleanValue(def value, boolean defaultValue) {
    if (!value) {
        return defaultValue
    }
    if (value.class == java.lang.Boolean) {
        // because 'true.toBoolean() == false' !!!
        return value
    } else {
        return value.toBoolean()
    }
}

should be

public static booleanValue(def value, boolean defaultValue) {
    if (value == null) {
        return defaultValue
    }
    if (value.class == java.lang.Boolean) {
        // because 'true.toBoolean() == false' !!!
        return value
    } else {
        return value.toBoolean()
    }
}
@ghost ghost assigned iamthechad Nov 6, 2013
iamthechad added a commit that referenced this issue Nov 7, 2013
Behave correctly for config values of "false", or when config value is
missing entirely. Refs #13
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