code: public static void close(SolrClient solrClient) {
  
  		Assert.notNull(solrClient, "SolrClient must not be null!");
  
  		try {
  			if (solrClient instanceof Closeable) {
  				solrClient.close();
  			} else {
  				Method shutdownMethod = ReflectionUtils.findMethod(solrClient.getClass(), "shutdown");
  				if (shutdownMethod != null) {
  					shutdownMethod.invoke(solrClient);
  				}
  			}
  		} catch (Exception e) {
  			throw new DataAccessResourceFailureException("Cannot close SolrClient", e);
  		}
  	}
docs: Close the {@link SolrClient} by calling {@link SolrClient#close()} or {@code shutdown} for the generation 5
  libraries.
  
  @param solrClient must not be {@literal null}.
  @throws DataAccessResourceFailureException
  @since 2.1