From 1d329bf6aacda4b7954480fa78d9af036dc874a7 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Thu, 19 Mar 2020 20:31:18 +0100 Subject: [PATCH] [jOOQ/jOOQ#9975] Use a more generics friendly super type for casts SelectImpl has 23 type variables, so a rawtype reference seems unavoidable. But we don't need to use SelectImpl here. The super type AbstractDelegatingQuery with a single type variable can be used just the same. --- .../src/main/java/org/jooq/impl/SelectQueryImpl.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java index 10b8a87b56..1884c8c3d7 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java +++ b/jOOQ/src/main/java/org/jooq/impl/SelectQueryImpl.java @@ -1918,9 +1918,9 @@ final class SelectQueryImpl extends AbstractResultQuery imp if (s2 instanceof SelectQueryImpl && ((SelectQueryImpl) s2).unionOp.size() > 0) return true; - else if (s2 instanceof SelectImpl - && ((SelectImpl) s2).getDelegate() instanceof SelectQueryImpl - && ((SelectQueryImpl) ((SelectImpl) s2).getDelegate()).unionOp.size() > 0) + else if (s2 instanceof AbstractDelegatingQuery + && ((AbstractDelegatingQuery) s2).getDelegate() instanceof SelectQueryImpl + && ((SelectQueryImpl) ((AbstractDelegatingQuery) s2).getDelegate()).unionOp.size() > 0) return true; return false; @@ -1942,9 +1942,9 @@ final class SelectQueryImpl extends AbstractResultQuery imp if (s2 instanceof SelectQueryImpl && unionParensRequired((SelectQueryImpl) s2)) return true; - else if (s2 instanceof SelectImpl - && ((SelectImpl) s2).getDelegate() instanceof SelectQueryImpl - && unionParensRequired((SelectQueryImpl) ((SelectImpl) s2).getDelegate())) + else if (s2 instanceof AbstractDelegatingQuery + && ((AbstractDelegatingQuery) s2).getDelegate() instanceof SelectQueryImpl + && unionParensRequired((SelectQueryImpl) ((AbstractDelegatingQuery) s2).getDelegate())) return true; return false;