From d7b57bd296f74fd12c2269c83e47bbc597aa475f Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 20 Nov 2019 21:27:18 +0100 Subject: [PATCH] [jOOQ/jOOQ#8528] Inconsistent exception thrown --- .../src/main/java/org/jooq/impl/DDLInterpreter.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java b/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java index fae01c54de..2a57c18e86 100644 --- a/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java +++ b/jOOQ/src/main/java/org/jooq/impl/DDLInterpreter.java @@ -222,7 +222,7 @@ final class DDLInterpreter { return; } else - throw new UnsupportedOperationException(query.getSQL()); + throw unsupportedQuery(query); } private final void accept0(DropSchemaImpl query) { @@ -1433,14 +1433,15 @@ final class DDLInterpreter { } private final class InterpretedSequence extends SequenceImpl { + @SuppressWarnings("unchecked") InterpretedSequence(Schema schema) { super(MutableSequence.this.name, schema, BIGINT, false, - startWith != null ? startWith.coerce(Long.class) : null, - incrementBy != null ? incrementBy.coerce(Long.class) : null, - minValue != null ? minValue.coerce(Long.class) : null, - maxValue != null ? maxValue.coerce(Long.class) : null, + (Field) startWith, + (Field) incrementBy, + (Field) minValue, + (Field) maxValue, cycle, - cache != null ? cache.coerce(Long.class) : null); + (Field) cache); } } }