mirror of
https://github.com/nsacyber/HIRS.git
synced 2024-12-19 04:58:00 +00:00
Merge pull request #319 from nsacyber/rim-update-error
[#318] RIM upload error
This commit is contained in:
commit
e3b8ce25d7
@ -188,7 +188,7 @@ public class ReferenceManifestPageController
|
||||
Map<String, Object> model = new HashMap<>();
|
||||
PageMessages messages = new PageMessages();
|
||||
String fileName;
|
||||
Pattern pattern;
|
||||
Pattern logPattern = Pattern.compile(LOG_FILE_PATTERN);
|
||||
Matcher matcher;
|
||||
boolean supportRIM = false;
|
||||
BaseReferenceManifest base;
|
||||
@ -197,13 +197,14 @@ public class ReferenceManifestPageController
|
||||
// loop through the files
|
||||
for (MultipartFile file : files) {
|
||||
fileName = file.getOriginalFilename();
|
||||
pattern = Pattern.compile(LOG_FILE_PATTERN);
|
||||
matcher = pattern.matcher(fileName);
|
||||
matcher = logPattern.matcher(fileName);
|
||||
supportRIM = matcher.matches();
|
||||
|
||||
//Parse reference manifests
|
||||
ReferenceManifest rim = parseRIM(file, supportRIM, messages);
|
||||
|
||||
//Store only if it was parsed
|
||||
if (rim != null) {
|
||||
if (supportRIM) {
|
||||
// look for associated base/support
|
||||
Set<BaseReferenceManifest> rims = BaseReferenceManifest
|
||||
@ -253,8 +254,6 @@ public class ReferenceManifestPageController
|
||||
}
|
||||
}
|
||||
|
||||
//Store only if it was parsed
|
||||
if (rim != null) {
|
||||
storeManifest(file.getOriginalFilename(),
|
||||
messages,
|
||||
rim,
|
||||
|
Loading…
Reference in New Issue
Block a user