private void checkOpen(){
  Assert.state(references.get() > 0,"commit not open");
}

private void checkOpen ( ) { Assert . state ( references . get ( ) > 0 , "commit not open" ) ; }
checks whether the commit is open and throws an exception if not .
