code: protected void cleanupMultipart(Invocation inv) {
          HttpServletRequest src = inv.getRequest();
          while (src != null && !(src instanceof MultipartHttpServletRequest)
                  && src instanceof HttpServletRequestWrapper) {
              src = (HttpServletRequest) ((HttpServletRequestWrapper) src).getRequest();
          }
          if (src instanceof MultipartHttpServletRequest) {
              final MultipartHttpServletRequest request = (MultipartHttpServletRequest) src;
              MultipartCleanup multipartCleaner = inv.getMethod().getAnnotation(
                      MultipartCleanup.class);
              if (multipartCleaner == null
                      || multipartCleaner.after() == MultipartCleanup.After.CONTROLLER_INVOCATION) {
                  multipartResolver.cleanupMultipart(request);
              } else {
                  inv.addAfterCompletion(new AfterCompletion() {
  
                      @Override
                      public void afterCompletion(Invocation inv, Throwable ex) throws Exception {
                          ModuleEngine.this.multipartResolver.cleanupMultipart(request);
                      }
                  });
              }
          }
  
      }
docs: Clean up any resources used by the given multipart request (if any).
  
  @see MultipartResolver#cleanupMultipart