Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 833E79642 for ; Mon, 18 Mar 2013 13:54:24 +0000 (UTC) Received: (qmail 32430 invoked by uid 500); 18 Mar 2013 13:54:24 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 32374 invoked by uid 500); 18 Mar 2013 13:54:23 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Delivered-To: moderator for dev@oodt.apache.org Received: (qmail 7469 invoked by uid 99); 13 Mar 2013 05:02:56 -0000 Content-Type: multipart/alternative; boundary="===============6189640978841341588==" MIME-Version: 1.0 Subject: Re: Review Request: Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class From: "Chris Mattmann" To: "Chris Mattmann" Cc: "Ross Laidlaw" , "oodt" Date: Wed, 13 Mar 2013 05:02:56 -0000 Message-ID: <20130313050256.1180.41486@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Chris Mattmann" X-ReviewGroup: oodt X-ReviewRequest-URL: https://reviews.apache.org/r/9844/ X-Sender: "Chris Mattmann" References: <20130311024717.2800.39607@reviews.apache.org> In-Reply-To: <20130311024717.2800.39607@reviews.apache.org> Reply-To: "Chris Mattmann" --===============6189640978841341588== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/9844/#review17785 ----------------------------------------------------------- Ship it! Ship It! - Chris Mattmann On March 11, 2013, 2:47 a.m., Ross Laidlaw wrote: > = > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/9844/ > ----------------------------------------------------------- > = > (Updated March 11, 2013, 2:47 a.m.) > = > = > Review request for oodt and Chris Mattmann. > = > = > Description > ------- > = > The getTopNProducts method has a conditional statement with two possible = outcomes for return statements. It should be possible to replace this with= a single return statement that will still cover all of the same outcomes. > = > = > This addresses bug OODT-573. > https://issues.apache.org/jira/browse/OODT-573 > = > = > Diffs > ----- > = > /trunk/filemgr/src/main/java/org/apache/oodt/cas/filemgr/catalog/Lucene= Catalog.java 1454129 = > = > Diff: https://reviews.apache.org/r/9844/diff/ > = > = > Testing > ------- > = > After making the changes, I ran the unit tests for the filemgr package. = All tests passed. These include tests in the TestLuceneCatalog class, whic= h has two calls to the getTopNProducts method. But the tests don't check f= or a null value returned from getTopNProducts, so it might be desirable to = add another test for this scenario. > = > = > Thanks, > = > Ross Laidlaw > = > --===============6189640978841341588==--