Fix HTTP Action API `&return=` crashing (ArrayIndexOutOfBoundsException) for a property with parameters

Open
#1,688 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
java
Domain
api, backend

Research direction

Start at lsfusion.server.language.property.oraction.LAP.java:45, then trace the read path through LP.java and RemoteConnection.java around the stack-trace locations. Reproduce the query-string return cases for 0-arity and parameterized properties; done means parameterized properties no longer produce ArrayIndexOutOfBoundsException and instead return with null/empty arguments or report a clear actionable error.

Written by the indexing model from the issue text.

Description

API bug
Description

Follow-up to #1687. After that fix a single return=<property> query
parameter works for a 0-arity property, but still fails with an
HTTP 500 (internal ArrayIndexOutOfBoundsException) when the named
property takes one or more parameters. The property is read with no
arguments and the read path indexes into an empty argument array instead
of either reading it with NULL arguments or reporting a clear error.

The rule is purely arity-based — 0-arity returns the value, anything with
parameters crashes:

# 0-arity property -> 200, value in the body
POST /eval/action?return=currentUser        -> 200   body: 215

# property with parameters -> HTTP 500 (ArrayIndexOutOfBoundsException)
POST /eval/action?return=idTask             -> 500   # idTask(Task)
POST /eval/action?return=responsible        -> 500   # responsible(Task)

(devmode, no Authorization header; the script body is a harmless
no-op such as MESSAGE 'x';. Reproduced on both /eval and
/eval/action, query-string return= only — a return field in a POST
body is ignored, per #1687. Any property declared with parameters
reproduces it, including built-in ones.)

Expected

Read the property with NULL/empty arguments and return that, or fail
with a clear, actionable error — the way the neighbouring cases already
do — instead of an opaque ArrayIndexOutOfBoundsException:

return=                  -> CompoundNameUtils$ParseException: name '' contains forbidden symbols
return=doesNotExist      -> RuntimeException: Return property doesNotExist was not found
return=name (overloaded) -> AmbiguousElementException: Ambiguous element 'name' was found in modules: ...
Stack trace
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
    at lsfusion.server.language.property.oraction.LAP.lambda$0(LAP.java:45)
    at lsfusion.base.col.implementations.simple.SingletonSet.mapOrderValues(SingletonSet.java:330)
    at lsfusion.server.language.property.oraction.LAP.getMap(LAP.java:45)
    at lsfusion.server.language.property.oraction.LAP.getMapValues(LAP.java:37)
    at lsfusion.server.language.property.LP.read(LP.java:98)
    at lsfusion.server.language.property.LP.read(LP.java:110)
    at lsfusion.server.physics.admin.authentication.controller.remote.RemoteConnection.readResult(RemoteConnection.java:744)
    at lsfusion.server.physics.admin.authentication.controller.remote.RemoteConnection.executeExternal(RemoteConnection.java:588)
Environment
  • 7.0-SNAPSHOT, server jar from download.lsfusion.org dated 2026-06-17
    (the one carrying the #1687 fix). The internal version label still
    reports 7.0-SNAPSHOT (388) — same as the pre-fix jar, so the build
    number did not bump.
Dominant language
Java
Stars
214
Forks
46
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lsfusion/platform

All issues in lsfusion/platform

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.