Skip to content

Commit 30e8bc0

Browse files
committed
preserve exact literals
1 parent 8a3a131 commit 30e8bc0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/model-api/src/main/java/org/eclipse/rdf4j/model/base/AbstractValueFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public Literal createLiteral(String label, CoreDatatype datatype) {
132132
if (label.length() <= 3 && !label.startsWith("+") && !label.startsWith("-")) {
133133
try {
134134
int v = Integer.parseInt(label);
135-
if (v >= 0 && v <= 999) {
135+
if (v >= 0 && v <= 999 && label.equals(Integer.toString(v))) {
136136
return smallIntLiterals[v];
137137
}
138138
} catch (NumberFormatException e) {

0 commit comments

Comments
 (0)