Bugfix where DocumentGeneratorExtractor out of bounded for generators starting with 'microsoft' or 'adobe' but having no followup string.

This commit is contained in:
Viktor Lofgren 2023-07-03 11:06:39 +02:00
parent 7a17933c65
commit 979a620ead

View File

@ -56,8 +56,13 @@ public class DocumentGeneratorExtractor {
return DocumentGenerator.of(parts[0]);
case "adobe":
case "microsoft":
if (parts.length > 1) {
return DocumentGenerator.of(parts[1]);
}
else {
return DocumentGenerator.of(parts[0]);
}
}
if (parts.length > 1) {
return DocumentGenerator.of(parts[0], parts[0] + "_" + truncVersion(parts[1]));