You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/01/09 12:26:10 UTC
(camel) branch main updated: CAMEL-20231: use an unmodifiable list instead of copying the old one
This is an automated email from the ASF dual-hosted git repository.
orpiske 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 1634af20645 CAMEL-20231: use an unmodifiable list instead of copying the old one
1634af20645 is described below
commit 1634af20645e13313e1e85c948ef34bb7655537f
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Mon Jan 8 12:50:19 2024 +0100
CAMEL-20231: use an unmodifiable list instead of copying the old one
---
.../java/org/apache/camel/impl/engine/DefaultRouteStartupOrder.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteStartupOrder.java b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteStartupOrder.java
index f027ccf8a55..5b7ee3af9a3 100644
--- a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteStartupOrder.java
+++ b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultRouteStartupOrder.java
@@ -16,7 +16,7 @@
*/
package org.apache.camel.impl.engine;
-import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.apache.camel.Consumer;
@@ -57,7 +57,7 @@ public class DefaultRouteStartupOrder implements RouteStartupOrder {
@Override
public List<Service> getServices() {
List<Service> services = routeService.getRoute().getServices();
- return new ArrayList<>(services);
+ return Collections.unmodifiableList(services);
}
public RouteService getRouteService() {