flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rbonifacio <...@git.apache.org>
Subject [GitHub] flink pull request #3757: (refactor) some opportunities to use multi-catch
Date Mon, 24 Apr 2017 22:09:43 GMT
Github user rbonifacio commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3757#discussion_r113068939
  
    --- Diff: flink-connectors/flink-avro/src/main/java/org/apache/flink/api/java/io/AvroOutputFormat.java
---
    @@ -125,9 +125,7 @@ public void open(int taskNumber, int numTasks) throws IOException
{
     			datumWriter = new SpecificDatumWriter<E>(avroValueType);
     			try {
     				schema = ((org.apache.avro.specific.SpecificRecordBase)avroValueType.newInstance()).getSchema();
    -			} catch (InstantiationException e) {
    -				throw new RuntimeException(e.getMessage());
    -			} catch (IllegalAccessException e) {
    +			}catch(InstantiationException | IllegalAccessException  e) /*multi-catch refactor*/
{
    --- End diff --
    
    Yes... I will fix the problems related to white spaces. In our opinion, is this kind of
transformation, which aims to use new programming language constructs, worth?  


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message