oliviergauthier / gradle-appcenter-plugin

This gradle plugin allow you to upload each build variant of your android application to separate AppCenter Apps.
MIT License
84 stars 44 forks source link

OkHttpBuilder.getEnvVar doesnt return null when env not present #14

Closed frmz closed 5 years ago

frmz commented 5 years ago

If the env var is not there the call to System.getEnv is not null safe and doesnt return null

    private fun getEnvVar(propertyName: String): Long? {
        return System.getenv(propertyName).replace(".", "_").toLongOrNull()
    }

Should be

    private fun getEnvVar(propertyName: String): Long? {
        return System.getenv(propertyName)?.replace(".", "_")?.toLongOrNull()
    }
oliviergauthier commented 5 years ago

Thanks for the feedback. It's fixed in v1.1.9