assertj / assertj/assertj-generator
...internal.Iterables is used in Asserts generated by assertj-assertions-generator (java9)
- 主要言語
- Java
- スター
- 72
- フォーク
- 47
- 平均マージ
- 1日 16時間
- マージ済み PR(30日)
- 2
説明
#### Summary
Hi,
I am migrating from java 8 to 17 and had big trouble getting the generated assertions to work (actually is does not work at all, is it dead?)
But even with great hacks I cannot get arround that the generated code imports the internal class `org.assertj.core.internal.Iterables` which is (of course) not exported by assertj-core. Could this become public? Or could the code-generator be updated? Which btw has medium CVEs in it's dependencies.
#### Example
```java
import org.assertj.core.internal.Iterables;
//this is part of the generated code
public YAssert hasXs(X... xs) {
// check that actual Y we want to make assertions on is not null.
isNotNull();
// check that given X varargs is not null.
if (x== null) failWithMessage("Expecting x parameter not to be null.");
// check with standard error message, to set another message call: info.overridingErrorMessage("my error message");
Iterables.instance().assertContains(info, actual.getX(), xs);
// return the current assertion for method chaining
return this;
}
```
Package 'org.assertj.core.internal' is declared in module 'org.assertj.core', which does not export it to module 'my.assertions'
In other words: Is does not compile in Java > 8 which renders the complete code generation useless.
コントリビューションガイド
調査の方向性
まず、org.assertj.core.internal.Iterables のインポートを生成する assertion 生成パスを調査し、次に Java 9+ のモジュールプロジェクトで生成コードのコンパイル失敗を再現します。生成された assertion がエクスポートされていない内部クラスに依存せず、Java 9 以降で正常にコンパイルできれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100