Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Go to Implementation on interface method does not work for inherited implementations

オープン
#9,455 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java
領域
devtools

調査の方向性

Java Editor で B::a と B::b を使ったサンプルを再現することから始め、次に Go to Implementation コマンドと editor-gutter の実装インジケーターを調べます。インターフェースコンテキストを介して継承された実装が見つかり、両方のメソッドに対応するバッジが表示されれば作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

Java kind:bug needs:triage
Apache NetBeans version

Apache NetBeans 30

What happened

Go to Implementation (Ctrl+Alt+B, or context menu > Navigate > Go to Implementation) does not work on interface methods whose implementations are inherited from classes that themselves aren't declared to implement the interface (but subclasses are). The "Ⓘ" badges in the editor gutter are correspondingly missing.

This makes it more difficult to locate method implementations from a call site that invokes the method from the interface type, and it makes it misleadingly look like there are no implementations of the method.

Language / Project Type / NetBeans Component

Java, Editor

How to reproduce
class Example
{
    interface A
    {
        CharSequence a();
    }
    
    interface B extends A
    {
        @Override
        String a();

        String b();

        String c();
    }
    
    static class AImpl implements A
    {
        @Override
        public String a() { return "a"; }

        public String b() { return "b"; }
    }
    
    static class BImpl extends AImpl implements B
    {
        public String c() { return "c"; }
    }
}

On B::a anb B::b, Go to Implementation (Ctrl+Alt+B, or context menu > Navigate > Go to Implementation) does not work, although these methods are implemented by AImpl (in the context of BImpl).

In addition, no "Ⓘ" badge is shown on B::b, although interface B is fully implemented by BImpl.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

JDK 21

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

主要言語
Java
スター
3.1k
フォーク
939
平均マージ
5日 3時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/netbeans のほかの issue

apache/netbeans の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。