You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/10/11 12:41:59 UTC

[GitHub] [incubator-seatunnel] FlechazoW opened a new pull request, #3065: [Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP

FlechazoW opened a new pull request, #3065:
URL: https://github.com/apache/incubator-seatunnel/pull/3065

   
   
   <!--
   
   Thank you for contributing to SeaTunnel! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
   
     - Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
   
     - Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
   
   -->
   
   ## Purpose of this pull request
   
   [Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP to avoid 'Unchecked assignment'.
   
   <!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] TyrantLucifer merged pull request #3065: [Improve][Connector-V2][Iceberg] Using Collections.emptyMap() replaced Collections.EMPTY_MAP

Posted by GitBox <gi...@apache.org>.
TyrantLucifer merged PR #3065:
URL: https://github.com/apache/incubator-seatunnel/pull/3065


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] zhuangchong commented on a diff in pull request #3065: [Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP

Posted by GitBox <gi...@apache.org>.
zhuangchong commented on code in PR #3065:
URL: https://github.com/apache/incubator-seatunnel/pull/3065#discussion_r992294121


##########
seatunnel-connectors-v2/connector-iceberg/src/main/java/org/apache/seatunnel/connectors/seatunnel/iceberg/source/enumerator/IcebergBatchSplitEnumerator.java:
##########
@@ -41,7 +41,7 @@ public IcebergBatchSplitEnumerator(@NonNull SourceSplitEnumerator.Context<Iceber
                                        @NonNull SourceConfig sourceConfig,
                                        IcebergSplitEnumeratorState restoreState) {
         super(context, sourceConfig, restoreState != null ?
-            restoreState.getPendingSplits() : Collections.EMPTY_MAP);
+            restoreState.getPendingSplits() : Collections.emptyMap());

Review Comment:
   Why replace that? The two implementations are the same.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-seatunnel] TyrantLucifer commented on pull request #3065: [Improve] Using Collections.emptyMap() replaced Collections.EMPTY_MAP

Posted by GitBox <gi...@apache.org>.
TyrantLucifer commented on PR #3065:
URL: https://github.com/apache/incubator-seatunnel/pull/3065#issuecomment-1274645027

   Hi [FlechazoW](https://github.com/FlechazoW), overall LGTM except few nits. The name of your pull request does not include the name of the module involved. A clear name for the pull request would help make the review easier. You can refer to [Coding Guide](https://seatunnel.apache.org/docs/contribution/coding-guide) get more details about how to submit a high quality pull request.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org