docs: public Object saveState(FacesContext context)
      {
          Map serializableMap = (isInitialStateMarked()) ? _deltas : _fullState;
  
          if (serializableMap == null || serializableMap.size() == 0)
          {
              return null;
          }
  
          /*
          int stateHolderKeyCount = 0;
          if (isInitalStateMarked())
          {
              for (Iterator<Serializable> it = _stateHolderKeys.iterator(); it.hasNext();)
              {
                  Serializable key = it.next();
                  if (!_deltas.containsKey(key))
                  {
                      stateHolderKeyCount++;
                  }
              }
          }*/
  
          Map.Entry<Serializable, Object> entry;
          //entry == key, value, key, value
          Object[] retArr = new Object[serializableMap.entrySet().size() * 2];
          //Object[] retArr = new Object[serializableMap.entrySet().size() * 2 + stateHolderKeyCount];
  
          Iterator<Map.Entry<Serializable, Object>> it = serializableMap.entrySet().iterator();
          int cnt = 0;
          while (it.hasNext())
          {
              entry = it.next();
              retArr[cnt] = entry.getKey();
  
              Object value = entry.getValue();
  
              // The condition in which the call to saveAttachedState
              // is to handle List, StateHolder or non Serializable instances.
              // we check it here, to prevent unnecessary calls.
              if (value instanceof StateHolder ||
                      value instanceof List ||
                      !(value instanceof Serializable))
              {
                  Object savedValue = UIComponentBase.saveAttachedState(context,
                          value);
                  retArr[cnt + 1] = savedValue;
              }
              else
              {
                  retArr[cnt + 1] = value;
              }
              cnt += 2;
          }
  
          /*
          if (isInitalStateMarked())
          {
              for (Iterator<Serializable> it2 = _stateHolderKeys.iterator(); it.hasNext();)
              {
                  Serializable key = it2.next();
                  if (!_deltas.containsKey(key))
                  {
                      retArr[cnt] = key;
                      Object value = _fullState.get(key);
                      if (value instanceof PartialStateHolder)
                      {
                          //Could contain delta, save it as _AttachedDeltaState
                          PartialStateHolder holder = (PartialStateHolder) value;
                          if (holder.isTransient())
                          {
                              retArr[cnt + 1] = null;
                          }
                          else
                          {
                              retArr[cnt + 1] = new _AttachedDeltaWrapper(value.getClass(), holder.saveState(context));
                          }
                      }
                      else
                      {
                          //Save everything
                          retArr[cnt + 1] = UIComponentBase.saveAttachedState(context, _fullState.get(key));
                      }
                      cnt += 2;
                  }
              }
          }
          */
          return retArr;
      }