enso/engine/runtime-instrument-common/src
Hubert Plociniczak 3755f90fef
Avoid ArrayIndexOutOfBoundsException with no args (#9393)
The `null` check creates a new Array but always assumed a non-empty one which may lead to
```
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at org.enso.runtime/org.enso.interpreter.service.ExecutionService$FunctionPointer.collectNotAppliedArguments(ExecutionService.java:778)
at org.enso.runtime/org.enso.interpreter.instrument.job.ProgramExecutionSupport$.sendExpressionUpdate(ProgramExecutionSupport.scala:430)
at org.enso.runtime/org.enso.interpreter.instrument.job.ProgramExecutionSupport$.$anonfun$executeProgram$3(ProgramExecutionSupport.scala:81)
at org.enso.runtime/org.enso.interpreter.service.ExecutionCallbacks.callOnComputedCallback(ExecutionCallbacks.java:146)
at
org.enso.runtime/org.enso.interpreter.service.ExecutionCallbacks.updateCachedResult(ExecutionCallbacks.java:117
...
```
Added a guard to prevent the exception. The flag will be useless anyway as we won't enter the for-loop in this case.

Appears to be introduced via #8743. Discovered while debugging #9389.
2024-03-15 10:44:30 +00:00
..
bench/java/org/enso/interpreter/instrument Separating instrument related files into runtime-instrument-common project (#6992) 2023-06-08 16:51:50 +02:00
main Avoid ArrayIndexOutOfBoundsException with no args (#9393) 2024-03-15 10:44:30 +00:00
test Add support for positionalArgumentsExpressions of text visualizations (#9052) 2024-02-13 23:08:30 +00:00