DEV Community

loading...

Discussion on: Refactoring the Worst Code I’ve Ever Written

Collapse
simonhaisz profile image
simonhaisz • Edited

"Hold my <E extends Beer>"

public abstract class EntityManager <E extends Entity,F extends EntityMetaData,G extends EntityMetaDataCollection<F>,H extends EntityWebService> {

  protected abstract EntityDialog<E,F,G,H,EntityManager<E,F,G,H>> createEntityDialog(F entityMetaData);

}

I once thought the above was good code and was proud of how I had ensured type-safety 😭

Thread Thread
markbojesen profile image
Mark Bojesen

As a Java dev, this is just amazing! 😂

Forem Open with the Forem app