[
https://issues.apache.org/jira/browse/AVRO-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486884#comment-17486884
]
ASF subversion and git services commented on AVRO-3354:
-------------------------------------------------------
Commit 8f80ac5cc2577ada4b0fce347f6435bf9e778127 in avro's branch
refs/heads/branch-1.11 from Kyle Schoonover
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=8f80ac5 ]
AVRO-3354 Simplified if statements (#1505)
Co-authored-by: Kyle T. Schoonover <[email protected]>
(cherry picked from commit 9ca68cb782a98badcbd24d0503777d6e45b0ab2f)
> Simplify If statements in CodeGen
> ---------------------------------
>
> Key: AVRO-3354
> URL: https://issues.apache.org/jira/browse/AVRO-3354
> Project: Apache Avro
> Issue Type: Improvement
> Components: csharp
> Affects Versions: 1.11.1
> Reporter: Kyle Schoonover
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Simple if statements can be converted to conditionals. Specifically if one
> thing is happening in each block:
> ie:
> {code:java}
> if (nullible)
> {
> return $"System.Nullable<{typeof(bool)}>";
> }
> else
> {
> return typeof(bool).ToString();
> }{code}
> can become:
> {code:java}
> return nullible ? $"System.Nullable<{typeof(bool)}>" :
> typeof(bool).ToString(); {code}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)