FlechazoW commented on code in PR #120:
URL: https://github.com/apache/seatunnel-web/pull/120#discussion_r1325460593
##########
seatunnel-server/seatunnel-app/src/main/java/org/apache/seatunnel/app/service/impl/JobMetricsServiceImpl.java:
##########
@@ -183,17 +183,17 @@ private Map<Long, JobSummaryMetricsRes>
getMatricsListIfTaskTypeIsBatch(
} else {
log.info(
"The job does not exist on the engine, it is
directly returned from the database");
- JobSummaryMetricsRes jobMetriceFromDb =
+ JobSummaryMetricsRes jobMetricsFromDb =
getJobSummaryMetricsResByDb(
jobInstance,
userId,
Long.toString(
jobInstanceIdAndJobEngineIdMap.get(
jobInstance.getId())));
- if (jobMetriceFromDb != null) {
- jobSummaryMetricsResMap.put(jobInstance.getId(),
jobMetriceFromDb);
+ if (jobMetricsFromDb != null) {
+ jobSummaryMetricsResMap.put(jobInstance.getId(),
jobMetricsFromDb);
}
- if (jobInstance.getJobStatus().equals("RUNNING")) {
+ if ("RUNNING".equals(jobInstance.getJobStatus())) {
Review Comment:
I think the code is clean and easy-read, using StringUtils adds complexity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]