Report a form object without a value in `SHOW`, `PRINT`, `EXPORT`, `JSON` and `JSONTEXT` instead of a NullPointerException
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
The behavior is in how the SHOW/PRINT/EXPORT/JSON/JSONTEXT operators are parsed and validated: locate the parser code that reads the OBJECTS block and the class-form usage of these operators, then find where a missing = expression is currently left unchecked. Use the fix for DIALOG in #1979 as the model for how the error should be raised, and reuse the existing operator error reporting so the message carries the position. Done means the sample module from the issue fails with a clear "form object needs a value" error instead of a NullPointerException, and the same for the JSON/JSONTEXT expressions and class-forms.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
In the SHOW and PRINT operators, in the EXPORT of a form and in the form variants of JSON and JSONTEXT, every object listed in OBJECTS needs a value (OBJECTS s = expression), and so does the object of the class-form (SHOW EDIT Sku = expression). Only DIALOG allows an object to be listed without one. When the value is omitted in the other operators, it is not reported as an error of the operator: loading the module fails with a NullPointerException.
MODULE ShowProbe;
CLASS Sku;
num = DATA INTEGER (Sku);
FORM sku OBJECTS s = Sku PANEL PROPERTIES(s) num;
open () {
FOR num(Sku s) = 1 DO SHOW sku OBJECTS s;
}
Error during parsing at ShowProbe:7:44
java.lang.NullPointerException
PRINT sku OBJECTS s;, EXPORT sku OBJECTS s JSON;, the expressions JSON (sku OBJECTS s) and JSONTEXT (sku OBJECTS s), and the class-forms SHOW EDIT Sku;, SHOW LIST Sku;, PRINT LIST Sku;, EXPORT LIST Sku JSON; fail the same way. The /eval and /eval/action probes returned HTTP 500 with the same exception. When internal error details are hidden, the response omits the exception text. With the value given (SHOW sku OBJECTS s = s;) the module loads.
Reproduced on 7.0-SNAPSHOT (master). SHOW sku OBJECTS s; fails the same way on 6.3-SNAPSHOT.
Reason
In an application module, one such operator prevents the server from starting. In an evaluated script, it fails the request. The error gives a position but does not say that a value is missing. The operator is easy to write: inside a loop over s, OBJECTS s reads as "the object s of the form takes the loop's s", and the IDE does not mark it. A similar case of DIALOG was fixed in #1979.
Fix
Report it as a regular error of the operator, saying that the form object needs a value (= expression).
- Lenguaje dominante
- Java
- Estrellas
- 214
- Forks
- 46
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lsfusion/platform
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
-
bug
Dificultad 4/5 1-2 días Aptitud para principiantes 58/100
Todos los issues de lsfusion/platform
Issues similares
-
account assessment course feature lecture
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
app:learninggoalhub enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
PropertyResolver fails on JDK classes with a non-public field named like the propertyPosiblemente ocupada @vaibhavgupta443 la tomó hoy. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/wicket#1991 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100