Announcement Announcement Module
Collapse
No announcement yet.
Has SkipListener.onSkipInProcess the right signature? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.

    Comment


    • #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.

      Comment


      • #4
        Hi Dave, hi DH,

        thank you for clarify my misunderstanding.

        Cheers,
        Christian

        Comment

        Working...
        X