Skip to content

Commit

Permalink
Employed null-safe getter methods
Browse files Browse the repository at this point in the history
  • Loading branch information
vruusmann committed Aug 2, 2024
1 parent 3679e74 commit 95d05b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pmml-sklearn/src/main/java/sklearn/EstimatorUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public List<Feature> export(Estimator estimator, String predictFunc, Schema sche

OutputField outputField = Iterables.getLast(predictionOutputFields);

return encoder.export(model, outputField.getName());
return encoder.export(model, outputField.requireName());
} else

{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public Model encodeModel(Schema schema){
}

// XXX
outputField.setName(getDecisionFunctionField(outputField.getName()));
outputField.setName(getDecisionFunctionField(outputField.requireName()));

models.add(decisionFunctionModel);

Expand Down

0 comments on commit 95d05b5

Please sign in to comment.