diff --git a/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantAccess.java b/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantAccess.java index cd5ec8f49..eeb5f5e0e 100644 --- a/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantAccess.java +++ b/j-lawyer-client/src/com/jdimension/jlawyer/client/assistant/AssistantAccess.java @@ -817,9 +817,9 @@ public Map> filterCapabilities(String reques } // Sort the list of AiCapabilities by name for each AssistantConfig - List capabilities = filtered.get(config); - if (capabilities != null) { - capabilities.sort(Comparator.comparing(AiCapability::getName)); + List sortedCapabilities = filtered.get(config); + if (sortedCapabilities != null) { + sortedCapabilities.sort(Comparator.comparing(AiCapability::getName)); } } }