public int registerHandler(GitRebaseEditorHandler handler){
  addInternalHandler();
  Integer rc=null;
synchronized (myHandlersLock) {
    for (int i=Integer.MAX_VALUE; i > 0; i--) {
      int code=Math.abs(oursRandom.nextInt());
      if (code > 0 && !myHandlers.containsKey(code)) {
        rc=code;
        break;
      }
    }
    if (rc == null) {
      throw new IllegalStateException("There is a problem with random number allocation");
    }
    myHandlers.put(rc,handler);
  }
  return rc;
}

public int registerHandler ( GitRebaseEditorHandler handler ) { addInternalHandler ( ) ; Integer rc = null ; synchronized ( myHandlersLock ) { for ( int i = Integer . MAX_VALUE ; i > 0 ; i -- ) { int code = Math . abs ( oursRandom . nextInt ( ) ) ; if ( code > 0 && ! myHandlers . containsKey ( code ) ) { rc = code ; break ; } } if ( rc == null ) { throw new IllegalStateException ( "There is a problem with random number allocation" ) ; } myHandlers . put ( rc , handler ) ; } return rc ; }
register the handler in the service
