[jOOQ/jOOQ#8881] Deprecate internal Tools.filterOne() utility
This utility does not go through the ExecuteListener#exception() lifecycle and should thus be avoided. It is difficult to remove completely because of DML RETURNING clauses, which need quite some refactoring for the lifecycle to work correctly.
This commit is contained in:
parent
45d22cfbed
commit
6209cec91b
@ -1995,13 +1995,17 @@ final class Tools {
|
||||
|
||||
/**
|
||||
* Get the only element from a list or <code>null</code>, or throw an
|
||||
* exception
|
||||
* exception.
|
||||
*
|
||||
* @param list The list
|
||||
* @return The only element from the list or <code>null</code>
|
||||
* @throws TooManyRowsException Thrown if the list contains more than one
|
||||
* element
|
||||
* @deprecated - [#8881] - Do not reuse this method as it doesn't properly
|
||||
* manage the {@link ExecuteListener#exception(ExecuteContext)}
|
||||
* lifecycle event. Use {@link #fetchOne(Cursor)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
static final <R extends Record> R filterOne(List<R> list) throws TooManyRowsException {
|
||||
int size = list.size();
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user