code: @Override
      protected Class<?> resolveClass(final ObjectStreamClass objectStreamClass)
              throws IOException, ClassNotFoundException {
  
          try {
              return Class.forName(objectStreamClass.getName(), false, classLoader);
          } catch (final ClassNotFoundException cnfe) {
              // delegate to super class loader which can resolve primitives
              return super.resolveClass(objectStreamClass);
          }
      }
docs: Resolve a class specified by the descriptor using the
  specified ClassLoader or the super ClassLoader.
  
  @param objectStreamClass descriptor of the class
  @return the Class object described by the ObjectStreamClass
  @throws IOException            in case of an I/O error
  @throws ClassNotFoundException if the Class cannot be found