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

FileBufferFunctions.testGetFileStoreAnnotationModel fails when ran from Eclipse

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

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

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

評価

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

調査の方向性

Start with FileBufferFunctions.java at the failing assertion and inspect the MANIFEST.MF used by the filebuffers tests, along with the extending test classes named in the issue. Run FileBuffersForFilesInLinkedFolders from Eclipse and compare its bundle availability with the test setup; the issue reports that adding org.eclipse.ui.editors to the manifest makes the test pass. Check the linked PDE issues before deciding whether that is the complete fix.

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

説明

bug

Run e.g. org.eclipse.core.filebuffers.tests.FileBuffersForFilesInLinkedFolders, observe:

org.opentest4j.AssertionFailedError: expected: not <null>
	at org.eclipse.core.filebuffers.tests.FileBufferFunctions.testGetFileStoreAnnotationModel(FileBufferFunctions.java:1297)
	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
	at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180)
	at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Streams.java:108)
	at java.base/java.util.Spliterator$OfInt.forEachRemaining(Spliterator.java:712)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)

There is this code:

	@Override
	protected Class<IAnnotationModel> getAnnotationModelClass() throws Exception {
		Bundle bundle= Platform.getBundle("org.eclipse.ui.editors");
		return bundle != null ? IAnnotationModel.class : null;
	}

In several of the extending test cases:

tests/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForFilesInLinkedFolders.java:                Bundle bundle= Platform.getBundle("org.eclipse.ui.editors");
tests/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForLinkedFiles.java:         Bundle bundle= Platform.getBundle("org.eclipse.ui.editors");
tests/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileBuffersForWorkspaceFiles.java:              Bundle bundle= Platform.getBundle("org.eclipse.ui.editors");
tests/org.eclipse.core.filebuffers.tests/src/org/eclipse/core/filebuffers/tests/FileStoreFileBuffersForWorkspaceFiles.java:             Bundle bundle= Platform.getBundle("org.eclipse.ui.editors");

But the bundle org.eclipse.ui.editor is not in the MANIFEST.MF. Adding it there does make the test pass.

Considering the following, no idea how to fix such problems:

Likely related to: https://github.com/eclipse-pde/eclipse.pde/issues/1999, https://github.com/eclipse-pde/eclipse.pde/issues/2082

主要言語
Java
スター
124
フォーク
269
平均マージ
2日 2時間
マージ済み PR(30日)
70

環境構築

はじめの一歩

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

eclipse-platform/eclipse.platform.ui のほかの issue

eclipse-platform/eclipse.platform.ui の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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