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:30:20 UTC

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

Sergio Fernández created MARMOTTA-250:
-----------------------------------------

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


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