[jOOQ/jOOQ#11817] Java 8 fix
This commit is contained in:
parent
8cc5469e98
commit
efbd7866f3
@ -37,6 +37,7 @@
|
||||
*/
|
||||
package org.jooq;
|
||||
|
||||
import static org.jooq.Converters.notImplemented;
|
||||
import static org.jooq.Converters.nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
@ -340,8 +341,4 @@ public interface Converter<T, U> extends Serializable {
|
||||
) {
|
||||
return of(fromType, toType, notImplemented(), nullable(to));
|
||||
}
|
||||
|
||||
private static <T, U> Function<T, U> notImplemented() {
|
||||
return t -> { throw new DataTypeException("Conversion function not implemented"); };
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,7 @@ import static org.jooq.tools.Convert.convertArray;
|
||||
import java.io.Serializable;
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jooq.exception.DataTypeException;
|
||||
import org.jooq.impl.AbstractConverter;
|
||||
import org.jooq.impl.IdentityConverter;
|
||||
import org.jooq.impl.SQLDataType;
|
||||
@ -225,4 +226,8 @@ public class Converters<T, U> extends AbstractConverter<T, U> {
|
||||
? (Function<T, U> & Serializable) t -> t == null ? null
|
||||
: f.apply(t) : t -> t == null ? null : f.apply(t);
|
||||
}
|
||||
|
||||
static final <T, U> Function<T, U> notImplemented() {
|
||||
return t -> { throw new DataTypeException("Conversion function not implemented"); };
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user