[ 
https://issues.apache.org/jira/browse/TIKA-2420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16075699#comment-16075699
 ] 

Tim Allison commented on TIKA-2420:
-----------------------------------

Do we know which types of query will throw this?  Might this change in future 
versions?  Should we just try/catch?

{noformat}
        for (Query q : db.getQueries()) {
            xhtml.startElement("div", "type", "sqlQuery");
            String sqlString = "unsupported query type";
            try {
                sqlString = q.toSQLString();
            } catch (UnsupportedOperationException e) {
                //swallow
            }
            xhtml.characters(sqlString);
            xhtml.endElement("div");
        }
{noformat}

> Jackcess toSQLString throws UnsupportedOperationException for unknown query 
> type
> --------------------------------------------------------------------------------
>
>                 Key: TIKA-2420
>                 URL: https://issues.apache.org/jira/browse/TIKA-2420
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 1.16
>            Reporter: Nick C
>            Priority: Trivial
>
> In JackcessExtractor when calling toSQLString on a query with an unknown type 
> Jackcess throws an UnsupportedOperationException (see 
> com.healthmarketscience.jackcess.impl.query.QueryImpl.UnknownQueryImpl.toSQLString)
>  An easy fix is to just check the query type before calling toSQLString.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to