You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by vi...@apache.org on 2022/03/12 07:35:59 UTC
[netbeans] branch master updated: #3761 HyperlinkProviderImpl readLock for TokenHierarchy.get
This is an automated email from the ASF dual-hosted git repository.
vieiro 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 6e777e9 #3761 HyperlinkProviderImpl readLock for TokenHierarchy.get
new fbee1a2 Merge pull request #3766 from vieiro/hotfix/nb3761
6e777e9 is described below
commit 6e777e9264973a27a0ffcc61b3ce753f78dcc163
Author: Antonio Vieiro <vi...@apache.org>
AuthorDate: Fri Mar 11 18:56:40 2022 +0100
#3761 HyperlinkProviderImpl readLock for TokenHierarchy.get
---
.../netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java
index f654c3e..9e0c993 100644
--- a/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java
+++ b/ide/lsp.client/src/org/netbeans/modules/lsp/client/bindings/HyperlinkProviderImpl.java
@@ -69,9 +69,11 @@ public class HyperlinkProviderImpl implements HyperlinkProviderExt {
return null;
}
+ BaseDocument document = (BaseDocument) doc;
+ document.readLock();
try {
//XXX: not really using the server, are we?
- int[] ident = Utilities.getIdentifierBlock((BaseDocument) doc, offset);
+ int[] ident = Utilities.getIdentifierBlock(document, offset);
if (ident == null) {
return null;
}
@@ -86,6 +88,8 @@ public class HyperlinkProviderImpl implements HyperlinkProviderExt {
return ident;
} catch (BadLocationException ex) {
return null;
+ } finally {
+ document.readUnlock();
}
}
---------------------------------------------------------------------
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