Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5908

Refactor: Remove unnecessary null checks in CalciteSchema

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.35.0
    • 1.36.0
    • core

    Description

      When i read the source code of `CalciteSchema` found so many null checks below:

       

          if (tableMap == null) {
            this.tableMap = new NameMap<>();
          } else {
            this.tableMap = Objects.requireNonNull(tableMap, "tableMap");
          }
          if (latticeMap == null) {
            this.latticeMap = new NameMap<>();
          } else {
            this.latticeMap = Objects.requireNonNull(latticeMap, "latticeMap");
          } 

      i think we can remove it. it was misleading.

       

      Attachments

        Issue Links

          Activity

            People

              taoran Ran Tao
              taoran Ran Tao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: