Commit 646d357b authored by Mohamed Khalil Labidi's avatar Mohamed Khalil Labidi
Browse files

Change the use of apache Pair instead of javafx one

parent eb1a2d74
Pipeline #14509 passed with stage
in 1 minute and 11 seconds
package org.activeeon.morphemic;
import com.fasterxml.jackson.databind.ObjectMapper;
import javafx.util.Pair;
import org.apache.commons.lang3.tuple.Pair;
import lombok.extern.slf4j.Slf4j;
import org.activeeon.morphemic.application.deployment.PAFactory;
import org.activeeon.morphemic.application.deployment.PASchedulerGateway;
......@@ -1535,14 +1535,14 @@ public class PAGateway {
Optional<Job> optJob = Optional.ofNullable(EntityManagerHelper.find(Job.class, jobId));
if (!optJob.isPresent()) {
LOGGER.error(String.format("Job [%s] not found", jobId));
return new Pair<>(SubmittedJobType.UNKNOWN, null);
return Pair.of(SubmittedJobType.UNKNOWN, null);
}
Job submittedJob = optJob.get();
LOGGER.info("Job " + jobId + " mapped to the submitted ProActive job: " + submittedJob.getSubmittedJobId() +
" of type: " + submittedJob.getSubmittedJobType().toString());
JobState jobState = schedulerGateway.getJobState(String.valueOf(submittedJob.getSubmittedJobId()));
LOGGER.info("Returned state: " + jobState.getStatus().toString() + " for job: " + jobId);
return new Pair<>(submittedJob.getSubmittedJobType(), jobState);
return Pair.of(submittedJob.getSubmittedJobType(), jobState);
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment