[ML] remove duplicate code
Original commit: elastic/x-pack-elasticsearch@340480477c
This commit is contained in:
parent
b233c4729d
commit
f06b4fbbaf
|
@ -31,7 +31,6 @@ import org.elasticsearch.xpack.ml.job.config.Job;
|
|||
import org.elasticsearch.xpack.ml.job.process.autodetect.AutodetectProcessManager;
|
||||
import org.elasticsearch.xpack.ml.job.process.autodetect.params.InterimResultsParams;
|
||||
import org.elasticsearch.xpack.ml.job.process.autodetect.params.TimeRange;
|
||||
import org.elasticsearch.xpack.ml.utils.ExceptionsHelper;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
@ -89,7 +88,7 @@ public class FlushJobAction extends Action<FlushJobAction.Request, FlushJobActio
|
|||
}
|
||||
|
||||
public Request(String jobId) {
|
||||
this.jobId = ExceptionsHelper.requireNonNull(jobId, Job.ID.getPreferredName());
|
||||
super(jobId);
|
||||
}
|
||||
|
||||
public boolean getCalcInterim() {
|
||||
|
|
|
@ -30,4 +30,8 @@ public class PostDataFlushRequestTests extends AbstractStreamableTestCase<Reques
|
|||
protected Request createBlankInstance() {
|
||||
return new Request();
|
||||
}
|
||||
|
||||
public void testNullJobIdThrows() {
|
||||
expectThrows(IllegalArgumentException.class, () -> new Request(null));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue