Yeah, I checked and it all seems to work fine. So a declaration:
class Gen2</*@Nullable*/ E> {
public void add(E e) { }
}
means that the type parameter must be annotated with @Nullable, while:
class Gen1<E extends /*@Nullable*/ Object> {
public void add(E e) { }
}
means that the type parameter can be annotated both with @NotNull and @Nullable.
So it works how a user would expect it to (at least when the user is me :) ).
I wonder if this also fixed Piotr's problems? He seemed to have to most complicated use-cases.
Anyway, thanks for the fixes :).
Adam