From c1eb52f4f69ea9320f67f5f7fc4df1b21467d481 Mon Sep 17 00:00:00 2001 From: James Ahlborn Date: Mon, 26 Jun 2017 00:28:32 +0000 Subject: handle missing table name for join expression git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@1105 f203690c-595d-4dc9-a70b-905162fa7fd2 --- .../com/healthmarketscience/jackcess/impl/query/QueryImpl.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java b/src/main/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java index a9fd5e6..151fd30 100644 --- a/src/main/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java +++ b/src/main/java/com/healthmarketscience/jackcess/impl/query/QueryImpl.java @@ -267,7 +267,7 @@ public abstract class QueryImpl implements Query return result; } - private Join getJoinExpr(String table, List joinExprs) + private static Join getJoinExpr(String table, List joinExprs) { for(Iterator iter = joinExprs.iterator(); iter.hasNext(); ) { Join joinExpr = iter.next(); @@ -276,8 +276,9 @@ public abstract class QueryImpl implements Query return joinExpr; } } - throw new IllegalStateException(withErrorContext( - "Cannot find join table " + table)); + // just use the table name as is + return new Join(table, toOptionalQuotedExpr(new StringBuilder(), + table, true).toString()); } private Collection> combineJoins(List joins) -- cgit v1.2.3