[ 
https://issues.apache.org/jira/browse/MARMOTTA-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13815350#comment-13815350
 ] 

Peter Ansell commented on MARMOTTA-350:
---------------------------------------

While we are cleaning up, it would be great to ensure that language is checked 
before datatype, to prepare for RDF-1.1.

The diff contains this code:

+                // differentiate between the different types of the value
+                if (type == null) {
+                    // FIXME: MARMOTTA-39 (this is to avoid a 
NullPointerException in the following if-clauses)
+                    result = connection.loadLiteral(value.toString(), lang, 
rtype);


That clause needs to check "if(lang != null)" first, and then there should be 
an "else if(type == null)", to ensure that when RDF:LANGSTRING starts to be 
used it doesn't skip that clause, and that we support null types up until 
RDF-1.1, and after RDF-1.1 the second clause will always assign XSD:STRING if 
the type comes in as null.

> Clean up KiWiValueFactory
> -------------------------
>
>                 Key: MARMOTTA-350
>                 URL: https://issues.apache.org/jira/browse/MARMOTTA-350
>             Project: Marmotta
>          Issue Type: Improvement
>          Components: Triple Store
>    Affects Versions: 3.1-incubating
>            Reporter: Sebastian Schaffert
>            Assignee: Sebastian Schaffert
>
> The KiWiValueFactory is currently very complex and thus error prone. We 
> should simplify and clean up the implementation so it is more consistent, 
> less error-prone and offers better performance. An example is given in 
> KiWiHandler in the kiwi-loader module.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to