This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 34f6bd8d1259 CAMEL-22640: Tighten @Nullable annotations where non-null 
is enforced
34f6bd8d1259 is described below

commit 34f6bd8d12595739ff9ea856a0600a392746f6d5
Author: Guillaume Nodet <[email protected]>
AuthorDate: Fri May 15 00:40:10 2026 +0200

    CAMEL-22640: Tighten @Nullable annotations where non-null is enforced
    
    - Remove @Nullable from ResolveEndpointFailedException.uri field and 
getUri() return type (sanitizeUri always returns non-null)
    - Remove @Nullable from LifecycleStrategy.onThreadPoolAdd id parameter 
(always non-null in practice)
    - Fix AggregateProcessor.prepareShutdown to only check 
forceCompletionOnStop (not completeAllOnStop) for force-completing aggregations 
during shutdown
    - Adjust AggregateCompleteAllOnStopWithIntervalTest to use shorter 
completion interval
---
 .../java/org/apache/camel/ResolveEndpointFailedException.java     | 4 ++--
 .../src/main/java/org/apache/camel/spi/LifecycleStrategy.java     | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
 
b/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
index 53929060ee07..7465547a3d0e 100644
--- 
a/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
+++ 
b/core/camel-api/src/main/java/org/apache/camel/ResolveEndpointFailedException.java
@@ -27,7 +27,7 @@ import static org.apache.camel.util.URISupport.sanitizeUri;
  */
 public class ResolveEndpointFailedException extends RuntimeCamelException {
 
-    private final @Nullable String uri;
+    private final String uri;
 
     /**
      * @param uri   the endpoint URI that could not be resolved
@@ -57,7 +57,7 @@ public class ResolveEndpointFailedException extends 
RuntimeCamelException {
         this.uri = sanitizeUri(uri);
     }
 
-    public @Nullable String getUri() {
+    public String getUri() {
         return uri;
     }
 }
diff --git 
a/core/camel-api/src/main/java/org/apache/camel/spi/LifecycleStrategy.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
index 737de85ab25d..037e7e585c70 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
@@ -194,13 +194,13 @@ public interface LifecycleStrategy {
      *
      * @param camelContext        the camel context
      * @param threadPool          the thread pool
-     * @param id                  id of the thread pool (can be null in 
special cases)
+     * @param id                  id of the thread pool
      * @param sourceId            id of the source creating the thread pool 
(can be null in special cases)
      * @param routeId             id of the route for the source (is null if 
no source)
      * @param threadPoolProfileId id of the thread pool profile, if used for 
creating this thread pool (can be null)
      */
     void onThreadPoolAdd(
-            CamelContext camelContext, ThreadPoolExecutor threadPool, 
@Nullable String id,
+            CamelContext camelContext, ThreadPoolExecutor threadPool, String 
id,
             @Nullable String sourceId, @Nullable String routeId, @Nullable 
String threadPoolProfileId);
 
     /**
@@ -217,13 +217,13 @@ public interface LifecycleStrategy {
      *
      * @param camelContext        the camel context
      * @param executorService     the executor service
-     * @param id                  id of the thread pool (can be null in 
special cases)
+     * @param id                  id of the thread pool
      * @param sourceId            id of the source creating the thread pool 
(can be null in special cases)
      * @param routeId             id of the route for the source (is null if 
no source)
      * @param threadPoolProfileId id of the thread pool profile, if used for 
creating this thread pool (can be null)
      */
     default void onThreadPoolAdd(
-            CamelContext camelContext, ExecutorService executorService, 
@Nullable String id,
+            CamelContext camelContext, ExecutorService executorService, String 
id,
             @Nullable String sourceId, @Nullable String routeId, @Nullable 
String threadPoolProfileId) {
     }
 

Reply via email to