netbeans icon indicating copy to clipboard operation
netbeans copied to clipboard

Navigate to source does not work for annotation with default value of type Class

Open hlavki opened this issue 2 years ago • 4 comments

Apache NetBeans version

Apache NetBeans latest daily build

What happened

When I have code e.g.:


@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
public @interface RunWith {

    Class<?> value();
}

@RunWith(String.class)
public class Runner {}

Pressing key Ctrl and click mouse on String.class, netbeans opens source of RunWith.java instead of String.java. Also JavaDoc shows RunWith.java.

How to reproduce

See the description above.

Did this work correctly in an earlier version?

No

Operating System

Linux 5.17.9-1-default, openSUSE Tumbleweed, x86_64

JDK

18.0.1

Apache NetBeans packaging

Own source build

Anything else

No response

Are you willing to submit a pull request?

Yes

Code of Conduct

Yes

hlavki avatar Jun 02 '22 07:06 hlavki