summaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-08-05 12:04:41 +0200
committerJon Bratseth <bratseth@gmail.com>2020-08-05 12:04:41 +0200
commit3ef825fc121ab64c2ae643f4a86445e449dfef49 (patch)
tree9068636396146f5178a588e603425c953eb9ba42 /container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java
parent75b7675c38fddf27daf17bcb46fc575d8dc8049e (diff)
Remove incorrect provenance info
When we combine all resolutions of some value the provenance information carried by the value becomes ptoentially incorrect. Since we do this for efficiency and tracking provenance info is just helper functionality, we remove the provenance info in these cases.
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java')
-rw-r--r--container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java b/container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java
index 9eb50c0f72e..7c3307223c3 100644
--- a/container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java
+++ b/container-search/src/main/java/com/yahoo/search/query/profile/DimensionValues.java
@@ -21,7 +21,7 @@ public class DimensionValues implements Comparable<DimensionValues> {
public static final DimensionValues empty = new DimensionValues(new String[] {});
public static DimensionValues createFrom(String[] values) {
- if (values==null || values.length==0 || containsAllNulls(values)) return empty;
+ if (values == null || values.length == 0 || containsAllNulls(values)) return empty;
return new DimensionValues(values);
}
@@ -34,10 +34,10 @@ public class DimensionValues implements Comparable<DimensionValues> {
*/
private DimensionValues(String[] values) {
if (values == null) throw new NullPointerException("Dimension values cannot be null");
- this.values=Arrays.copyOf(values, values.length);
+ this.values = Arrays.copyOf(values, values.length);
}
- /** Returns true if this is has the same value every place it has a value as the givenValues. */
+ /** Returns true if this is has the same value every place it has a value as the given values. */
public boolean matches(DimensionValues givenValues) {
for (int i = 0; i < this.size() || i < givenValues.size() ; i++)
if ( ! matches(this.get(i), givenValues.get(i)))
@@ -73,7 +73,7 @@ public class DimensionValues implements Comparable<DimensionValues> {
/** Helper method which uses compareTo to return whether this is most specific */
public boolean isMoreSpecificThan(DimensionValues other) {
- return this.compareTo(other)<0;
+ return this.compareTo(other) < 0;
}
@Override