You can remove the "version != null &&", as StringUtils.isEmpty handles nulls.