code: @SuppressWarnings("unchecked")
      public void restoreState(FacesContext context, Object state) {
  
          if (context == null) {
              throw new NullPointerException();
          }
  
          if (state != null) {
  
              // Unchecked cast from Object to List<BehaviorListener>
              listeners = (List<BehaviorListener>)UIComponentBase.restoreAttachedState(context, state);
  
              // If we saved state last time, save state again next time.
              clearInitialState();
          }
      }
docs: <p class="changed_added_2_0">Implementation of
  {@link javax.faces.component.StateHolder#restoreState}.