[ 
https://issues.apache.org/jira/browse/SLING-9730?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17195416#comment-17195416
 ] 

Ashish Chopra commented on SLING-9730:
--------------------------------------

hi [~karlpauls],
bq. As we only have the object itself and the mapping needs to be stable across 
JVMs, the easiest mapping key seems to be the package name.
Curious to know, what would happen if _two_ lambdas in the same java-package 
are attempted to be scheduled this way - would it still be possible to 
disambiguate amongst them? (maybe not, since they'd have the same java-package 
name?)

> Scheduler job mapping doesn't work correctly for lambdas.
> ---------------------------------------------------------
>
>                 Key: SLING-9730
>                 URL: https://issues.apache.org/jira/browse/SLING-9730
>             Project: Sling
>          Issue Type: Bug
>          Components: Commons
>    Affects Versions: Commons Scheduler 2.7.6
>            Reporter: Karl Pauls
>            Assignee: Karl Pauls
>            Priority: Major
>             Fix For: Commons Scheduler 2.7.8
>
>
> When scheduling a job that is a Runnable the mapping from job to instance is 
> done based on the class name. That is problematic in case of lambdas as the 
> class name is not stable. We should use a key that is stable for all cases. 
> As we only have the object itself and the mapping needs to be stable across 
> JVMs, the easiest mapping key seems to be the package name. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to