gnodet-bot commented on code in PR #28646: URL: https://github.com/apache/camel/pull/28646#discussion_r4409926062
########## core/camel-core/src/test/java/org/apache/camel/support/StepHelperTest.java: ########## @@ -0,0 +1,564 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.support; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.camel.AsyncCallback; +import org.apache.camel.ContextTestSupport; +import org.apache.camel.Exchange; +import org.apache.camel.spi.StepHook; +import org.apache.camel.util.TimeSource; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Isolated; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.EnumSource; +import org.junit.jupiter.params.provider.ValueSource; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertSame; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * The callback contract of {@link StepHelper#process(Exchange, String, org.apache.camel.AsyncProcessor, AsyncCallback)} Review Comment: ⚠️ **Wrong `@link` signature:** The Javadoc references `StepHelper#process(Exchange, String, AsyncProcessor, AsyncCallback)` (4 params), but the actual signature is `process(StepHook hook, Exchange exchange, String nodeId, AsyncProcessor processor, AsyncCallback callback)` (5 params — `StepHook` is the first argument). ```suggestion * The callback contract of {@link StepHelper#process(org.apache.camel.spi.StepHook, Exchange, String, org.apache.camel.AsyncProcessor, AsyncCallback)} ``` ########## core/camel-core-processor/src/main/java/org/apache/camel/processor/errorhandler/RedeliveryErrorHandler.java: ########## @@ -218,6 +221,26 @@ public void changeOutput(Processor output) { this.outputAsync = AsyncProcessorConverterHelper.convert(output); } + @Override + public boolean useStepHook(String nodeId) { Review Comment: ⚠️ **Missing `@Nullable`:** The interface default declares `useStepHook(@Nullable String nodeId)` but this override drops the annotation, breaking consistency with the contract (and with the `@param nodeId … or {@code null}` Javadoc). ```suggestion public boolean useStepHook(@Nullable String nodeId) { ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
