Skip to content

Commit

Permalink
Update PrimitiveValueSpecificationToObjectVisitor.java (#2615)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbey authored Feb 7, 2024
1 parent cacf889 commit cb0c9f8
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.UnitInstance;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.UnitType;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.Whatever;
import org.finos.legend.engine.protocol.pure.v1.model.valueSpecification.raw.classInstance.PureList;

import java.io.ByteArrayInputStream;

Expand Down Expand Up @@ -132,7 +133,15 @@ public Object visit(EnumValue enumValue)
@Override
public Object visit(ClassInstance iv)
{
return iv.value;
switch (iv.type)
{
case "listInstance":
return ListIterate.collect(((PureList) iv.value).values, x -> x.accept(this));
case "path":
return iv.value;
default:
throw new UnsupportedOperationException("Unsupported ClassInstance type: " + iv.type);
}
}

@Override
Expand Down

0 comments on commit cb0c9f8

Please sign in to comment.