From e1939edb69138921c58a629ba9fcfd4e9d6ca6f8 Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Mon, 30 Mar 2009 15:11:58 +0000 Subject: [PATCH] LMS-787 remove warnings SVN: 10474 --- .../cisd/openbis/generic/shared/dto/VocabularyTermPE.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java index 6c3e0e4b4e3..30af2b895cc 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/shared/dto/VocabularyTermPE.java @@ -111,9 +111,12 @@ public class VocabularyTermPE extends HibernateAbstractRegistrationHolder implem public void setVocabulary(final VocabularyPE vocabulary) { - if (vocabulary == null && getVocabulary() != null) + if (vocabulary == null) { - getVocabulary().removeTerm(this); + if (getVocabulary() != null) + { + getVocabulary().removeTerm(this); + } } else { vocabulary.addTerm(this); -- GitLab