EMPTY_STRING

Examples:

		if (s.length() == 0) {
			...
		}
		
		if (s.equals("")) {
			...
		}
		
		if (s.equalsIgnoreCase("")) {
			...
		}

Can be refactored as:

		if (StringUtils.IsEmpty(s)) {
			...
		}

library: Apache commons-lang
JavaDoc
Download

See also: NOT_EMPTY_STRING

Home
List of rules