eclipse-vertx / eclipse-vertx/vertx-codegen
Generated file has errors when there are two classes with same name in different packages
- Lingua principale
- Java
- Stelle
- 111
- Fork
- 89
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Hi!
My EB service looks like this:
```java
@Fluent
MyService getTickets1(JsonObject whatever, Handler>> e);
@Fluent
MyService getTickets2(JsonObject whatever, Handler>> e);
```
notice that handlers accept lists of `Ticket`s from two different packages (`package1` which is imported (`import package1.Ticket;`) and `package2`).
When I try to build my project, generated file (`MyServiceVertxEBProxy`) have two ambiguous imports:
```java
import package1.Ticket;
import package2.Ticket;
```
And of course Java cannot distinguish which `Ticket` to use and throws compile time error on the second import "_a type with the same simple name is already defined by the single-type-import of package1.Ticket_"
Of course, this is simplified example. I'm using `vertx-codegen` version `3.5.0`.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Riproduci il problema con i due metodi di MyService e ispeziona il MyServiceVertxEBProxy generato, concentrandoti sui suoi imports per package1.Ticket e package2.Ticket. Il lavoro è completato quando il Java generato compila senza l'errore di import ambiguo, preservando i distinti tipi Ticket.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100