You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/05/29 08:42:19 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13669039#comment-13669039 ] 

ASF subversion and git services commented on MARMOTTA-250:
----------------------------------------------------------

Commit 3e71a5396862232b29f5e175116c26a17a4eba6e in branch refs/heads/develop from [~wikier]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-marmotta.git;h=3e71a53 ]

fixed MARMOTTA-250

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