Code polishing.
This commit is contained in:
parent
b7f6056032
commit
c8485d472e
|
@ -180,12 +180,12 @@ public class FileUtils {
|
||||||
// Extract the "fileNameWithExtension" to be added in the HashMultimap.
|
// Extract the "fileNameWithExtension" to be added in the HashMultimap.
|
||||||
Matcher matcher = FILENAME_ID_EXTENSION.matcher(fileLocation);
|
Matcher matcher = FILENAME_ID_EXTENSION.matcher(fileLocation);
|
||||||
if ( ! matcher.matches() ) {
|
if ( ! matcher.matches() ) {
|
||||||
logger.error("Failed to match the \"fileLocation\": \"" + fileLocation + "\", using this regex: " + FILENAME_ID_EXTENSION);
|
logger.error("Failed to match the \"fileLocation\": \"" + fileLocation + "\" of id: \"" + payload.getId() + "\", originalUrl: \"" + payload.getOriginal_url() + "\", using this regex: " + FILENAME_ID_EXTENSION);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String fileNameWithExtension = matcher.group(1);
|
String fileNameWithExtension = matcher.group(1);
|
||||||
if ( (fileNameWithExtension == null) || fileNameWithExtension.isEmpty() ) {
|
if ( (fileNameWithExtension == null) || fileNameWithExtension.isEmpty() ) {
|
||||||
logger.error("Failed to extract the \"fileNameWithExtension\" from \"" + fileLocation + "\".");
|
logger.error("Failed to extract the \"fileNameWithExtension\" from \"fileLocation\": \"" + fileLocation + "\", of id: \"" + payload.getId() + "\", originalUrl: \"" + payload.getOriginal_url() + "\", using this regex: " + FILENAME_ID_EXTENSION);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue