MCPcopy Create free account
hub / github.com/jOOQ/jOOQ / defaultIfBlank

Method defaultIfBlank

jOOQ/src/main/java/org/jooq/tools/StringUtils.java:216–218  ·  view source on GitHub ↗

Returns either the passed in CharSequence, or if the CharSequence is whitespace, empty ("") or null, the value of defaultStr. StringUtils.defaultIfBlank(null, "NULL") = "NULL" StringUtils.defaultIfBlank("", "NULL") = "NULL" StringUtils.defaultIfBlank(" ", "NULL")

(String str, String defaultStr)

Source from the content-addressed store, hash-verified

214 * @see StringUtils#defaultString(String, String)
215 */
216 public static String defaultIfBlank(String str, String defaultStr) {
217 return StringUtils.isBlank(str) ? defaultStr : str;
218 }
219
220 // Empty checks
221 // -----------------------------------------------------------------------

Callers 10

commentMethod · 0.95
referencingCommentMethod · 0.95
exportMethod · 0.80
run0Method · 0.80
readMethod · 0.80
startElementMethod · 0.80
getEmbeddables0Method · 0.80
getRoutines0Method · 0.80
getRoutines0Method · 0.80
getPackages0Method · 0.80

Calls 1

isBlankMethod · 0.95

Tested by

no test coverage detected