Skip to content

How to fix org.apache.commons.collections.CollectionUtils Check error #1454

Description

@felix1982

version: Infer version v0.17.0
cmd: infer -o ./output --keep-going -- mvn ...

.../test.java:35: error: NULL_DEREFERENCE objecttestArray last assigned on line 33 could be null and is dereferenced at line 35. 33. if (CollectionUtils.isNotEmpty(testArray)) { 34. List<Integer> list = new ArrayList<>(); 35. > for (Test test: testArray) { 36. list.add(test.getName()); 37. }

here, user org.apache.commons.collections.CollectionUtils to check [testArray] is not empty,But Infer still report a error ‘NULL_DEREFERENCE’

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions