Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3354

Simplify If statements in CodeGen

    XMLWordPrintableJSON

Details

    Description

      Simple if statements can be converted to conditionals.  Specifically if one thing is happening in each block:

      ie:

                          if (nullible)
                          {
                              return $"System.Nullable<{typeof(bool)}>";
                          }
                          else
                          {
                              return typeof(bool).ToString();
                          }

      can become:

                          return nullible ? $"System.Nullable<{typeof(bool)}>" : typeof(bool).ToString(); 

      Attachments

        Issue Links

          Activity

            People

              KSchoonover Kyle Schoonover
              KSchoonover Kyle Schoonover
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h