From c9cc7b1723950b7ae86344c3fb999a1395e6b4f1 Mon Sep 17 00:00:00 2001 From: Matteo Maiero Date: Thu, 21 Nov 2024 08:18:44 +0100 Subject: [PATCH] fix: Improved ordering of services list (#5573) Signed-off-by: MMaiero (cherry picked from commit b94bb84cc7c948c7bcffd98f4aef91e78f57b1bf) --- .../java/org/eclipse/kura/web/client/ui/EntryClassUi.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/EntryClassUi.java b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/EntryClassUi.java index 8bf0833d554..f1dab6198d7 100644 --- a/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/EntryClassUi.java +++ b/kura/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/EntryClassUi.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2011, 2022 Eurotech and/or its affiliates and others + * Copyright (c) 2011, 2024 Eurotech and/or its affiliates and others * * This program and the accompanying materials are made * available under the terms of the Eclipse Public License 2.0 @@ -686,8 +686,8 @@ private void filterByServiceName(String tmpServiceName) { private void sortConfigurationsByName(List configs) { Collections.sort(configs, (arg0, arg1) -> { String name0; - String pid0 = arg0.getComponentId(); - String pid1 = arg1.getComponentId(); + String pid0 = arg0.getComponentId().toLowerCase(); + String pid1 = arg1.getComponentId().toLowerCase(); int start = pid0.lastIndexOf('.'); int substringIndex = start + 1; if (start != -1 && substringIndex < pid0.length()) { @@ -704,6 +704,7 @@ private void sortConfigurationsByName(List configs) { } else { name1 = pid1; } + return name0.compareTo(name1); }); }