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:06:38 UTC

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

Michael Kreis created SLING-3789:
------------------------------------

             Summary: 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


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)