diff --git a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/CommonDescriptionScrutinizer.java b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/CommonDescriptionScrutinizer.java index be78919a4..1ee210f7e 100644 --- a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/CommonDescriptionScrutinizer.java +++ b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/CommonDescriptionScrutinizer.java @@ -41,7 +41,9 @@ public class CommonDescriptionScrutinizer extends DescriptionScrutinizer { labels.addAll(update.getLabelsIfNew()); // merge for (MonolingualTextValue label : labels) { String labelText = label.getText(); - if (labelText == null) continue; + if (labelText == null) { + continue; + } labelText = labelText.trim(); if (labelText.equals(descText)) { QAWarning issue = new QAWarning(descIdenticalWithLabel, null, QAWarning.Severity.WARNING, 1); diff --git a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/DescriptionScrutinizer.java b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/DescriptionScrutinizer.java index 3a9075adf..6ab9fc45e 100644 --- a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/DescriptionScrutinizer.java +++ b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/DescriptionScrutinizer.java @@ -1,6 +1,5 @@ package org.openrefine.wikidata.qa.scrutinizers; -import org.openrefine.wikidata.qa.QAWarning; import org.openrefine.wikidata.updates.ItemUpdate; import org.wikidata.wdtk.datamodel.interfaces.MonolingualTextValue; @@ -17,9 +16,13 @@ public abstract class DescriptionScrutinizer extends EditScrutinizer { descriptions.addAll(update.getDescriptionsIfNew()); // merge for (MonolingualTextValue description : descriptions) { String descText = description.getText(); - if (descText == null) continue; + if (descText == null) { + continue; + } descText = descText.trim(); - if (descText.length() == 0) continue; // avoid NullPointerException + if (descText.length() == 0) { + continue; // avoid NullPointerException + } scrutinize(update, descText, description.getLanguageCode()); } diff --git a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/EnglishDescriptionScrutinizer.java b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/EnglishDescriptionScrutinizer.java index ce3274a8d..ec8a0fa33 100644 --- a/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/EnglishDescriptionScrutinizer.java +++ b/extensions/wikidata/src/org/openrefine/wikidata/qa/scrutinizers/EnglishDescriptionScrutinizer.java @@ -16,7 +16,9 @@ public class EnglishDescriptionScrutinizer extends DescriptionScrutinizer { @Override public void scrutinize(ItemUpdate update, String descText, String lang) { - if (!LANG.equalsIgnoreCase(lang)) return; + if (!LANG.equalsIgnoreCase(lang)) { + return; + } checkPunctuationSign(update, descText); checkUppercase(update, descText);