From 4ea00da290260c0d3cf39617e01e9fe751e88ce4 Mon Sep 17 00:00:00 2001 From: Vladimir Sitnikov Date: Thu, 28 May 2020 19:04:40 +0300 Subject: [PATCH] Wip checker --- core/src/main/java/org/apache/calcite/plan/RelTraitSet.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java b/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java index 09fb10a3f371..589c10367b9d 100644 --- a/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java +++ b/core/src/main/java/org/apache/calcite/plan/RelTraitSet.java @@ -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. @@ -159,6 +160,7 @@ public List 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"; @@ -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