docs: @Override
      public void run() {
          if (!state.compareAndSet(State.CREATED, State.PENDING)) {
              throw new IllegalStateException("Can only run a promise in the CREATED state");
          }
          T result;
          try {
              result = supplier.get();
              state.set(State.COMPLETED);
              observer.next(result);
              observer.completed(true);
          } catch (Exception e) {
              state.set(State.ERROR);
              observer.error(e);
              observer.completed(false);
          }
          observer = null;   //NOPMD
      }