Skip to content

Commit ac8c8db

Browse files
Fix coverage in test
1 parent 8700d63 commit ac8c8db

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

dd-java-agent/agent-iast/src/test/groovy/com/datadog/iast/taint/TaintedObjectsLogTest.groovy

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,19 @@ class TaintedObjectsLogTest extends DDSpecification {
7979
taintedObjects.size() == 1
8080
taintedObjects.iterator().size() == 1
8181
}
82+
83+
void 'should not taint null ranges'() {
84+
given:
85+
IastSystem.DEBUG = true
86+
logger.level = Level.ALL
87+
TaintedObjects taintedObjects = taintedObjects()
88+
final obj = 'A'
89+
90+
when:
91+
taintedObjects.taint(obj, null)
92+
93+
then:
94+
taintedObjects.empty
95+
}
8296
}
8397

0 commit comments

Comments
 (0)