diff options
6 files changed, 16 insertions, 24 deletions
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 f0a11626236..d571bf583d6 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 @@ -67,7 +67,7 @@ public final class CompoundName { this.name = name; this.lowerCasedName = toLowerCase(name); - if (compounds.size()==1 && compounds.get(0).isEmpty()) + if (compounds.size() == 1 && compounds.get(0).isEmpty()) this.compounds = ImmutableList.of(); else this.compounds = ImmutableList.copyOf(compounds); diff --git a/container-search/src/main/java/com/yahoo/prelude/query/Item.java b/container-search/src/main/java/com/yahoo/prelude/query/Item.java index 06fe07d3895..87b6de875c6 100644 --- a/container-search/src/main/java/com/yahoo/prelude/query/Item.java +++ b/container-search/src/main/java/com/yahoo/prelude/query/Item.java @@ -26,10 +26,7 @@ import java.util.Objects; */ public abstract class Item implements Cloneable { - /** - * The definitions in Item.ItemType must match the ones in - * searchlib/src/vespa/searchlib/parsequery/parse.h - */ + // These must match the types in searchlib/src/vespa/searchlib/parsequery/parse.h public enum ItemType { OR(0), AND(1), @@ -70,10 +67,7 @@ public abstract class Item implements Cloneable { } - /** - * The definitions in Item.ItemCreator must match the ones in - * searchlib/src/searchlib/parsequery/parse.h - */ + // These must match the definitions in searchlib/src/searchlib/parsequery/parse.h public enum ItemCreator { ORIG(0), @@ -266,11 +260,11 @@ public abstract class Item implements Cloneable { } /** - * Returns an integer that contains all feature flags for this item. This must be kept in sync with the flags - * defined in searchlib/parsequery/parse.h. + * Returns an integer that contains all feature flags for this item. * * @return the feature flags */ + // This must be kept in sync with the flags in searchlib/parsequery/parse.h. private byte getFlagsFeature() { byte FLAGS_NORANK = 0x01; byte FLAGS_SPECIALTOKEN = 0x02; @@ -419,7 +413,7 @@ public abstract class Item implements Cloneable { * the back-end to identify specific items for ranking purposes. * * @param label label for this item - **/ + */ public void setLabel(String label) { setHasUniqueID(true); this.label = label; diff --git a/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java b/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java index 353e92c723f..b7d8ce9fc77 100644 --- a/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java +++ b/container-search/src/main/java/com/yahoo/search/grouping/request/DocIdNsSpecificValue.java @@ -10,9 +10,7 @@ package com.yahoo.search.grouping.request; */ public class DocIdNsSpecificValue extends DocumentValue { - /** - * Constructs a new instance of this class. - */ + /** Constructs a new instance of this class. */ public DocIdNsSpecificValue() { this(null, null); } diff --git a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java index 115a2f6dbdc..3dac5648660 100644 --- a/container-search/src/main/java/com/yahoo/search/query/QueryTree.java +++ b/container-search/src/main/java/com/yahoo/search/query/QueryTree.java @@ -48,7 +48,7 @@ public class QueryTree extends CompositeItem { return getRoot().encode(buffer); } - //Lets not pollute toString() by adding "ROOT" + // Let's not pollute toString() by adding "ROOT" protected void appendHeadingString(StringBuilder sb) { } @@ -65,7 +65,7 @@ public class QueryTree extends CompositeItem { if (this.getItemCount() == 0) // initializing super.addItem(root); else - setItem(0,root); // replacing + setItem(0, root); // replacing } @Override @@ -88,7 +88,7 @@ public class QueryTree extends CompositeItem { @Override public void addItem(Item item) { - if (getItemCount()==0) + if (getItemCount() == 0) super.addItem(item); else throw new RuntimeException("Programming error: Cannot add multiple roots"); @@ -96,8 +96,8 @@ public class QueryTree extends CompositeItem { @Override public void addItem(int index, Item item) { - if (getItemCount()==0 && index==0) - super.addItem(index,item); + if (getItemCount() == 0 && index == 0) + super.addItem(index, item); else throw new RuntimeException("Programming error: Cannot add multiple roots, have '" + getRoot() + "'"); } diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/DoubleValue.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/DoubleValue.java index 6154b5ea76c..d8443cfd1ef 100644 --- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/DoubleValue.java +++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/evaluation/DoubleValue.java @@ -129,8 +129,8 @@ public final class DoubleValue extends DoubleCompatibleValue { /** Returns this or a mutable copy assigned the given value */ private DoubleValue mutable(double value) { - DoubleValue mutable=this.asMutable(); - mutable.value=value; + DoubleValue mutable = this.asMutable(); + mutable.value = value; return mutable; } @@ -147,7 +147,7 @@ public final class DoubleValue extends DoubleCompatibleValue { @Override public boolean equals(Object other) { - if (this==other) return true; + if (this == other) return true; if ( ! (other instanceof Value)) return false; if ( ! ((Value) other).hasDouble()) return false; return this.asDouble() == ((Value) other).asDouble(); diff --git a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java index 6f264903122..fc259867923 100644 --- a/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java +++ b/searchlib/src/main/java/com/yahoo/searchlib/rankingexpression/rule/TruthOperator.java @@ -21,7 +21,7 @@ public enum TruthOperator implements Serializable { private final String operatorString; TruthOperator(String operatorString) { - this.operatorString=operatorString; + this.operatorString = operatorString; } /** Perform the truth operation on the input */ |