Mods merger can not handle empty nameFragments

Description

[INFO] [talledLocalContainer] java.lang.StringIndexOutOfBoundsException: begin 0, end 1, length 0
[INFO] [talledLocalContainer] at java.base/java.lang.String.checkBoundsBeginEnd(String.java:3319)
[INFO] [talledLocalContainer] at java.base/java.lang.String.substring(String.java:1874)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRNameMerger.addInitials(MCRNameMerger.java:119)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRNameMerger.setFromNameParts(MCRNameMerger.java:71)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRNameMerger.setElement(MCRNameMerger.java:48)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRMergerFactory.buildFrom(MCRMergerFactory.java:51)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRMerger.mergeElements(MCRMerger.java:110)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRMerger.mergeFrom(MCRMerger.java:89)

The nameFragment is a empty String.

If i workarround i also get , because family name is null:
[INFO] [talledLocalContainer] java.lang.NullPointerException
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRNameMerger.isProbablySameAs(MCRNameMerger.java:145)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRMerger.mergeIntoExistingEntries(MCRMerger.java:128)
[INFO] [talledLocalContainer] at org.mycore.mods.merger.MCRMerger.mergeElements(MCRMerger.java:114)

Environment

None

Assignee

Sebastian Hofmann

Reporter

Sebastian Hofmann

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Priority

Medium
Configure