Unicorn with delicious cookie
Мы используем куки, чтобы пользоваться сайтом было удобно.
Хорошо
to the top
>
>
>
Примеры ошибок, обнаруженных с...

Примеры ошибок, обнаруженных с помощью диагностики V6051

V6051. Use of jump statements in 'finally' block can lead to the loss of unhandled exceptions.


Apache Hive

V6051 The use of the 'return' statement in the 'finally' block can lead to the loss of unhandled exceptions. ObjectStore.java(9080)


private List<MPartitionColumnStatistics>
getMPartitionColumnStatistics(....)
throws NoSuchObjectException, MetaException
{
  boolean committed = false;

  try {
    .... /*some actions*/

    committed = commitTransaction();

    return result;
  }
  catch (Exception ex)
  {
    LOG.error("Error retrieving statistics via jdo", ex);
    if (ex instanceof MetaException) {
      throw (MetaException) ex;
    }
    throw new MetaException(ex.getMessage());
  }
  finally
  {
    if (!committed) {
      rollbackTransaction();
      return Lists.newArrayList();
    }
  }
}

Similar errors can be found in some other places:

  • V6051 The use of the 'return' statement in the 'finally' block can lead to the loss of unhandled exceptions. ObjectStore.java(808