diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-09-07 07:30:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 07:30:19 +0200 |
commit | b24e2707ec319182a0c71af642ab133f8c72da2a (patch) | |
tree | e3f4a29af8f3435f6dea655578a49391268b720c /config-model | |
parent | af076bbc9a1e401638dec91455d853190ac661d5 (diff) |
Revert "Balder/resolve inhertitance early"
Diffstat (limited to 'config-model')
-rw-r--r-- | config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java | 14 |
1 files changed, 2 insertions, 12 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 79f56e3f76e..47d95cba516 100644 --- a/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java +++ b/config-model/src/main/java/com/yahoo/searchdefinition/RankProfile.java @@ -65,7 +65,6 @@ public class RankProfile implements Cloneable { /** The name of the rank profile inherited by this */ private String inheritedName = null; - private RankProfile inherited = null; /** The match settings of this profile */ private MatchPhaseSettings matchPhaseSettings = null; @@ -193,7 +192,6 @@ public class RankProfile implements Cloneable { */ public void setInherited(String inheritedName) { this.inheritedName = inheritedName; - inherited = resolveInherited(inheritedName); } /** Returns the name of the profile this one inherits, or null if none is inherited */ @@ -201,14 +199,6 @@ public class RankProfile implements Cloneable { /** Returns the inherited rank profile, or null if there is none */ public RankProfile getInherited() { - if (inherited != null) return inherited; - if (inheritedName != null) { - inherited = resolveInherited(inheritedName); - } - return inherited; - } - - private RankProfile resolveInherited(String inheritedName) { if (getSearch() == null) return getInheritedFromRegistry(inheritedName); RankProfile inheritedInThisSearch = rankProfileRegistry.get(search, inheritedName); @@ -460,9 +450,9 @@ public class RankProfile implements Cloneable { * */ public void setInheritedSummaryFeatures(String parentProfile) { - if ( ! parentProfile.equals(getInheritedName())) + if ( ! parentProfile.equals(inheritedName)) throw new IllegalArgumentException("This can only inherit the summary features of its parent, '" + - getInheritedName() + ", but attemtping to inherit '" + parentProfile); + inheritedName + ", but attemtping to inherit '" + parentProfile); this.inheritedSummaryFeatures = parentProfile; } |