assertj / assertj/assertj-generator
Running assertj generator on JDK 11
- Lingua principale
- Java
- Stelle
- 72
- Fork
- 47
- Merge medio
- 1g 16h
- PR unite (30g)
- 2
Descrizione
I am trying to build a library with OpenJDK 11 with the maven-assertj-generator plugin enabled. However, the plugin succeeds, but generates non-compiling code.
Has anyone had any succes on running the assertj-generator with OpenJDK 11?
Generated code:
```
/**
* Verifies that the actual Melding's referenties contains the given interface Referentie elements.
* @param referenties the given elements that should be contained in actual Melding's referenties.
* @return this assertion object.
* @throws AssertionError if the actual Melding's referenties does not contain all given interface Referentie elements.
*/
public MeldingAssert hasReferenties(interface Referentie... referenties) {
// check that actual Melding we want to make assertions on is not null.
isNotNull();
// check that given interface Referentie varargs is not null.
if (referenties == null) failWithMessage("Expecting referenties 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.getReferenties(), referenties);
// return the current assertion for method chaining
return this;
}
```
Wrong line:
`public MeldingAssert hasReferenties(interface Referentie... referenties) {`
Expected line:
`public MeldingAssert hasReferenties(Referentie... referenties) {`
To solve the issue, I tried building the assertj-assertions-generator on OpenJDK 11, but I also ran into all kinds of trouble.
* Tried to build a latest version of com.google.testing.compile:compile-testing
* Tried to upgrade Guava
* Needed to upgrade to JDK 8 source code
* Ran into troubles running JUnit Theories
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia riproducendo l’esecuzione di maven-assertj-generator su OpenJDK 11, usando il metodo generato MeldingAssert.hasReferenties come punto di ingresso che fallisce. Esamina i vincoli di build di generator, compile-testing e Guava menzionati nel report, quindi esegui le JUnit Theories pertinenti; il lavoro è concluso quando il metodo generato viene compilato senza il token di interfaccia non valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- build-system, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100