Copilot commented on code in PR #7184:
URL: https://github.com/apache/incubator-kie/pull/7184#discussion_r4237957162
##########
kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_3/xstream/ExpressionConverter.java:
##########
@@ -48,7 +47,7 @@ protected void writeAttributes(HierarchicalStreamWriter
writer, Object parent) {
super.writeAttributes(writer, parent);
Expression e = (Expression) parent;
- if (!(e instanceof UnaryTests) && e.getTypeRef() != null) {
+ if (e.getTypeRef() != null) {
Review Comment:
This changes the independent DMN 1.3 marshaller, but the added backend
round-trip test exercises only the v1.6 converter. `TUnaryTestsTest` covers the
model getter/setter, so it would still pass if v1.3 serialization dropped
`typeRef`. Add a v1.3 round-trip fixture/test that verifies the attribute
survives unmarshalling and marshalling.
##########
kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_4/xstream/ExpressionConverter.java:
##########
@@ -48,7 +47,7 @@ protected void writeAttributes(HierarchicalStreamWriter
writer, Object parent) {
super.writeAttributes(writer, parent);
Expression e = (Expression) parent;
- if (!(e instanceof UnaryTests) && e.getTypeRef() != null) {
+ if (e.getTypeRef() != null) {
Review Comment:
This changes the independent DMN 1.4 marshaller, but the added backend
round-trip test exercises only the v1.6 converter. The model-level test cannot
detect this converter continuing to omit `typeRef`, so add a v1.4 round-trip
fixture/test that verifies the attribute is preserved.
##########
kie-dmn/kie-dmn-backend/src/main/java/org/kie/dmn/backend/marshalling/v1_5/xstream/ExpressionConverter.java:
##########
@@ -48,7 +47,7 @@ protected void writeAttributes(HierarchicalStreamWriter
writer, Object parent) {
super.writeAttributes(writer, parent);
Expression e = (Expression) parent;
- if (!(e instanceof UnaryTests) && e.getTypeRef() != null) {
+ if (e.getTypeRef() != null) {
Review Comment:
This changes the independent DMN 1.5 marshaller, but the added backend
round-trip test exercises only the v1.6 converter. The model-level test cannot
detect this converter continuing to omit `typeRef`, so add a v1.5 round-trip
fixture/test that verifies the attribute is preserved.
--
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]