diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/CustomNameTranslator.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/CustomNameTranslator.java index 9cf1ad092818d00871c4f879ee027a4eb6266ad3..7a96cbd22c2ab1a70a08f9e383e0f8af7a64e993 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/CustomNameTranslator.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/CustomNameTranslator.java @@ -27,7 +27,6 @@ import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException; */ public class CustomNameTranslator implements INameTranslator { - private final HashMap<String, String> spaceMappings; public CustomNameTranslator(HashMap<String, String> spaceMappings) diff --git a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/PrefixBasedNameTranslator.java b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/PrefixBasedNameTranslator.java index 7c18825fc9bef24e28b9e5c204879787faffba54..bfc2ccc5646b9d7f4c2a5b64de60eb547c84fcfb 100644 --- a/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/PrefixBasedNameTranslator.java +++ b/datastore_server/source/java/ch/ethz/sis/openbis/generic/server/dss/plugins/sync/harvester/synchronizer/translator/PrefixBasedNameTranslator.java @@ -16,6 +16,8 @@ package ch.ethz.sis.openbis.generic.server.dss.plugins.sync.harvester.synchronizer.translator; +import org.apache.commons.lang3.StringUtils; + /** * * @@ -33,6 +35,7 @@ public class PrefixBasedNameTranslator implements INameTranslator @Override public String translate(String name) { + assert StringUtils.isBlank(name) == false : "Prefix translation can only be done for non-null values"; return prefix + "_" + name; }