Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-1337

When extending JobStatus, AbstractJobs created through the JobExecutor are not initialized with the extended JobStatus

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 10.0
    • Job
    • None
    • Unknown
    • N/A
    • N/A

    Description

      When defining an AbstractJob implementation like so:

      MyCustomJob.java
      public class MyCustomJob extends AbstractJob<CustomJobRequest, CustomJobStatus>
      

      … with the following classes :

      CustomJobRequest.java
      public class CustomJobRequest extends DefaultRequest
      
      CustomJobStatus.java
      public class CustomJobStatus extends DefaultJobStatus<CustomJobRequest>
      

      When instantiated with the JobExecutor#execute(), the job MyCustomJob is not initialized with an instance of CustomJobStatus but with an instance of DefaultJobStatus.

      It seems that the problem comes from https://github.com/xwiki/xwiki-commons/blob/44c1adfacdcbec59d41496587289b70d0deb1986/xwiki-commons-core/xwiki-commons-job/src/main/java/org/xwiki/job/AbstractJob.java#L323

      Attachments

        Activity

          People

            caubin Clément Aubin
            caubin Clément Aubin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: