Skip to content

create java action: a bare enumeration parameter type is stored as an entity (CE1613) #935

Description

@ako

Symptom

A Java action parameter typed with a bare enumeration name, without the enum keyword, is stored as an entity type:

create java action MyFirstModule.JA_Paint (C: MyFirstModule.Color) returns Boolean;

check and exec are both clean. mxbuild then reports:

CE1613 "The selected entity 'MyFirstModule.Color' no longer exists."

Writing the type with the keyword works: C: enum MyFirstModule.Color.

This was found while making create java action generate the same .java file as mxbuild (#934) and measured on a fresh Mendix 11.14 app. 10.24.27 generates byte-identical Java for these actions.

Cause

  • The parameter's type resolution treats any bare qualified name as an entity.
  • A comment in mdl/executor/cmd_javaactions.go says a function resolveCodeActionParamType handles this case. No such function exists anywhere in the repo.

Expected

  1. A bare qualified name that resolves to an enumeration is stored as an enumeration type. This applies to names in the project and to names created earlier in the same script.
  2. A name that resolves to neither an entity nor an enumeration is refused at check and at exec.
  3. The same applies to the return type and to JavaScript action parameters.
  4. Microflow and nanoflow parameters should be checked for the same ambiguity.
  5. The stale comment is removed, or made true.

Verification

On a fresh 11.14 app (mxcli new X --version 11.14.0):

  • with the fix, mxcli docker check reports 0 errors;
  • with a pre-fix binary as the control, it reports CE1613.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions