You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by jt...@apache.org on 2020/11/25 10:07:11 UTC

[netbeans] branch master updated: Fixing java/java.lsp.server tests.

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

jtulach pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new a3101eb  Fixing java/java.lsp.server tests.
     new 887f6b6  Merge pull request #2554 from jlahoda/fix-java.lsp.server-tests
a3101eb is described below

commit a3101ebbb48e7d73c2131a4548a1134bfcbf0d2d
Author: Jan Lahoda <jl...@netbeans.org>
AuthorDate: Sun Nov 22 13:20:22 2020 +0100

    Fixing java/java.lsp.server tests.
---
 .../modules/java/lsp/server/protocol/WorkspaceServiceImpl.java      | 1 +
 .../org/netbeans/modules/java/lsp/server/protocol/ServerTest.java   | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
index 8e6d849..9df7e44 100644
--- a/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
+++ b/java/java.lsp.server/src/org/netbeans/modules/java/lsp/server/protocol/WorkspaceServiceImpl.java
@@ -201,6 +201,7 @@ public final class WorkspaceServiceImpl implements WorkspaceService, LanguageCli
                     }
                 };
                 JavaSymbolProvider.doComputeSymbols(getSearchType(queryFin, exactFin, false, null, null), queryFin, handler, true, cancel);
+                Collections.sort(symbols, (i1, i2) -> i1.getName().compareToIgnoreCase(i2.getName()));
                 result.complete(symbols);
             } catch (Throwable t) {
                 result.completeExceptionally(t);
diff --git a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/protocol/ServerTest.java b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/protocol/ServerTest.java
index fda5f3f..5496e83 100644
--- a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/protocol/ServerTest.java
+++ b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/protocol/ServerTest.java
@@ -1260,10 +1260,10 @@ public class ServerTest extends NbTestCase {
         List<? extends SymbolInformation> symbols = server.getWorkspaceService().symbol(new WorkspaceSymbolParams("Tes")).get();
         List<String> actual = symbols.stream().map(si -> si.getKind() + ":" + si.getName() + ":" + si.getContainerName() + ":" + si.getDeprecated() + ":" + toString(si.getLocation())).collect(Collectors.toList());
         assertEquals(Arrays.asList("Class:Test:Test:false:Test.java:0:0-3:1",
-                                   "Constructor:():Test:false:Test.java:0:7-0:7",
-                                   "Method:():Test:false:Test.java:2:4-2:38",
+                                   "Constructor:Test():Test:false:Test.java:0:7-0:7",
+                                   "Method:testMethod():Test:false:Test.java:2:4-2:38",
                                    "Class:TestNested:Test.TestNested:false:Test.java:1:4-1:37",
-                                   "Constructor:():Test.TestNested:false:Test.java:1:18-1:18"),
+                                   "Constructor:TestNested():Test.TestNested:false:Test.java:1:18-1:18"),
                      actual);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists