From fbe345630b9ca0b22bcb4e1f5626adf13cba5a1a Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 29 Jan 2019 23:36:53 +0100 Subject: [PATCH] Fix build warnings --- .../domain/football/internal/PlayerSummaryMapper.java | 5 +++-- .../football/internal/PlayerSummaryRowMapper.java | 5 +++-- .../batch/core/jsr/launch/JsrJobOperator.java | 5 +++-- .../batch/item/function/package-info.java | 4 ++-- .../support/builder/CompositeItemWriterBuilder.java | 10 ++++++---- .../domain/football/internal/PlayerSummaryMapper.java | 5 +++-- .../football/internal/PlayerSummaryRowMapper.java | 5 +++-- 7 files changed, 23 insertions(+), 16 deletions(-) diff --git a/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java b/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java index cc7cb9f1e..10ed6c6cc 100644 --- a/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java +++ b/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2019 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. @@ -22,9 +22,10 @@ import org.springframework.batch.core.test.football.PlayerSummary; import org.springframework.jdbc.core.RowMapper; /** - * RowMapper used to map a ResultSet to a {@link PlayerSummary} + * RowMapper used to map a ResultSet to a {@link org.springframework.batch.core.test.football.PlayerSummary} * * @author Lucas Ward + * @author Mahmoud Ben Hassine * */ public class PlayerSummaryMapper implements RowMapper { diff --git a/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java b/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java index e793a1396..0c25226bb 100644 --- a/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java +++ b/spring-batch-core-tests/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2019 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. @@ -22,9 +22,10 @@ import org.springframework.batch.core.test.football.PlayerSummary; import org.springframework.jdbc.core.RowMapper; /** - * RowMapper used to map a ResultSet to a {@link PlayerSummary} + * RowMapper used to map a ResultSet to a {@link org.springframework.batch.core.test.football.PlayerSummary} * * @author Lucas Ward + * @author Mahmoud Ben Hassine * */ public class PlayerSummaryRowMapper implements RowMapper { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java index 3f6ad05d0..d65bfc738 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2017 the original author or authors. + * Copyright 2013-2019 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. @@ -138,6 +138,7 @@ import org.springframework.util.Assert; * * @author Michael Minella * @author Chris Schaefer + * @author Mahmoud Ben Hassine * @since 3.0 */ public class JsrJobOperator implements JobOperator, ApplicationContextAware, InitializingBean { @@ -177,7 +178,7 @@ public class JsrJobOperator implements JobOperator, ApplicationContextAware, Ini * @param jobExplorer an instance of Spring Batch's {@link JobExplorer}. * @param jobRepository an instance of Spring Batch's {@link JobOperator}. * @param jobParametersConverter an instance of Spring Batch's {@link JobParametersConverter}. - * @param transactionManager a {@link javax.transaction.TransactionManager}. + * @param transactionManager a {@link PlatformTransactionManager}. */ public JsrJobOperator(JobExplorer jobExplorer, JobRepository jobRepository, JobParametersConverter jobParametersConverter, PlatformTransactionManager transactionManager) { Assert.notNull(jobExplorer, "A JobExplorer is required"); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/function/package-info.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/function/package-info.java index c9e827468..e8e7a16ec 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/function/package-info.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/function/package-info.java @@ -1,5 +1,5 @@ /* - * Copyright 2018 the original author or authors. + * Copyright 2018-2019 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. @@ -15,7 +15,7 @@ */ /** - * Adapters for {@link java.util.function} components. + * Adapters for {@code java.util.function} components. * * @author Mahmoud Ben Hassine */ diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/builder/CompositeItemWriterBuilder.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/builder/CompositeItemWriterBuilder.java index d37d0fb38..bd13f7c56 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/builder/CompositeItemWriterBuilder.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/builder/CompositeItemWriterBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2017-2018 the original author or authors. + * Copyright 2017-2019 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. @@ -28,6 +28,7 @@ import org.springframework.util.Assert; * * @author Glenn Renfro * @author Drummond Dawson + * @author Mahmoud Ben Hassine * @since 4.0 */ public class CompositeItemWriterBuilder { @@ -72,13 +73,14 @@ public class CompositeItemWriterBuilder { * The item writers to use as delegates. Items are written to each of the * delegates. * - * @param delegates the delegates to use. The delegates list must not be null - * nor be empty. + * @param delegates the delegates to use. * @return this instance for method chaining. * * @see CompositeItemWriter#setDelegates(List) */ - public CompositeItemWriterBuilder delegates(ItemWriter... delegates) { + @SafeVarargs + @SuppressWarnings("varargs") + public final CompositeItemWriterBuilder delegates(ItemWriter... delegates) { return delegates(Arrays.asList(delegates)); } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java index a30ea3b29..6172be675 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2019 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. @@ -22,9 +22,10 @@ import org.springframework.batch.sample.domain.football.PlayerSummary; import org.springframework.jdbc.core.RowMapper; /** - * RowMapper used to map a ResultSet to a {@link PlayerSummary} + * RowMapper used to map a ResultSet to a {@link org.springframework.batch.core.test.football.PlayerSummary} * * @author Lucas Ward + * @author Mahmoud Ben Hassine * */ public class PlayerSummaryMapper implements RowMapper { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java index 6fcdaee2f..767cba162 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/domain/football/internal/PlayerSummaryRowMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2019 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. @@ -22,9 +22,10 @@ import org.springframework.batch.sample.domain.football.PlayerSummary; import org.springframework.jdbc.core.RowMapper; /** - * RowMapper used to map a ResultSet to a {@link PlayerSummary} + * RowMapper used to map a ResultSet to a {@link org.springframework.batch.core.test.football.PlayerSummary} * * @author Lucas Ward + * @author Mahmoud Ben Hassine * */ public class PlayerSummaryRowMapper implements RowMapper {