code: private void readObject(final ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
          @SuppressWarnings("unchecked") // Will throw CCE here if not correct
          final
          L[] srcListeners = (L[]) objectInputStream.readObject();
  
          this.listeners = new CopyOnWriteArrayList<>(srcListeners);
  
          @SuppressWarnings("unchecked") // Will throw CCE here if not correct
          final
          Class<L> listenerInterface = (Class<L>) srcListeners.getClass().getComponentType();
  
          initializeTransientFields(listenerInterface, Thread.currentThread().getContextClassLoader());
      }
docs: Deserialize.
  @param objectInputStream the input stream
  @throws IOException if an IO error occurs
  @throws ClassNotFoundException if the class cannot be resolved