Skip to content

Null pointer exception in ArrayList initialization in concrete #2554

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

Description

Try to generate unit tests with standard flow for spring-boot-testing project, method OrderService.getOrders.

Expected behavior

Tests are generated properly.
There are no Default concrete execution failed messages.

Actual behavior

The following exceptions is found in logs:

Caused by: java.lang.NullPointerException: Cannot read the array length because "a" is null
	at java.base/java.util.ArrayList.<init>(ArrayList.java:182)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.findEqualValueOfWellKnownType(UtModelConstructor.kt:352)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.constructFromAny(UtModelConstructor.kt:341)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.construct(UtModelConstructor.kt:178)
	at org.utbot.instrumentation.instrumentation.execution.constructors.UtModelConstructor.construct(UtModelConstructor.kt:137)
	at org.utbot.instrumentation.instrumentation.execution.phases.ModelConstructionPhase.convertToExecutionResult(ModelConstructionPhase.kt:121)
	at org.utbot.instrumentation.instrumentation.execution.SimpleUtExecutionInstrumentation$invoke$1$1$2.invoke(SimpleUtExecutionInstrumentation.kt:106)
	at org.utbot.instrumentation.instrumentation.execution.SimpleUtExecutionInstrumentation$invoke$1$1$2.invoke(SimpleUtExecutionInstrumentation.kt:92)
	at org.utbot.instrumentation.instrumentation.execution.phases.PhasesController$executePhaseInTimeout$1$result$1.invoke(PhasesController.kt:78)
	at org.utbot.common.ThreadBasedExecutor$invokeWithTimeout$1.invoke(ThreadUtil.kt:70)
	at org.utbot.common.ThreadBasedExecutor$ensureThreadIsAlive$1.invoke(ThreadUtil.kt:124)
	at org.utbot.common.ThreadBasedExecutor$ensureThreadIsAlive$1.invoke(ThreadUtil.kt:120)
	at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)

Metadata

Metadata

Assignees

Labels

comp-instrumented-processIssue is related to Instrumented processcomp-springIssue is related to Spring projects supportctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions