diff options
3 files changed, 1 insertions, 11 deletions
diff --git a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java index 19933222587..4c4cc3b524f 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java @@ -195,15 +195,6 @@ public class RankProfile implements Cloneable { * definition */ public void setInherited(String inheritedName) { - if (inheritedName.equals(getName())) { - String msg = "Rank profile '" + getName() + "' inherits self, which is illegal."; - if (search.getDeployProperties().featureFlags().enforceRankProfileInheritance()) { - throw new IllegalArgumentException(msg); - } else { - log.warning(msg); - } - inheritedName = null; - } this.inheritedName = inheritedName; } diff --git a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java index a728acf29e7..c58a539abf1 100644 --- a/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java +++ b/config-model/src/test/java/com/yahoo/searchdefinition/RankProfileTestCase.java @@ -92,7 +92,7 @@ public class RankProfileTestCase extends SchemaTestCase { builder.build(true); fail(); } catch (IllegalArgumentException e) { - assertEquals("Rank profile 'self' inherits self, which is illegal.", e.getMessage()); + assertEquals("There is a cycle in the inheritance for rank-profile 'self' = [self, self]", e.getMessage()); } } diff --git a/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java b/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java index a65701fe261..32e673ccbf2 100644 --- a/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java +++ b/vespa-documentgen-plugin/src/test/java/com/yahoo/vespa/DocumentGenTest.java @@ -5,7 +5,6 @@ import com.yahoo.document.DataType; import com.yahoo.document.StructDataType; import com.yahoo.document.WeightedSetDataType; import com.yahoo.searchdefinition.Search; -import org.junit.Ignore; import org.junit.Test; import java.io.File; |