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 42375f0e53
commit e5792ba8b3

View File

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