Uploaded image for project: 'OODT (Retired)'
  1. OODT (Retired)
  2. OODT-573

Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 0.6
    • 0.6
    • file manager
    • None

    Description

      The getTopNProducts method in org.apache.oodt.cas.filemgr.catalog.LuceneCatalog currently has the following return statement:

      LuceneCatalog.java
      public List<Product> getTopNProducts(int n, ProductType type) throws CatalogException
      {
        ...
        if (products != null) {
          return products;
              } else
                  return null;
      }
      

      I believe that we can replace the above statement with the following:

      LuceneCatalog.java
      public List<Product> getTopNProducts(int n, ProductType type) throws CatalogException
      {
        ...
        return products;
      }
      

      Attachments

        1. OODT-573.rlaidlaw.2013-03-11.txt
          0.6 kB
          Ross Laidlaw

        Activity

          People

            rlaidlaw Ross Laidlaw
            rlaidlaw Ross Laidlaw
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: