Hacker News new | past | comments | ask | show | jobs | submit login

Yes, when you’re putting a class with exceptions inside a generic container that doesn’t allow for exceptions, it gets ugly.

The solution in that blog post is clever, they should consider adding that to Java.

Although, as the author touches on but doesn’t explicitly call out, this problem can be avoided in current Java simply by adding (generic) exceptions to your generic classes. Unfortunately that hasn’t been done for any of the standard library classes, old or new.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact