Skip to content

Commit

Permalink
Wip checker
Browse files Browse the repository at this point in the history
  • Loading branch information
vlsi committed May 28, 2020
1 parent f852b2a commit 4ea00da
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/java/org/apache/calcite/plan/RelTraitSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;
import javax.annotation.CheckReturnValue;

/**
* RelTraitSet represents an ordered set of {@link RelTrait}s.
Expand Down Expand Up @@ -159,6 +160,7 @@ public <T extends RelMultipleTrait> List<T> getTraits(
* @param trait the new RelTrait
* @return the old RelTrait at the index
*/
@CheckReturnValue
public RelTraitSet replace(int index, RelTrait trait) {
assert traits[index].getTraitDef() == trait.getTraitDef()
: "RelTrait has different RelTraitDef than replacement";
Expand All @@ -182,6 +184,7 @@ public RelTraitSet replace(int index, RelTrait trait) {
* @return New set
* @see #plus(RelTrait)
*/
@CheckReturnValue
public RelTraitSet replace(
RelTrait trait) {
// Quick check for common case
Expand Down

0 comments on commit 4ea00da

Please sign in to comment.