You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SesameOps, LiteralImpl is being used. But that class doesn't do any validation:
scala> import org.openrdf.model.impl._
import org.openrdf.model.impl._
scala> new LiteralImpl("foo", new URIImpl("http://www.w3.org/2001/XMLSchema#boolean"))
res3: org.openrdf.model.impl.LiteralImpl = "foo"^^<http://www.w3.org/2001/XMLSchema#boolean>
There is an easy way to fix that: makeLiteral should look at the datatype being used, and for those that make sense, we should do some simple validation, and even use the most specialized classes for those types.
For example, in the case above, we should be using BooleanLiteral instead.
The text was updated successfully, but these errors were encountered:
The problem was exposed in banana-rdf/banana-ldpatch#1.
In
SesameOps
,LiteralImpl
is being used. But that class doesn't do any validation:There is an easy way to fix that:
makeLiteral
should look at the datatype being used, and for those that make sense, we should do some simple validation, and even use the most specialized classes for those types.For example, in the case above, we should be using BooleanLiteral instead.
The text was updated successfully, but these errors were encountered: