Skip to content

Commit f0137bc

Browse files
committed
Remove redundant modifiers
1 parent 0a1cdb0 commit f0137bc

File tree

16 files changed

+49
-41
lines changed

16 files changed

+49
-41
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
3333
* @author Lucas Ward
3434
* @author Dave Syer
3535
* @author Taeik Lim
36+
* @author Mahmoud Ben Hassine
3637
*/
3738
@FunctionalInterface
3839
public interface JobLauncher {
@@ -59,7 +60,7 @@ public interface JobLauncher {
5960
* same parameters and completed successfully
6061
* @throws JobParametersInvalidException if the parameters are not valid for this job
6162
*/
62-
public JobExecution run(Job job, JobParameters jobParameters) throws JobExecutionAlreadyRunningException,
63+
JobExecution run(Job job, JobParameters jobParameters) throws JobExecutionAlreadyRunningException,
6364
JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException;
6465

6566
}

spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ExitCodeMapper.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2007 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,25 +24,26 @@
2424
* @author Stijn Maller
2525
* @author Lucas Ward
2626
* @author Dave Syer
27+
* @author Mahmoud Ben Hassine
2728
*/
2829
public interface ExitCodeMapper {
2930

30-
static int JVM_EXITCODE_COMPLETED = 0;
31+
int JVM_EXITCODE_COMPLETED = 0;
3132

32-
static int JVM_EXITCODE_GENERIC_ERROR = 1;
33+
int JVM_EXITCODE_GENERIC_ERROR = 1;
3334

34-
static int JVM_EXITCODE_JOB_ERROR = 2;
35+
int JVM_EXITCODE_JOB_ERROR = 2;
3536

36-
public static final String NO_SUCH_JOB = "NO_SUCH_JOB";
37+
String NO_SUCH_JOB = "NO_SUCH_JOB";
3738

38-
public static final String JOB_NOT_PROVIDED = "JOB_NOT_PROVIDED";
39+
String JOB_NOT_PROVIDED = "JOB_NOT_PROVIDED";
3940

4041
/**
4142
* Convert the exit code from String into an integer that the calling environment as
4243
* an operating system can interpret as an exit status.
4344
* @param exitCode The exit code which is used internally.
4445
* @return The corresponding exit status as known by the calling environment.
4546
*/
46-
public int intValue(String exitCode);
47+
int intValue(String exitCode);
4748

4849
}

spring-batch-core/src/main/java/org/springframework/batch/core/listener/ListenerMetaData.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -21,20 +21,21 @@
2121
* A common interface for listener meta data enumerations.
2222
*
2323
* @author Dan Garrette
24+
* @author Mahmoud Ben Hassine
2425
* @since 2.0
2526
* @see JobListenerMetaData
2627
* @see StepListenerMetaData
2728
*/
2829
public interface ListenerMetaData {
2930

30-
public String getMethodName();
31+
String getMethodName();
3132

32-
public Class<? extends Annotation> getAnnotation();
33+
Class<? extends Annotation> getAnnotation();
3334

34-
public Class<?> getListenerInterface();
35+
Class<?> getListenerInterface();
3536

36-
public String getPropertyName();
37+
String getPropertyName();
3738

38-
public Class<?>[] getParamTypes();
39+
Class<?>[] getParamTypes();
3940

4041
}

spring-batch-core/src/test/java/org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public String call() throws Exception {
212212

213213
}
214214

215-
public static interface ISimpleHolder {
215+
public interface ISimpleHolder {
216216

217217
String call() throws Exception;
218218

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/orm/JpaQueryProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2021 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public interface JpaQueryProvider {
4141
* </p>
4242
* @return created query
4343
*/
44-
public Query createQuery();
44+
Query createQuery();
4545

4646
/**
4747
* Provide an {@link EntityManager} for the query to be built.

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/DataFieldMaxValueIncrementerFactory.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2008 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@
2222
* provided string.
2323
*
2424
* @author Lucas Ward
25+
* @author Mahmoud Ben Hassine
2526
*
2627
*/
2728
public interface DataFieldMaxValueIncrementerFactory {
@@ -35,7 +36,7 @@ public interface DataFieldMaxValueIncrementerFactory {
3536
* @throws IllegalArgumentException if databaseType is invalid type, or
3637
* incrementerName is null.
3738
*/
38-
public DataFieldMaxValueIncrementer getIncrementer(String databaseType, String incrementerName);
39+
DataFieldMaxValueIncrementer getIncrementer(String databaseType, String incrementerName);
3940

4041
/**
4142
* Returns boolean indicated whether or not the provided string is supported by this
@@ -44,12 +45,12 @@ public interface DataFieldMaxValueIncrementerFactory {
4445
* @return true if the incrementerType is supported by this database type. Else false
4546
* is returned.
4647
*/
47-
public boolean isSupportedIncrementerType(String databaseType);
48+
boolean isSupportedIncrementerType(String databaseType);
4849

4950
/**
5051
* Returns the list of supported database incrementer types
5152
* @return an array of {@link String}s containing the supported incrementer types.
5253
*/
53-
public String[] getSupportedIncrementerTypes();
54+
String[] getSupportedIncrementerTypes();
5455

5556
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/item/mail/MailErrorHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2010 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@
2424
*
2525
* @author Dan Garrette
2626
* @author Dave Syer
27+
* @author Mahmoud Ben Hassine
2728
* @since 2.1
2829
*/
2930
public interface MailErrorHandler {
@@ -37,6 +38,6 @@ public interface MailErrorHandler {
3738
* @param exception the exception that caused the failure
3839
* @throws MailException if the exception cannot be handled
3940
*/
40-
public void handle(MailMessage message, Exception exception) throws MailException;
41+
void handle(MailMessage message, Exception exception) throws MailException;
4142

4243
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/RepeatStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2007 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@ public enum RepeatStatus {
2929

3030
private final boolean continuable;
3131

32-
private RepeatStatus(boolean continuable) {
32+
RepeatStatus(boolean continuable) {
3333
this.continuable = continuable;
3434
}
3535

spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/exception/LogOrRethrowExceptionHandler.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2007 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,6 +29,7 @@
2929
* classifier must be the same as the static enum in this class.
3030
*
3131
* @author Dave Syer
32+
* @author Mahmoud Ben Hassine
3233
*
3334
*/
3435
public class LogOrRethrowExceptionHandler implements ExceptionHandler {
@@ -39,7 +40,7 @@ public class LogOrRethrowExceptionHandler implements ExceptionHandler {
3940
* @author Dave Syer
4041
*
4142
*/
42-
public static enum Level {
43+
public enum Level {
4344

4445
/**
4546
* Key for {@link Classifier} signalling that the throwable should be rethrown. If

spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultQueue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -79,6 +79,6 @@ interface ResultQueue<T> {
7979
* when it is finished.
8080
* @return true if more results are expected, but possibly not yet available.
8181
*/
82-
public boolean isExpecting();
82+
boolean isExpecting();
8383

8484
}

spring-batch-infrastructure/src/main/java/org/springframework/batch/support/DatabaseType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2022 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ public enum DatabaseType {
5252
// in metadata.
5353
private final String productName;
5454

55-
private DatabaseType(String productName) {
55+
DatabaseType(String productName) {
5656
this.productName = productName;
5757
}
5858

spring-batch-infrastructure/src/test/java/org/springframework/batch/container/jms/BatchMessageListenerContainer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public class BatchMessageListenerContainer extends DefaultMessageListenerContain
5757
* @author Dave Syer
5858
*
5959
*/
60-
public static interface ContainerDelegate {
60+
public interface ContainerDelegate {
6161

6262
boolean receiveAndExecute(Object invoker, Session session, MessageConsumer consumer) throws JMSException;
6363

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/adapter/HippyMethodInvokerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2010-2022 the original author or authors.
2+
* Copyright 2010-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -158,7 +158,7 @@ public String empty() {
158158

159159
}
160160

161-
public static interface Service {
161+
public interface Service {
162162

163163
String getMessage(double value, String input);
164164

spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxyTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,14 +257,14 @@ void unwrapForSmartDataSource() throws Exception {
257257
/**
258258
* Interface implemented by the wrapped DataSource
259259
*/
260-
private static interface Supported {
260+
private interface Supported {
261261

262262
}
263263

264264
/**
265265
* Interface *not* implemented by the wrapped DataSource
266266
*/
267-
private static interface Unsupported {
267+
private interface Unsupported {
268268

269269
}
270270

spring-batch-infrastructure/src/test/java/org/springframework/batch/support/AnnotationMethodResolverTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -30,6 +30,7 @@
3030

3131
/**
3232
* @author Mark Fisher
33+
* @author Mahmoud Ben Hassine
3334
*/
3435
class AnnotationMethodResolverTests {
3536

@@ -55,7 +56,7 @@ void noAnnotations() {
5556

5657
@Target(ElementType.METHOD)
5758
@Retention(RetentionPolicy.RUNTIME)
58-
private static @interface TestAnnotation {
59+
private @interface TestAnnotation {
5960

6061
}
6162

spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/trade/CustomerOperation.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2014 the original author or authors.
2+
* Copyright 2006-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
* Enum representing on of 3 possible actions on a customer update: Add, update, or delete
2424
*
2525
* @author Lucas Ward
26+
* @author Mahmoud Ben Hassine
2627
*
2728
*/
2829
public enum CustomerOperation {
@@ -33,7 +34,7 @@ public enum CustomerOperation {
3334

3435
private static final Map<Character, CustomerOperation> CODE_MAP;
3536

36-
private CustomerOperation(char code) {
37+
CustomerOperation(char code) {
3738
this.code = code;
3839
}
3940

0 commit comments

Comments
 (0)