False positive : apache commons StringUtils::isNotBlank should be considered a valid "null check"

SonarQube * Enterprise Edition* Version 9.2.4 (build 50792)

    private List<String> getEnvPropertyList(String propName) {
        List<String> propList = emptyList();
        String propValue = env.getProperty(propName);
        if (isNotBlank(propValue)) {
            propList = List.of(propValue.split(","));
        return propList;

1 Like

Hey there.

Take a look at this post here.

I found the problem.
The static import was referencing and obsolete version of StringUtils


1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.