Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.95.2
-
None
-
None
-
Reviewed
Description
There are a bunch of places in the code like this:
region.close();
region.getLog().closeAndDelete();
Instead of the better:
HRegion.closeHRegion(region);
We should change these for a few reasons:
1) If we ever need to change the implementation, it's easier to change in one place
2) closeHRegion properly checks for nulls. There are a few places where this could make a difference, for example in TestOpenedRegionHandler.java it's possible that an exception can be thrown before "region" is assigned and thus region.close() could throw an NPE. closeHRegion avoids this issue.