code: @SuppressWarnings({ "unchecked", "rawtypes" })
      @Override
      public ThreadContext deserializeThreadContext(ThreadContextDeserializationInfo info, @Sensitive byte[] bytes) throws ClassNotFoundException, IOException {
          ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
          SecurityContextImpl context = null;
          try {
              context = (SecurityContextImpl) in.readObject();
          } finally {
              in.close();
          }
  
          SecurityManager sm = System.getSecurityManager();
          if (sm != null) {
              final SecurityContextImpl finalContext = context;
              AccessController.doPrivileged(new PrivilegedAction() {
  
                  @Override
                  public Object run() {
                      finalContext.recreateFullSubjects(securityServiceRef.getService(), unauthenticatedSubjectServiceRef);
                      return null;
                  }
  
              });
          } else {
              context.recreateFullSubjects(securityServiceRef.getService(), unauthenticatedSubjectServiceRef);
          }
  
          return context;
      }
docs: {@inheritDoc}