Results 1 to 4 of 4

Thread: Has SkipListener.onSkipInProcess the right signature?

  1. #1
    Join Date
    Nov 2004
    Posts
    10

    Default 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. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    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.

  3. #3
    Join Date
    Feb 2008
    Posts
    488

    Default

    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.

  4. #4
    Join Date
    Nov 2004
    Posts
    10

    Default

    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
  •