Skip to content

Commit

Permalink
Fix type conversion problem in Eclipse (elastic#50549)
Browse files Browse the repository at this point in the history
Eclipse 4.13 shows a type mismatch error in the affected line because it cannot
correctly infer the boolean return type for the method call. Assigning return
value to a local variable resolves this problem.
  • Loading branch information
Christoph Büscher authored and SivagurunathanV committed Jan 21, 2020
1 parent 9908f02 commit d971d0a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
package org.elasticsearch.xpack.ml.integration;

import com.google.common.collect.Ordering;

import org.elasticsearch.ElasticsearchStatusException;
import org.elasticsearch.action.admin.indices.get.GetIndexAction;
import org.elasticsearch.action.admin.indices.get.GetIndexRequest;
Expand Down Expand Up @@ -192,7 +193,9 @@ public <T> void testWithOnlyTrainingRowsAndTrainingPercentIsFifty(String jobId,
assertTopClasses(resultsObject, numTopClasses, dependentVariable, dependentVariableValues);

// Let's just assert there's both training and non-training results
if (getFieldValue(resultsObject, "is_training")) {
//
boolean isTraining = getFieldValue(resultsObject, "is_training");
if (isTraining) {
trainingRowsCount++;
} else {
nonTrainingRowsCount++;
Expand Down

0 comments on commit d971d0a

Please sign in to comment.