You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oodt.apache.org by Ross Laidlaw <rl...@gmail.com> on 2013/03/11 03:45:11 UTC

Review Request: Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9844/
-----------------------------------------------------------

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 options.


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/LuceneCatalog.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, which has two calls to the getTopNProducts method.  But the tests don't check for a null value returned from getTopNProducts, so it might be desirable to add another test for this scenario.


Thanks,

Ross Laidlaw


Re: Review Request: Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class

Posted by Chris Mattmann <ma...@apache.org>.
-----------------------------------------------------------
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/LuceneCatalog.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, which has two calls to the getTopNProducts method.  But the tests don't check for a null value returned from getTopNProducts, so it might be desirable to add another test for this scenario.
> 
> 
> Thanks,
> 
> Ross Laidlaw
> 
>


Re: Review Request: Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class

Posted by Ross Laidlaw <rl...@gmail.com>.
-----------------------------------------------------------
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 (updated)
-------

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/LuceneCatalog.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, which has two calls to the getTopNProducts method.  But the tests don't check for a null value returned from getTopNProducts, so it might be desirable to add another test for this scenario.


Thanks,

Ross Laidlaw


Re: Review Request: Suggested refactoring for return statement in getTopNProducts method in LuceneCatalog class

Posted by Ross Laidlaw <rl...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/9844/
-----------------------------------------------------------

(Updated March 11, 2013, 2:45 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 options.


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/LuceneCatalog.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, which has two calls to the getTopNProducts method.  But the tests don't check for a null value returned from getTopNProducts, so it might be desirable to add another test for this scenario.


Thanks,

Ross Laidlaw