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

Jason E Bailey updated SLING-3911:
----------------------------------
    Attachment: SLING-3911-2.patch
                SLING-3911-1.patch

Patches change 3 things. First, replaces the default assignments in the Default 
anotation to empty arrays. Second, adds a Map that returns the default value 
based on Class based key. Third rewrites the Default injection method to 
utilize the above two mentioned changes.

> Sling Models: Unexpected behaviour from Default
> -----------------------------------------------
>
>                 Key: SLING-3911
>                 URL: https://issues.apache.org/jira/browse/SLING-3911
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Jason E Bailey
>            Priority: Minor
>              Labels: models
>         Attachments: SLING-3911-1.patch, SLING-3911-2.patch
>
>
> Current application of the @Default annotation has unexpected results
> {code}
> @Default() int[] intExample; 
> // sets intExample to a non empty array of [0]
> @Default(longValues={1,1}) int[] intExample2;
> // sets intExample2 to a non empty array of [0]
> {code}
> This experience occurs will all supported array types



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to