You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Michael Kreis (JIRA)" <ji...@apache.org> on 2014/07/24 15:19:38 UTC

[jira] [Resolved] (SLING-3789) Default annotation only works with String

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

Michael Kreis resolved SLING-3789.
----------------------------------

       Resolution: Duplicate
    Fix Version/s: Sling Models Implementation 1.0.6

This is already implemented in a newer version of Sling Models

> Default annotation only works with String
> -----------------------------------------
>
>                 Key: SLING-3789
>                 URL: https://issues.apache.org/jira/browse/SLING-3789
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: Sling Models Implementation 1.0.4
>            Reporter: Michael Kreis
>             Fix For: Sling Models Implementation 1.0.6
>
>
> The @Default annotation is only working with Strings. The type check injectedClass == Integer.TYPE in ModelAdapterFactory#getDefaultValue does not working because injectedClass is never a primitive type. Therefore the check for the corresponding class wrapper should be added. 
> E.g. if (componentType == Integer.TYPE || componentType == Integer.class) 



--
This message was sent by Atlassian JIRA
(v6.2#6252)