Skip to content

Commit 4ea00da

Browse files
committed
Wip checker
1 parent f852b2a commit 4ea00da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/src/main/java/org/apache/calcite/plan/RelTraitSet.java

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.util.List;
3232
import java.util.Map;
3333
import java.util.function.Supplier;
34+
import javax.annotation.CheckReturnValue;
3435

3536
/**
3637
* RelTraitSet represents an ordered set of {@link RelTrait}s.
@@ -159,6 +160,7 @@ public <T extends RelMultipleTrait> List<T> getTraits(
159160
* @param trait the new RelTrait
160161
* @return the old RelTrait at the index
161162
*/
163+
@CheckReturnValue
162164
public RelTraitSet replace(int index, RelTrait trait) {
163165
assert traits[index].getTraitDef() == trait.getTraitDef()
164166
: "RelTrait has different RelTraitDef than replacement";
@@ -182,6 +184,7 @@ public RelTraitSet replace(int index, RelTrait trait) {
182184
* @return New set
183185
* @see #plus(RelTrait)
184186
*/
187+
@CheckReturnValue
185188
public RelTraitSet replace(
186189
RelTrait trait) {
187190
// Quick check for common case

0 commit comments

Comments
 (0)