You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "Sergio Fernández (JIRA)" <ji...@apache.org> on 2013/05/29 08:44:20 UTC

[jira] [Resolved] (MARMOTTA-250) NullPointerException adding content types in a subclass of LDClient Endpoint

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

Sergio Fernández resolved MARMOTTA-250.
---------------------------------------

    Resolution: Fixed
      Assignee: Sergio Fernández
    
> NullPointerException adding content types in a subclass of LDClient Endpoint
> ----------------------------------------------------------------------------
>
>                 Key: MARMOTTA-250
>                 URL: https://issues.apache.org/jira/browse/MARMOTTA-250
>             Project: Marmotta
>          Issue Type: Bug
>            Reporter: Sergio Fernández
>            Assignee: Sergio Fernández
>            Priority: Trivial
>   Original Estimate: 2m
>  Remaining Estimate: 2m
>
> When creating a concrete implementation extending org.apache.marmotta.ldclient.api.endpoint.Endpoint, this line causes a NullPointerException:
>         addContentType(new ContentType("text", "html"));
> It looks the collection is not properly initialized by default, so you are forced to to use something like:
>         Set<ContentType> contentTypes = new HashSet<ContentType>();
>         contentTypes.add(new ContentType("text", "html"));
>         setContentTypes(contentTypes); 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira