Skip to content

Commit

Permalink
Fixed FieldValue#toString() method for non-scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Jul 7, 2024
1 parent 6ceb43d commit 7bfed14
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ protected ToStringHelper toStringHelper(){
ToStringHelper helper = new ToStringHelper(this)
.add("opType", getOpType())
.add("dataType", getDataType())
.add("valid", isValid())
.add("value", getValue());

return helper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.jpmml.evaluator;

import org.dmg.pmml.DataType;
import org.jpmml.model.ToStringHelper;

abstract
public class ScalarValue extends FieldValue implements Comparable<ScalarValue> {
Expand Down Expand Up @@ -87,6 +88,14 @@ public int compareTo(ScalarValue that){
return compareToValue(that);
}

@Override
protected ToStringHelper toStringHelper(){
ToStringHelper helper = super.toStringHelper()
.add("valid", isValid());

return helper;
}

static
private Object filterValue(Object value){

Expand Down

0 comments on commit 7bfed14

Please sign in to comment.