[ 
https://issues.apache.org/jira/browse/AVRO-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Tzvetanov Grigorov resolved AVRO-3354.
---------------------------------------------
    Fix Version/s: 1.11.1
                   1.12.0
         Assignee: Martin Tzvetanov Grigorov
       Resolution: Fixed

> 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
>            Assignee: Martin Tzvetanov Grigorov
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.11.1, 1.12.0
>
>          Time Spent: 0.5h
>  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)

Reply via email to