code: public static Resource prepareClasspathResourceIfNeeded(final Resource resource) {
          if (resource == null) {
              LOGGER.debug("No resource defined to prepare. Returning null");
              return null;
          }
          return prepareClasspathResourceIfNeeded(resource, false, resource.getFilename());
      }
docs: Prepare classpath resource if needed file.
  
  @param resource the resource
  @return the file