From f6a8d105950fbbc3cd557b591dded85329278f15 Mon Sep 17 00:00:00 2001 From: Mahmoud Ben Hassine Date: Tue, 15 Sep 2020 17:00:08 +0200 Subject: [PATCH] Deprecate MultiResourceItemReader#getCurrentResource Resolves #3776 --- .../batch/item/file/MultiResourceItemReader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java index df3d0ead4..6b53b5b7b 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/MultiResourceItemReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2020 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. @@ -251,8 +251,11 @@ public class MultiResourceItemReader extends AbstractItemStreamItemReader * Getter for the current resource. * @return the current resource or {@code null} if all resources have been * processed or the first resource has not been assigned yet. + * + * @deprecated In favor of using {@link ResourceAware} instead. */ @Nullable + @Deprecated public Resource getCurrentResource() { if (currentResource >= resources.length || currentResource < 0) { return null;