Skip to content

Use annotation @Override consistently #4512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,6 @@ private int severity(ExitStatus status) {
return 7;
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return String.format("exitCode=%s;exitDescription=%s", exitCode, exitDescription);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo
failureExceptions = new ArrayList<>();
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.domain.Entity#toString()
*/
@Override
public String toString() {
return super.toString() + String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,6 @@ public StepExecution getStepExecution() {
return stepExecution;
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "[StepContribution: read=" + readCount + ", written=" + writeCount + ", filtered=" + filterCount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,6 @@ public void addFailureException(Throwable throwable) {
this.failureExceptions.add(throwable);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.container.common.domain.Entity#equals(java.
* lang.Object)
*/
@Override
public boolean equals(Object obj) {

Expand All @@ -513,11 +507,6 @@ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFo
failureExceptions = new ArrayList<>();
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.container.common.domain.Entity#hashCode()
*/
@Override
public int hashCode() {
Object jobExecutionId = getJobExecutionId();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2022 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -97,11 +97,6 @@ public JobParametersValidator getJobParametersValidator() {
return delegate.getJobParametersValidator();
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (obj instanceof GroupAwareJob) {
Expand All @@ -110,11 +105,6 @@ public boolean equals(Object obj) {
return false;
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
return delegate.hashCode();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ public void setJobRegistry(JobRegistry jobRegistry) {
this.jobRegistry = jobRegistry;
}

/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org
* .springframework.beans.factory.BeanFactory)
*/
@Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
if (beanFactory instanceof DefaultListableBeanFactory) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,6 @@ protected void setJobFactoryRef(String jobFactoryRef) {
this.jobFactoryRef = jobFactoryRef;
}

/*
* (non-Javadoc)
*
* @see AbstractSingleBeanDefinitionParser#getBeanClass(Element)
*/
@Override
protected Class<?> getBeanClass(Element element) {
return SimpleFlowFactoryBean.class;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@ public void afterPropertiesSet() throws Exception {
}
}

/*
* (non-Javadoc)
*
* @see org.springframework.beans.factory.FactoryBean#getObject()
*/
@Override
public SimpleFlow getObject() throws Exception {
SimpleFlow flow = flowType.getConstructor(String.class).newInstance(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,6 @@ public SimpleJobExplorer(JobInstanceDao jobInstanceDao, JobExecutionDao jobExecu
this.ecDao = ecDao;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#findJobExecutions(
* org.springframework.batch.core.JobInstance)
*/
@Override
public List<JobExecution> getJobExecutions(JobInstance jobInstance) {
List<JobExecution> executions = jobExecutionDao.findJobExecutions(jobInstance);
Expand All @@ -98,13 +92,8 @@ public List<JobExecution> getJobExecutions(JobInstance jobInstance) {
return executions;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobExecution(
* org.springframework.batch.core.JobInstance)
*/
@Nullable
@Override
public JobExecution getLastJobExecution(JobInstance jobInstance) {
JobExecution lastJobExecution = jobExecutionDao.getLastJobExecution(jobInstance);
if (lastJobExecution != null) {
Expand All @@ -116,12 +105,6 @@ public JobExecution getLastJobExecution(JobInstance jobInstance) {
return lastJobExecution;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#findRunningJobExecutions
* (java.lang.String)
*/
@Override
public Set<JobExecution> findRunningJobExecutions(@Nullable String jobName) {
Set<JobExecution> executions = jobExecutionDao.findRunningJobExecutions(jobName);
Expand All @@ -134,12 +117,6 @@ public Set<JobExecution> findRunningJobExecutions(@Nullable String jobName) {
return executions;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getJobExecution(java
* .lang.Long)
*/
@Nullable
@Override
public JobExecution getJobExecution(@Nullable Long executionId) {
Expand All @@ -157,12 +134,6 @@ public JobExecution getJobExecution(@Nullable Long executionId) {
return jobExecution;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getStepExecution(java
* .lang.Long)
*/
@Nullable
@Override
public StepExecution getStepExecution(@Nullable Long jobExecutionId, @Nullable Long executionId) {
Expand All @@ -176,70 +147,34 @@ public StepExecution getStepExecution(@Nullable Long jobExecutionId, @Nullable L
return stepExecution;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java
* .lang.Long)
*/
@Nullable
@Override
public JobInstance getJobInstance(@Nullable Long instanceId) {
return jobInstanceDao.getJobInstance(instanceId);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java
* .lang.String, org.springframework.batch.core.JobParameters)
*/
@Nullable
@Override
public JobInstance getJobInstance(String jobName, JobParameters jobParameters) {
return jobInstanceDao.getJobInstance(jobName, jobParameters);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobInstance(java
* .lang.String)
*/
@Nullable
@Override
public JobInstance getLastJobInstance(String jobName) {
return jobInstanceDao.getLastJobInstance(jobName);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getLastJobInstances
* (java.lang.String, int)
*/
@Override
public List<JobInstance> getJobInstances(String jobName, int start, int count) {
return jobInstanceDao.getJobInstances(jobName, start, count);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.explore.JobExplorer#getJobNames()
*/
@Override
public List<String> getJobNames() {
return jobInstanceDao.getJobNames();
}

/*
* (non-Javadoc)
*
* @see
* org.springframework.batch.core.explore.JobExplorer#getJobInstanceCount(java.lang.
* String)
*/
@Override
public long getJobInstanceCount(@Nullable String jobName) throws NoSuchJobException {
return jobInstanceDao.getJobInstanceCount(jobName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,6 @@ public void setName(String name) {
this.name = name;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.domain.IJob#getName()
*/
@Override
public String getName() {
return name;
Expand Down Expand Up @@ -214,11 +209,6 @@ public void setJobParametersIncrementer(JobParametersIncrementer jobParametersIn
this.jobParametersIncrementer = jobParametersIncrementer;
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.Job#getJobParametersIncrementer()
*/
@Override
@Nullable
public JobParametersIncrementer getJobParametersIncrementer() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ public void addStep(Step step) {
this.steps.add(step);
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String)
*/
@Override
public Step getStep(String stepName) {
for (Step step : this.steps) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,11 +32,6 @@ public class DefaultStateTransitionComparator implements Comparator<StateTransit

public static final String STATE_TRANSITION_COMPARATOR = "batch_state_transition_comparator";

/*
* (non-Javadoc)
*
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
*/
@Override
public int compare(StateTransition arg0, StateTransition arg1) {
String value = arg1.getPattern();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2018 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -159,11 +159,6 @@ public boolean isEnd() {
return next == null;
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return String.format("StateTransition: [state=%s, pattern=%s, next=%s]", state == null ? null : state.getName(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -39,11 +39,6 @@ public String getName() {
return name;
}

/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return getClass().getSimpleName() + ": name=[" + name + "]";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2006-2013 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -45,11 +45,6 @@ public FlowExecutionStatus handle(FlowExecutor executor) throws Exception {
return decider.decide(executor.getJobExecution(), executor.getStepExecution());
}

/*
* (non-Javadoc)
*
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
@Override
public boolean isEndState() {
return false;
Expand Down
Loading