src/main/java/com/seanchenxi/gwt/storage/client/StorageExt.java
public HandlerRegistration addStorageChangeHandler(final StorageChangeEvent.Handler handler) {
    if(handler == null)
      throw new IllegalArgumentException("Handler can not be null");
    ensureHandlerSet().add(handler);
    return new HandlerRegistration() {
      @Override
      public void removeHandler() {
        if (handlers != null) {
          handlers.remove(handler);
          if (handlers.isEmpty()) {
            handlers = null;
          }
        }
      }
    };
  }
public HandlerRegistration addStorageChangeHandler(final StorageChangeEvent.Handler handler) {
    if(handler == null)
      throw new IllegalArgumentException("Handler can not be null");
    ensureHandlerSet().add(handler);
    return new HandlerRegistration() {
      @Override
      public void removeHandler() {
        if (handlers != null) {
          handlers.remove(handler);
          if (handlers.isEmpty()) {
            handlers = null;
          }
        }
      }
    };
  }
Registers an event handler for {@link StorageChangeEvent}

@param handler an event handler instance
@return {@link HandlerRegistration} used to remove this handler