Skip to content

Commit

Permalink
Fix an incorrect lang literal check
Browse files Browse the repository at this point in the history
  • Loading branch information
mhgrove committed Mar 4, 2016
1 parent 3269322 commit fa9384e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -30,6 +30,7 @@
import org.openrdf.model.Statement;

import org.openrdf.model.impl.SimpleValueFactory;
import org.openrdf.model.util.Literals;
import org.openrdf.model.vocabulary.RDF;
import org.openrdf.model.vocabulary.XMLSchema;
import org.openrdf.model.vocabulary.RDFS;
Expand Down Expand Up @@ -987,7 +988,7 @@ public Object apply(final Collection<Value> theList) {

if (!aList.stream().anyMatch(CONTAINS_RESOURCES)) {
if (!EmpireOptions.ENABLE_LANG_AWARE) {
Collection<Value> aLangFiltered = aList.stream().filter(theValue -> ((Literal)theValue).getLanguage() == null).collect(Collectors.toList());
Collection<Value> aLangFiltered = aList.stream().filter(theLit -> !Literals.isLanguageLiteral((Literal) theLit)).collect(Collectors.toList());

if (aLangFiltered.isEmpty()) {
LANG_FILTER.setLangCode(getLanguageForLocale());
Expand Down

0 comments on commit fa9384e

Please sign in to comment.