Replies: 7 comments
-
I assume the jdk-jdk is OpenJDK. In that code base, the definition(s) should be found in Namely these: 2685 public static <T> List<T> synchronizedList(List<T> list) {
2686 return (list instanceof RandomAccess ?
2687 new SynchronizedRandomAccessList<>(list) :
2688 new SynchronizedList<>(list));
2689 }
2690
2691 // used by java.util.Vector
2692 static <T> List<T> synchronizedList(List<T> list, Object mutex) {
2693 return (list instanceof RandomAccess ?
2694 new SynchronizedRandomAccessList<>(list, mutex) :
2695 new SynchronizedList<>(list, mutex));
2696 } |
Beta Was this translation helpful? Give feedback.
-
@vladak Yes. definition is present there. |
Beta Was this translation helpful? Give feedback.
-
@vladak This issue is only with generic java syntax like below. Other methods or functions we are able to search in the same class named Collections. |
Beta Was this translation helpful? Give feedback.
-
Anyhow, looking at the OpenJDK, the definition is not displayed in the Navigate window so it seems that Universal ctags was not able to detect the definitions, perhaps a problem with generics. |
Beta Was this translation helpful? Give feedback.
-
Yes. My suspicion is also the same. It looks like universal Ctags is not able to parse the new generics java syntax definition. Because signature is generic so Its not able to parse and detect it. |
Beta Was this translation helpful? Give feedback.
-
Yes @vladak . You are right. Normal method its searching like you mentioned this Collections.binarySearch. Its working file since its normal method signature. This method is not having java generic syntax. |
Beta Was this translation helpful? Give feedback.
-
This should be turned into minimal code snippet and submitted as a bug to Universal ctags then. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
As an example, I want to see the source for Collections.synchronizedList using Definition Search box.
Entering Collections.synchronizedList into the Definition field yields no results, yet the Collections class has a synchronizedList method (presently on line 2685).
Also, typing the fully qualified name, java.util.Collections does not find the Collections class - it yields no search results.
Tools version used to set up opengrok.
Opengrok - 1.13.22
Tomcat - 10.1.28
Ctags - uctags-2024.01.18-linux-x86_64
OS - Oracle Linux Server 7.6
OS Kernel: Linux 4.14.35-1844.2.5.el7uek.x86_64
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should show search result with Collections.synchronizedList
Screenshots
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions