Ted Yu created BEAM-3677:
----------------------------
Summary: Declare proper exception type in catch block of
KafkaExactlyOnceSink#initShardWriter
Key: BEAM-3677
URL: https://issues.apache.org/jira/browse/BEAM-3677
Project: Beam
Issue Type: Bug
Components: sdk-java-extensions
Reporter: Ted Yu
Assignee: Reuven Lax
{code}
} catch (Exception e) {
producer.close();
throw e;
{code}
initShardWriter throws IOException. The catch block shouldn't widen the
exception type.
If the intention is to properly close producer, we can use try-with-resources.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)