Skip to content

Instantly share code, notes, and snippets.

@kdabir
Created April 4, 2016 05:17
Show Gist options
  • Save kdabir/2fffb35911eab14366009f1bb94a6714 to your computer and use it in GitHub Desktop.
Save kdabir/2fffb35911eab14366009f1bb94a6714 to your computer and use it in GitHub Desktop.
init params with default value
private String initParamOrDefault(FilterConfig config, String key, String defaultValue) {
String value = config.getInitParameter(key);
if (value == null) {
return defaultValue;
}
return value;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment