Closed gokcantali closed 8 years ago
Code is perfectly readable, there are no issues with clarity.
Session is opened but never closed in /TagDaoImpl.java at getTagsByContext(String) method. Note that this is a repository wide situation that some opened sessions are not closed. They will need to be checked and debugged. The reason some of them are done this way is due to the way Hibernate's lazy-loading works. Large scale debugging is necessary to deal with this problem.
There are no features that were supposed to be done in this commit that are not done. There are numerous stuff that have been added later in the history of the search branch that either bugfix or complement what was done in this commit. Perhaps this would be a better question if a code review is done on a seperate branch through a pull request.
None of the methods and classes are properly documented. SearchController class has a basic template but it is not in a valid (Doxygen) format and is not very informative.
There are no unit tests for any of the methods. Most of them are untestable since they are session related and their output will change as the database changes. What we can do, however, is add range checks (Ex: Integer.MAXVALUE and Integer.MINVALUE) to those methods that return an integer. They will still need the database to be functional to work, but at least there won't be any overflows.
Code can be modified easily. For example, I can easily change the minimum amount of posts returned by SearchController's searchByTag(String) method and get more posts returned when searching by a tag.
Classes are all compliant with Hibernate's, Spring's, and Java's guidelines. Methods are small and modular.
On running IntelliJ Code Analyzer on the methods associated with the commit, I have seen that there are no significant suggestions given by the analyzer.
Overall, this is one of the cleanest and issue free commits I've ever seen. Great job, @gokcantali , and don't forget to be awesome.
Thank you for the amazing review @Xyllan !
As you suggested, I implemented some unit tests and added the doxygen documentation to necessary places. You can check the following commits: 6f636ebd1c4cbe5019ab45b42f41985b72bffcaa , 7a4dd81b3ebb7f6efdf3d5f2a86e98ee19ab65ed, 52f48f6dd78d2784cfd4c2995c879e7c045f8f55
Please check whether these commits fulfill the requirements which were missing the last time. And keep being awesome!
Many unit tests are implemented and newly added functions are commented. Nice job!
Please perform a code review on the commit 2e1fd92b7a022a75721c1813a6f5e955c8ec52f3 before this midnight.