code: public static void setStack(final Collection<String> stack) {
          if (stack.isEmpty() || !useStack) {
              return;
          }
          contextStack.clear();
          contextStack.addAll(stack);
      }
docs: Sets this thread's stack.
  
  @param stack The stack to use.