[jira] [Commented] (FLINK-4517) scala code refactoring
[ https://issues.apache.org/jira/browse/FLINK-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15601123#comment-15601123 ] ASF GitHub Bot commented on FLINK-4517: --- Github user shijinkui closed the pull request at: https://github.com/apache/flink/pull/2428 > scala code refactoring > -- > > Key: FLINK-4517 > URL: https://issues.apache.org/jira/browse/FLINK-4517 > Project: Flink > Issue Type: Improvement >Reporter: shijinkui >Priority: Minor > > such as: > 1. case class does't need `new` > 2. case block does't need `{ ... }` > 3. match-case instead of isInstanceOf -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4517) scala code refactoring
[ https://issues.apache.org/jira/browse/FLINK-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15455202#comment-15455202 ] ASF GitHub Bot commented on FLINK-4517: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2428 I think that is the right approach. Fix stale issue as one goes across the code. If you want to guard issues by checkstyle, I would suggest to take one rule at a time and address the changes. Not all rules are agreed upon by all, so one rule at a time helps to do the changes that all agree upon. > scala code refactoring > -- > > Key: FLINK-4517 > URL: https://issues.apache.org/jira/browse/FLINK-4517 > Project: Flink > Issue Type: Improvement >Reporter: shijinkui >Priority: Minor > > such as: > 1. case class does't need `new` > 2. case block does't need `{ ... }` > 3. match-case instead of isInstanceOf -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4517) scala code refactoring
[ https://issues.apache.org/jira/browse/FLINK-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15445550#comment-15445550 ] ASF GitHub Bot commented on FLINK-4517: --- Github user shijinkui commented on the issue: https://github.com/apache/flink/pull/2428 @StephanEwen Thank for your reply. These code change such as case class usage are not forced to observe. But there are scala best practice. We can update every kind of problem, at same time update scala check-style rule if exist. :) > scala code refactoring > -- > > Key: FLINK-4517 > URL: https://issues.apache.org/jira/browse/FLINK-4517 > Project: Flink > Issue Type: Improvement >Reporter: shijinkui >Priority: Minor > > such as: > 1. case class does't need `new` > 2. case block does't need `{ ... }` > 3. match-case instead of isInstanceOf -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4517) scala code refactoring
[ https://issues.apache.org/jira/browse/FLINK-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15445335#comment-15445335 ] ASF GitHub Bot commented on FLINK-4517: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2428 I am a bit cautious with such changes. There is no necessity to change the code, it only looses history, and there is always a slight risk of a new bug appearing. Some of the styles you are adjusting were actually good as they were before. For example, I personally very much prefer to always call Java Methods always with Parenthesis, since they are always defined with parenthesis. How about we just update code style on the fly in the parts we touch anyways? > scala code refactoring > -- > > Key: FLINK-4517 > URL: https://issues.apache.org/jira/browse/FLINK-4517 > Project: Flink > Issue Type: Improvement >Reporter: shijinkui >Priority: Minor > > such as: > 1. case class does't need `new` > 2. case block does't need `{ ... }` > 3. match-case instead of isInstanceOf -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4517) scala code refactoring
[ https://issues.apache.org/jira/browse/FLINK-4517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15441203#comment-15441203 ] ASF GitHub Bot commented on FLINK-4517: --- GitHub user shijinkui opened a pull request: https://github.com/apache/flink/pull/2428 [FLINK-4517] scala code refactoring the refacter type: 1. case class does't need `new` 2. case block does't need `{ ... }` 3. match-case instead of isInstanceOf references the related [FLINK-4517] You can merge this pull request into a Git repository by running: $ git pull https://github.com/shijinkui/flink scala-refactoring Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2428.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2428 commit b02bef1f23943b08908f408e03f75fb8c5220a28 Author: shijinkuiDate: 2016-08-27T09:17:04Z [FLINK-4517] scala code refactoring > scala code refactoring > -- > > Key: FLINK-4517 > URL: https://issues.apache.org/jira/browse/FLINK-4517 > Project: Flink > Issue Type: Improvement >Reporter: shijinkui >Priority: Minor > > such as: > 1. case class does't need `new` > 2. case block does't need `{ ... }` > 3. match-case instead of isInstanceOf -- This message was sent by Atlassian JIRA (v6.3.4#6332)