Fix contentType request parameter in UploadTerminologyCommand (#5639)

This commit is contained in:
Martha Mitran 2024-02-02 10:45:46 -08:00 committed by GitHub
parent 51a6ddad3d
commit 250bc7b031
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -36,6 +36,7 @@ import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.CountingInputStream;
import org.apache.commons.lang3.StringUtils;
@ -268,7 +269,7 @@ public class UploadTerminologyCommand extends BaseRequestGeneratingCommand {
byte[] bytes = theBytes;
String fileName = theFileName;
String suffix = fileName.substring(fileName.lastIndexOf("."));
String suffix = FilenameUtils.getExtension(fileName);
if (bytes.length > ourTransferSizeLimit) {
ourLog.info(

View File

@ -388,7 +388,6 @@ public class UploadTerminologyCommandTest {
},
"-t", theIncludeTls, myBaseRestServerHelper
));
UploadTerminologyCommand uploadTerminologyCommand = new UploadTerminologyCommand();
verify(myTermLoaderSvc, times(1)).loadCustom(any(), myDescriptorListCaptor.capture(), any());