[ 
https://issues.apache.org/jira/browse/SLING-11507?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dirk Rudolph resolved SLING-11507.
----------------------------------
    Fix Version/s: Models API 1.4.4
       Resolution: Fixed

> Field injection should not inject static and final fields and methods
> ---------------------------------------------------------------------
>
>                 Key: SLING-11507
>                 URL: https://issues.apache.org/jira/browse/SLING-11507
>             Project: Sling
>          Issue Type: Bug
>          Components: Sling Models
>    Affects Versions: Models Impl 1.4.14
>            Reporter: Joerg Hoh
>            Assignee: Dirk Rudolph
>            Priority: Critical
>             Fix For: Models API 1.4.4
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> Currently this injection works:
> {noformat}
>         @SlingObject
>         private static ResourceResolver resourceResolver;
> {noformat}
> but it should not. Sling Models are Pojos and injection must never inject 
> into static fields. Instead it should throw an exception and an error message 
> indicating the problem (another option would be to refuse the injection with 
> a proper error message).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to