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

Code completion does not offer overriding toString() when a super interface has declared it

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

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

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

評価

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

調査の方向性

Java のコード補完のエントリポイントから開始し、Interface と Impl を使った例を再現してから、スーパーインターフェースの宣言がある場合とない場合で補完を比較します。最初のケースで Object::toString() のオーバーライドが省略される理由を追跡します。完了条件は、比較ケースで既存の動作を維持しつつ、補完リストが Impl に対して toString() を提示することです。

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

説明

Java kind:bug needs:triage
Apache NetBeans version

Apache NetBeans 30

What happened

Within a Java class that implements an interface which declares the standard toString() method (like for example the java.lang.CharSequence interface does), code completion does not offer overriding Object::toString().

Language / Project Type / NetBeans Component

Java, Code completion

How to reproduce
class Example
{
    interface Interface { public String toString(); }    
    static class Impl implements Interface {  }
}

Within the Impl class, invoke code completion => overriding toString() is not offered.

Remove either toString() in Interface, or remove implements Interface from Impl => overriding toString() is now offered.

Did this work correctly in an earlier version?

No / Don't know

Operating System

Windows

JDK

17

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

No

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

環境構築

はじめの一歩

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

apache/netbeans のほかの issue

apache/netbeans の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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