public ReadBeanState popBeanState() {
    if (pathStack != null) {
      String path = pathStack.peekWithNull();
      JsonReadBeanVisitor<?> beanVisitor = visitorMap.get(path);
      if (beanVisitor != null) {
        currentState.visit(beanVisitor);
      }
      pathStack.pop();
    }

    // return the current ReadBeanState as we can't call setLoadedState()
    // yet. We might bind master/detail beans together via mappedBy property
    // so wait until after that before calling ReadBeanStatesetLoadedState();
    ReadBeanState s = currentState;

    beanState.pop();
    currentState = beanState.peekWithNull();
    return s;
  }