diff options
3 files changed, 6 insertions, 3 deletions
diff --git a/container-core/abi-spec.json b/container-core/abi-spec.json index cbb55654930..f9b146bc669 100644 --- a/container-core/abi-spec.json +++ b/container-core/abi-spec.json @@ -3186,8 +3186,7 @@ "public boolean equals(java.lang.Object)", "public java.lang.String toString()", "public java.lang.String getLowerCasedName()", - "public static com.yahoo.processing.request.CompoundName from(java.lang.String)", - "public static com.yahoo.processing.request.CompoundName of(java.lang.String)" + "public static com.yahoo.processing.request.CompoundName from(java.lang.String)" ], "fields" : [ "public static final com.yahoo.processing.request.CompoundName empty" diff --git a/container-core/src/main/java/com/yahoo/processing/request/CompoundName.java b/container-core/src/main/java/com/yahoo/processing/request/CompoundName.java index 620e46ee9cc..ac7b3d24d08 100644 --- a/container-core/src/main/java/com/yahoo/processing/request/CompoundName.java +++ b/container-core/src/main/java/com/yahoo/processing/request/CompoundName.java @@ -302,6 +302,10 @@ public final class CompoundName { return b.length()==0 ? "" : b.substring(0, b.length()-1); } + /** + * Creates a CompoundName from a string, possibly reusing from cache. + * Prefer over constructing on the fly. + **/ public static CompoundName from(String name) { CompoundName found = cache.get(name); if (found != null) return found; diff --git a/container-search/src/main/java/com/yahoo/prelude/searcher/JSONDebugSearcher.java b/container-search/src/main/java/com/yahoo/prelude/searcher/JSONDebugSearcher.java index 10b2cf0fdc7..409b502f086 100644 --- a/container-search/src/main/java/com/yahoo/prelude/searcher/JSONDebugSearcher.java +++ b/container-search/src/main/java/com/yahoo/prelude/searcher/JSONDebugSearcher.java @@ -25,7 +25,7 @@ public class JSONDebugSearcher extends Searcher { public static final String STRUCT_FIELD = "Structured data field (as json): "; public static final String FEATURE_FIELD = "Feature data field (as json): "; - private static CompoundName PROPERTYNAME = new CompoundName("dumpjson"); + private static final CompoundName PROPERTYNAME = new CompoundName("dumpjson"); @Override public Result search(Query query, Execution execution) { |