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<>();
|
Map<String, Object> model = new HashMap<>();
|
||||||
PageMessages messages = new PageMessages();
|
PageMessages messages = new PageMessages();
|
||||||
String fileName;
|
String fileName;
|
||||||
Pattern pattern;
|
Pattern logPattern = Pattern.compile(LOG_FILE_PATTERN);
|
||||||
Matcher matcher;
|
Matcher matcher;
|
||||||
boolean supportRIM = false;
|
boolean supportRIM = false;
|
||||||
BaseReferenceManifest base;
|
BaseReferenceManifest base;
|
||||||
@ -197,13 +197,14 @@ public class ReferenceManifestPageController
|
|||||||
// loop through the files
|
// loop through the files
|
||||||
for (MultipartFile file : files) {
|
for (MultipartFile file : files) {
|
||||||
fileName = file.getOriginalFilename();
|
fileName = file.getOriginalFilename();
|
||||||
pattern = Pattern.compile(LOG_FILE_PATTERN);
|
matcher = logPattern.matcher(fileName);
|
||||||
matcher = pattern.matcher(fileName);
|
|
||||||
supportRIM = matcher.matches();
|
supportRIM = matcher.matches();
|
||||||
|
|
||||||
//Parse reference manifests
|
//Parse reference manifests
|
||||||
ReferenceManifest rim = parseRIM(file, supportRIM, messages);
|
ReferenceManifest rim = parseRIM(file, supportRIM, messages);
|
||||||
|
|
||||||
|
//Store only if it was parsed
|
||||||
|
if (rim != null) {
|
||||||
if (supportRIM) {
|
if (supportRIM) {
|
||||||
// look for associated base/support
|
// look for associated base/support
|
||||||
Set<BaseReferenceManifest> rims = BaseReferenceManifest
|
Set<BaseReferenceManifest> rims = BaseReferenceManifest
|
||||||
@ -253,8 +254,6 @@ public class ReferenceManifestPageController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Store only if it was parsed
|
|
||||||
if (rim != null) {
|
|
||||||
storeManifest(file.getOriginalFilename(),
|
storeManifest(file.getOriginalFilename(),
|
||||||
messages,
|
messages,
|
||||||
rim,
|
rim,
|
||||||
|
Loading…
Reference in New Issue
Block a user