You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Zoltan Haindrich (Jira)" <ji...@apache.org> on 2021/11/17 09:07:00 UTC

[jira] [Resolved] (HIVE-25692) ExceptionHandler may mask checked exceptions

     [ https://issues.apache.org/jira/browse/HIVE-25692?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zoltan Haindrich resolved HIVE-25692.
-------------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

merged into master. Thank you [~kkasa] and [~dengzh] for reviewing the changes!

> ExceptionHandler may mask checked exceptions
> --------------------------------------------
>
>                 Key: HIVE-25692
>                 URL: https://issues.apache.org/jira/browse/HIVE-25692
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> HIVE-25055 have changed the way exceptions as rethrowed - but one of the methods may let checked exception out without them being declared on the method (and avoid the compile time error for it)
> testcase for:
> org.apache.hadoop.hive.metastore.TestExceptionHandler
> {code}
>   @Test
>   public void testInvalid() throws MetaException {
>     try {
>       throw new IOException("IOException test");
>     } catch (Exception e) {
>       throw handleException(e).throwIfInstance(AccessControlException.class, IOException.class).defaultMetaException();
>     }
>   }
> {code}
> this testcase should not compile - as it may throw IOException or AccessControlException as well



--
This message was sent by Atlassian Jira
(v8.20.1#820001)