You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are various places throughout the jOOQ API, where the <R> type cannot be accessed because Row and Record are not generic.
In other places, the resulting API is subtly wrong, as can be seen in Record.map(RecordMapper<Record, E>) (#2465). Without any recursive type definition on Record itself, there is no way to solve this through the Record type hierarchy using covariance or contravariance.
Alternatively, if we embrace using Java 8's Optional<R> as a result, we could leverage Optional.map(), which doesn't have this restriction...
There have been very few cases where this would have been useful, but many cases, where it would have been a pain, especially for users. In addition to being a backwards incompatible change with tons of compiler regressions in user code due to the new generics semantics and the hard to capture recursive type variable, let's just reject this.
There are various places throughout the jOOQ API, where the
<R>
type cannot be accessed becauseRow
andRecord
are not generic.In other places, the resulting API is subtly wrong, as can be seen in
Record.map(RecordMapper<Record, E>)
(#2465). Without any recursive type definition onRecord
itself, there is no way to solve this through theRecord
type hierarchy using covariance or contravariance.Alternatively, if we embrace using Java 8's
Optional<R>
as a result, we could leverageOptional.map()
, which doesn't have this restriction...See also:
The text was updated successfully, but these errors were encountered: