Skip to content

Commit

Permalink
EPMRPP-96333 deprecated code
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Jan 13, 2025
1 parent 184a749 commit a4557ab
Showing 1 changed file with 13 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@

package com.epam.ta.reportportal.binary.impl;

import static com.epam.reportportal.rules.commons.validation.BusinessRule.expect;
import static com.epam.reportportal.rules.commons.validation.Suppliers.formattedSupplier;
import static com.epam.ta.reportportal.binary.impl.DataStoreUtils.PROJECT_PATH;
import static com.epam.ta.reportportal.binary.impl.DataStoreUtils.isContentTypePresent;
import static com.epam.ta.reportportal.binary.impl.DataStoreUtils.resolveExtension;

import com.epam.reportportal.commons.ContentTypeResolver;
import com.epam.reportportal.rules.exception.ErrorType;
import com.epam.reportportal.rules.exception.ReportPortalException;
Expand All @@ -31,14 +37,6 @@
import com.epam.ta.reportportal.entity.enums.FeatureFlag;
import com.epam.ta.reportportal.filesystem.FilePathGenerator;
import com.epam.ta.reportportal.util.FeatureFlagHandler;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
Expand All @@ -47,11 +45,13 @@
import java.util.Optional;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest;

import static com.epam.reportportal.rules.commons.validation.BusinessRule.expect;
import static com.epam.reportportal.rules.commons.validation.Suppliers.formattedSupplier;
import static com.epam.ta.reportportal.binary.impl.DataStoreUtils.*;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
* @author <a href="mailto:[email protected]">Ihar Kahadouski</a>
Expand Down Expand Up @@ -127,11 +127,6 @@ public Optional<BinaryDataMetaInfo> saveAttachment(AttachmentMetaInfo metaInfo,
.withContentType(contentType).withFileSize(file.getSize()).build());
} catch (IOException e) {
LOGGER.error("Unable to save binary data", e);
} finally {
// TODO: uncomment and fix later !!!
/* if (file instanceof CommonsMultipartFile) {
((CommonsMultipartFile) file).getFileItem().delete();
}*/
}
return result;
}
Expand Down

0 comments on commit a4557ab

Please sign in to comment.