-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Incorrect deprecation of ItemStreamSupport
#4238
Comments
Thank you for pointing this. That's correct, only the methods |
ItemStreamSupport
ItemStreamSupport
Should these methods really be deprecated? I cannot implement open/close/update in a class that extends from ItemStreamSupport, without getting deprecation warnings. |
You should be able to do that. Here is a quick example: class MyItemStreamSupport extends ItemStreamSupport {
@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
super.open(executionContext);
}
@Override
public void update(ExecutionContext executionContext) throws ItemStreamException {
super.update(executionContext);
}
@Override
public void close() throws ItemStreamException {
super.close();
}
} I have no warnings here. Is this what you are referring to, @jpraet ? |
I get these warnings in IntelliJ as well as during maven compilation:
|
Which revision of Spring Batch do you have? It seems you are compiling a version that contains those methods in Which profile do you have in IntelliJ Idea? I also use IntelliJ Idea and I have no warnings. Moreover, are you using the maven wrapper to compile the infrastructure module? Here is what I have when I add that class and compile on the CLI:
Apart from other deprecation warnings, I don't see any related to I would be grateful to get your feedback on this to fix things if any as I am working on releasing 5.2.0-M2. |
I use the latest GA version 5.1.2. I think for 5.2.0 it should be alright as the deprecated methods have been removed. |
OK now I see, it is because you are on 5.1.x. Indeed, these warnings are gone with 5.2.x. Thank you for your quick feedback! Appreciated your time 🙇♂️ |
Starting with Spring Batch 5, the whole abstract class
ItemStreamSupport
is deprecated and marked for removal.For the methods
close
,open
, andupdate
, the default implementations ofItemStream
yield a one-to-one replacement, respectively.ItemStreamSupport
also has the methodssetName
,setExecutionContextName
, andgetExecutionContextKey
, for which no replacements exist as far as I can tell.Is there a replacement available for the latter methods? Or are only the methods that are inherited from
ItemStream
planned to be removed? If so, why not remove them without deprecation?The text was updated successfully, but these errors were encountered: