[ https://issues.apache.org/jira/browse/BEAM-9326?focusedWorklogId=389616&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-389616 ]
ASF GitHub Bot logged work on BEAM-9326: ---------------------------------------- Author: ASF GitHub Bot Created on: 19/Feb/20 21:05 Start Date: 19/Feb/20 21:05 Worklog Time Spent: 10m Work Description: iemejia commented on pull request #10879: [BEAM-9326] Make JsonToRow transform input <String> instead of <? extends String> URL: https://github.com/apache/beam/pull/10879#discussion_r381544015 ########## File path: sdks/java/core/src/test/java/org/apache/beam/sdk/PipelineTest.java ########## @@ -225,7 +225,7 @@ public void testPipelineSDKExceptionHandling() { @Test @Category(ValidatesRunner.class) public void testMultipleApply() { - PTransform<PCollection<? extends String>, PCollection<String>> myTransform = addSuffix("+"); + MapElements<String, String> myTransform = addSuffix("+"); Review comment: Yes I agree that the PTransform form is more abstract so better, but because of the capricious Java bounds checking this is not possible without doing the `<? extends String>` so I prefer to revert this change and let only the JsonToRow one, which is the one I care about (and the real goal of this PR). Thanks for the review Kenn. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 389616) Time Spent: 0.5h (was: 20m) > JsonToRow transform should not use bounded Wildcards for its input > ------------------------------------------------------------------ > > Key: BEAM-9326 > URL: https://issues.apache.org/jira/browse/BEAM-9326 > Project: Beam > Issue Type: Improvement > Components: sdk-java-core > Reporter: Ismaël Mejía > Assignee: Ismaël Mejía > Priority: Minor > Fix For: 2.20.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > The JsonToRow PTransform input is a String (a final class in Java) so no > reason > to define a bounded wildcard as its argument. > We should use <? extends String> in Beam's codebase only when required by Java > Generics constraints. -- This message was sent by Atlassian Jira (v8.3.4#803005)