-
May 15th, 2009, 04:05 AM
#1
Has SkipListener.onSkipInProcess the right signature?
Hi folks,
The SkipListener in Spring Batch 2.0.0 has the following signature:
package org.springframework.batch.core;
public interface SkipListener<T,S> extends StepListener {
void onSkipInRead(Throwable t);
void onSkipInWrite(S item, Throwable t);
void onSkipInProcess(T item, Throwable t);
}
I think, the signature onSkipInProcess should be:
void onSkipInProcess(S item, Throwable t);
insead of
void onSkipInProcess(T item, Throwable t);
Let me know, if I should file a bug...
Cheers,
Christian
-
May 15th, 2009, 06:18 AM
#2
I don't follow your argument. T and S are just placeholders - they don't mean anything. The order is supposed to be <input,output>. Your proposal would make T redundant and the interface wouldn't compile, unless I misunderstood.
-
May 15th, 2009, 09:08 AM
#3
To clarify a little, onSkipInProcess() receives the item that the ItemProcessor attempted to process. onSkipInWrite() receives the item that the ItemWriter attempted to write. Take a look at the SimpleStepFactoryBean to see how these types correspond to the ItemReader/ItemProcessor/ItemWriter types.
-
May 15th, 2009, 09:19 AM
#4
Hi Dave, hi DH,
thank you for clarify my misunderstanding.
Cheers,
Christian
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules