Results 1 to 4 of 4

Thread: JobExecution design question

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    26

    Default JobExecution design question

    Hi all,

    In the org.springframework.batch.core.domain.JobExecution class, there's an accessor for the JobInstance attribute: getJob(). And there's a method called getJobIdentifier() that returns job.getIdentifier(). One could get this information by calling getJob().getIdentifier() so it seems to me that the former is redundant, unless you wanted to hide the JobInstance behind the interface of JobExecution class but in this case getJob() breaks this idea. Am I missing something?

    Thanks,

    - Yagiz Erkan -
    http://blog.decaresystems.ie

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    I think it was an artifact from a previous model in which JobExecution.getJob() did not exist. Actually, it might have been intentional to encapsulate a null check for job before calling getIdentifier(), but in this case I'm pretty sure it was just an oversight. I have refactored to remove the convenience method from JobExecution.

  3. #3
    Join Date
    Feb 2006
    Posts
    26

    Default

    OK! I see... Thanks...
    I've been going through the code and I've seen various typos and errors in the javadocs. Do you want me to send my humble suggestions here or via jira or by e-mail?

  4. #4
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    JIRA is good (so is humble, but if we screwed up just say so).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •