Permalink
Browse files

prevented attempting to spin down when the engine is already null

Signed-off-by: gburgett <gordon.burgett@gmail.com>
  • Loading branch information...
1 parent 7efb0f9 commit 6f57e574870bf9293786d0c9a7d54a7976628e89 @gburgett committed Mar 19, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 java/XFlat/src/org/xflatdb/xflat/db/TableMetadata.java
@@ -75,7 +75,7 @@ public String getName(){
*/
public boolean canSpinDown(){
EngineBase engine = this.engine.get();
- return lastActivity + config.getInactivityShutdownMs() < System.currentTimeMillis() && engine == null || !engine.hasUncomittedData();
+ return lastActivity + config.getInactivityShutdownMs() < System.currentTimeMillis() && engine != null && !engine.hasUncomittedData();
}
public EngineBase getEngine(){

0 comments on commit 6f57e57

Please sign in to comment.