yesamer opened a new pull request, #7184: URL: https://github.com/apache/incubator-kie/pull/7184
## Fix `typeRef` on `tUnaryTests` broken for DMN 1.3–1.6 in 10.2.0 ### Problem Models with `typeRef` on `<inputValues>` (valid per the DMN 1.3–1.6 XSD) fail to load on the 10.2.0 engine with: ``` UnsupportedOperationException: Not on DMN v1.2 ``` The marshaller swallows the exception, `Definitions` comes back `null`, and the build then fails with: ``` NullPointerException: Cannot invoke "Definitions.getNamespace()" because "definitions" is null ``` The KIE DMN editor (10.1) writes `typeRef` on `<inputValues>` whenever a user sets a column type in the side panel, so **models authored in the 10.1 editor stop loading on the 10.2 engine**. ### Root cause The 10.2.0 refactor ([kie-issues#853](https://github.com/apache/incubator-kie-issues/issues/853)) collapsed `v1_3`–`v1_6` `TUnaryTests` onto a shared `AbstractTUnaryTests`. That class added throwing overrides of `getTypeRef`/`setTypeRef` to guard DMN 1.1/1.2, but those overrides also fired for every newer version. The DMN 1.3 XSD is unambiguous: ```xml <xsd:complexType name="tUnaryTests"> <xsd:complexContent> <xsd:extension base="tExpression"> ``` `tUnaryTests` extends `tExpression` from DMN 1.3 onwards, so `typeRef` is schema-valid on any `tUnaryTests` element (`<inputValues>`, `<outputValues>`, `<allowedValues>`) in DMN 1.3–1.6. ### Fix - **`AbstractTUnaryTests`** — remove the throwing `getTypeRef`/`setTypeRef` overrides. All versions now inherit the real `typeRef` field from `AbstractTExpression`. - **`v1_2/TUnaryTests`** — add throwing overrides here (mirrors `v1_1/TUnaryTests`, which already had its own). - **`TUnaryTestsTest`** — expanded to cover all six concrete versions: throws on v1.1 and v1.2; round-trips correctly on v1.3, v1.4, v1.5, and v1.6. - **`DMNEvaluatorCompilerTest`** — end-to-end regression test loading the original reproducer model via `DMNRuntimeBuilder`, asserting it produces no errors. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
