aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-05-11 23:49:45 +0200
committerGitHub <noreply@github.com>2022-05-11 23:49:45 +0200
commitcd75d7bd21d5e5d084c17d2831c43a14dbff8efa (patch)
treeed0ef6db7f9b348da7279dfb93234f19ec6d73e5 /container-search/src
parentf055594f402631c216241a123144bbe171c61e4b (diff)
Revert "Pass DeployState"
Diffstat (limited to 'container-search/src')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
index e942d5dbdef..1910078058a 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/QueryProfileRegistry.java
@@ -49,30 +49,30 @@ public class QueryProfileRegistry extends ComponentRegistry<QueryProfile> {
* which has a type which allows path mahting is used. If there is no such profile, null is returned.
*/
public QueryProfile findQueryProfile(String idString) {
- if (idString == null) return getComponent("default");
- ComponentSpecification id = new ComponentSpecification(idString);
- QueryProfile profile = getComponent(id);
- if (profile != null) return profile;
+ if (idString==null) return getComponent("default");
+ ComponentSpecification id=new ComponentSpecification(idString);
+ QueryProfile profile=getComponent(id);
+ if (profile!=null) return profile;
return findPathParentQueryProfile(new ComponentSpecification(idString));
}
private QueryProfile findPathParentQueryProfile(ComponentSpecification id) {
// Try the name with "/" appended - should have the same semantics with path matching
- QueryProfile slashedProfile = getComponent(new ComponentSpecification(id.getName() + "/", id.getVersionSpecification()));
- if (slashedProfile != null && slashedProfile.getType() != null && slashedProfile.getType().getMatchAsPath())
+ QueryProfile slashedProfile=getComponent(new ComponentSpecification(id.getName() + "/",id.getVersionSpecification()));
+ if (slashedProfile!=null && slashedProfile.getType()!=null && slashedProfile.getType().getMatchAsPath())
return slashedProfile;
// Extract the parent (if any)
- int slashIndex = id.getName().lastIndexOf("/");
- if (slashIndex < 1) return null;
- String parentName = id.getName().substring(0,slashIndex);
+ int slashIndex=id.getName().lastIndexOf("/");
+ if (slashIndex<1) return null;
+ String parentName=id.getName().substring(0,slashIndex);
- ComponentSpecification parentId = new ComponentSpecification(parentName, id.getVersionSpecification());
+ ComponentSpecification parentId=new ComponentSpecification(parentName,id.getVersionSpecification());
- QueryProfile pathParentProfile = getComponent(parentId);
+ QueryProfile pathParentProfile=getComponent(parentId);
- if (pathParentProfile != null && pathParentProfile.getType() != null && pathParentProfile.getType().getMatchAsPath())
+ if (pathParentProfile!=null && pathParentProfile.getType()!=null && pathParentProfile.getType().getMatchAsPath())
return pathParentProfile;
return findPathParentQueryProfile(parentId);
}