From ee30af4789adf8246880cd9a7f7d9f53dfb5f072 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Thu, 22 Jun 2023 11:17:13 +0200 Subject: [PATCH] Remove redundant "extends Object" --- .../batch/core/step/item/DefaultItemFailureHandler.java | 4 ++-- .../batch/core/configuration/xml/DummyItemWriter.java | 4 ++-- .../batch/core/step/item/SimpleStepFactoryBeanTests.java | 4 ++-- .../batch/item/file/mapping/BeanWrapperFieldSetMapper.java | 4 ++-- .../batch/support/DefaultPropertyEditorRegistrar.java | 4 ++-- .../batch/integration/partition/ExampleItemWriter.java | 4 ++-- .../batch/sample/common/InfiniteLoopWriter.java | 4 ++-- .../springframework/batch/sample/support/DummyItemWriter.java | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/DefaultItemFailureHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/DefaultItemFailureHandler.java index 0d0c880a2..9f1515214 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/DefaultItemFailureHandler.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/DefaultItemFailureHandler.java @@ -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. @@ -46,7 +46,7 @@ public class DefaultItemFailureHandler extends ItemListenerSupport item) { + public void onWriteError(Exception ex, Chunk item) { try { logger.error("Error encountered while writing item: [ " + item + "]", ex); } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/DummyItemWriter.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/DummyItemWriter.java index 2d51d2bdb..415690e67 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/DummyItemWriter.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/DummyItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2009-2022 the original author or authors. + * Copyright 2009-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. @@ -26,7 +26,7 @@ import org.springframework.batch.item.ItemWriter; public class DummyItemWriter implements ItemWriter { @Override - public void write(Chunk items) throws Exception { + public void write(Chunk items) throws Exception { } } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/SimpleStepFactoryBeanTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/SimpleStepFactoryBeanTests.java index a289cd09f..6763f2c99 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/SimpleStepFactoryBeanTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/SimpleStepFactoryBeanTests.java @@ -256,7 +256,7 @@ class SimpleStepFactoryBeanTests { String trail = ""; @Override - public void beforeWrite(Chunk chunk) { + public void beforeWrite(Chunk chunk) { if (chunk.getItems().contains("error")) { throw new RuntimeException("rollback the last chunk"); } @@ -265,7 +265,7 @@ class SimpleStepFactoryBeanTests { } @Override - public void afterWrite(Chunk items) { + public void afterWrite(Chunk items) { trail = trail + "3"; } diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java index 107bab83a..5e41fdc69 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 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. @@ -389,7 +389,7 @@ public class BeanWrapperFieldSetMapper extends DefaultPropertyEditorRegistrar * @see CustomEditorConfigurer#setCustomEditors(Map) */ @Override - public void setCustomEditors(Map customEditors) { + public void setCustomEditors(Map customEditors) { this.isCustomEditorsSet = true; super.setCustomEditors(customEditors); } diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/DefaultPropertyEditorRegistrar.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/DefaultPropertyEditorRegistrar.java index 99871c07a..40fb2a92e 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/DefaultPropertyEditorRegistrar.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/DefaultPropertyEditorRegistrar.java @@ -60,9 +60,9 @@ public class DefaultPropertyEditorRegistrar implements PropertyEditorRegistrar { * PropertyEditor). * @see CustomEditorConfigurer#setCustomEditors(Map) */ - public void setCustomEditors(Map customEditors) { + public void setCustomEditors(Map customEditors) { this.customEditors = new HashMap<>(); - for (Entry entry : customEditors.entrySet()) { + for (Entry entry : customEditors.entrySet()) { Object key = entry.getKey(); Class requiredType = null; if (key instanceof Class) { diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java index 203056e3b..f2053293f 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-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. @@ -31,7 +31,7 @@ public class ExampleItemWriter implements ItemWriter { /** * @see ItemWriter#write(Chunk) */ - public void write(Chunk data) throws Exception { + public void write(Chunk data) throws Exception { log.info(data); } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/InfiniteLoopWriter.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/InfiniteLoopWriter.java index 00ada698b..87f5b4a0d 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/InfiniteLoopWriter.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/common/InfiniteLoopWriter.java @@ -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. @@ -53,7 +53,7 @@ public class InfiniteLoopWriter implements StepExecutionListener, ItemWriter items) throws Exception { + public void write(Chunk items) throws Exception { try { Thread.sleep(500); } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/support/DummyItemWriter.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/support/DummyItemWriter.java index 2e14319b8..6b089e3da 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/support/DummyItemWriter.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/support/DummyItemWriter.java @@ -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. @@ -26,7 +26,7 @@ import org.springframework.batch.item.ItemWriter; public class DummyItemWriter implements ItemWriter { @Override - public void write(Chunk item) throws Exception { + public void write(Chunk items) throws Exception { // NO-OP Thread.sleep(500); }