Skip to content

Commit ac92bd3

Browse files
committed
Merge pull request #150 from thaidlas/RdfMacroPipe-Bugfix
Bugfix for RdfMacroPipe
2 parents 4e1deeb + fb3fc98 commit ac92bd3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/culturegraph/mf/stream/pipe/RdfMacroPipe.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package org.culturegraph.mf.stream.pipe;
1717

18+
import org.apache.commons.lang.StringUtils;
1819
import org.culturegraph.mf.framework.DefaultStreamPipe;
1920
import org.culturegraph.mf.framework.StreamReceiver;
2021
import org.culturegraph.mf.framework.annotations.Description;
@@ -76,7 +77,7 @@ public void endEntity() {
7677
@Override
7778
public void literal(final String name, final String value) {
7879
final int index = name.indexOf(LANGUAGE_MARKER);
79-
if (name.charAt(0)==REFERENCE_MARKER) {
80+
if (StringUtils.isNotEmpty(name) && name.charAt(0)==REFERENCE_MARKER) {
8081
getReceiver().startEntity(name.substring(1));
8182
getReceiver().literal(RDF_REFERENCE, value);
8283
getReceiver().endEntity();

0 commit comments

Comments
 (0)