Converter implementation is not refreshed in IDEA
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- java
- Ambito
- developer-experience, tooling
Direzione di ricerca
Usa l'esempio mapstruct-lombok e il relativo Source, Target e test come riproduzione; esamina prima build.gradle e la configurazione del processore di annotazioni di IDEA. Riproduci i casi di campo aggiunto e campo rimosso, quindi verifica che il convertitore generato rifletta le modifiche e che il test non segnali più null o NoSuchMethodError.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Using https://github.com/mapstruct/mapstruct-examples/tree/master/mapstruct-lombok as a reference, I tried to add a field to both Source and Target and then modified the test to cover the new field.
@Test
public void testMapping() {
Source s = new Source();
s.setTest( "5" );
s.setField( "5" );
Target t = Mappers.getMapper(SourceTargetMapper.class).toTarget( s );
assertEquals( 5, (long) t.getTesting() );
assertEquals( "5", t.getField() );
}
However this leads to the test to fail, being t.getField() still null.
Another relevant change I did (which I am not sure about) is to add mapstruct-processor to the compile configuration in build.gradle, ie: compile "org.mapstruct:mapstruct-jdk8:${mapstructVersion}", "org.mapstruct:mapstruct-processor:${mapstructVersion}", "org.projectlombok:lombok:${lombokVersion}" as per http://mapstruct.org/documentation/ide-support/
Also removing a field from both objects leads to an error, this time a java.lang.NoSuchMethodError.
Versions used:
- IDEA 2017.2.5 (with annotation processor manually enabled, no other customization)
- lombok 1.16.18 (instead of 1.16.14)
- Lingua principale
- Java
- Stelle
- 168
- Fork
- 41
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di mapstruct/mapstruct-idea
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
mapstruct/mapstruct-idea#274 · 2 commenti ·
-
feature hack.commit.push
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
mapstruct/mapstruct-idea#267 ·
-
feature hack.commit.push
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
mapstruct/mapstruct-idea#266 ·
-
feature hack.commit.push
Difficoltà 3/5 1-2 giorni Idoneità per principianti 75/100
mapstruct/mapstruct-idea#265 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
mapstruct/mapstruct-idea#257 · 1 commento ·
Tutte le issue di mapstruct/mapstruct-idea
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cryptomator/hub#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·