Conversation
896bfd3 to
3e64ccb
Compare
1582327 to
d150d3f
Compare
This was referenced Mar 14, 2026
93cb5de to
0182e94
Compare
23 tasks
7567935 to
f40f5f5
Compare
sebhofmann
requested changes
Mar 23, 2026
mycore-base/src/main/java/org/mycore/common/config/MCRConfigurableInstanceHelper.java
Outdated
Show resolved
Hide resolved
mycore-base/src/main/java/org/mycore/common/config/annotation/MCRPropertyMap.java
Outdated
Show resolved
Hide resolved
mycore-base/src/main/java/org/mycore/common/config/annotation/MCRPropertyList.java
Outdated
Show resolved
Hide resolved
mycore-base/src/main/java/org/mycore/common/config/MCRConfigurableInstanceHelper.java
Outdated
Show resolved
Hide resolved
mycore-base/src/main/java/org/mycore/common/config/MCRConfigurableInstanceHelper.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| SortedMap<Integer, String> orderedPropertyMap = new TreeMap<>(); | ||
| propertyMap.forEach((key, value) -> orderedPropertyMap.put(Integer.parseInt(key), value)); |
Member
There was a problem hiding this comment.
This will throw a "cryptic" message if they keys are no integer. Maybe throw a better error like:
propertyMap.forEach((key, value) -> {
try {
orderedPropertyMap.put(Integer.parseInt(key), value);
} catch (NumberFormatException e) {
throw new MCRConfigurationException(
"Property list key '" + prefix + key + "' is not a valid integer index", e);
}
});
|
|
||
| private Map<String, String> parseShortFormMap(String value) { | ||
| return MCRConfiguration2.splitValue(value) | ||
| .map(s -> s.split(":", 2)) |
Member
There was a problem hiding this comment.
This should maybe print a warning if there are some wrong mappings without :
private Map<String, String> parseShortFormMap(String value) {
return MCRConfiguration2.splitValue(value)
.map(s -> s.split(":", 2))
.filter(parts -> {
if (parts.length == 1) {
LOGGER.warn("Ignoring short form map entry '{}' - missing ':' separator", parts[0]);
return false;
}
return true;
})
.filter(parts -> !parts[1].isBlank())
.collect(Collectors.toMap(parts -> parts[0].trim(), parts -> parts[1].trim()));
}
febdd04 to
fcd035e
Compare
…ued maps and lists
fcd035e to
74745ca
Compare
Contributor
Author
Thx for the feedback. Issues should be fixed now. |
sebhofmann
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to jira.
Pull Request Checklist (Author)
Please go through the following checklist before assigning the PR for review:
Ticket & Documentation
fixed-versionis correctly set in the ticket and matches the PR's target branch (main).Feature & Improvement Specific Checks
Testing
As per Scout rule: Test property names and values used in
MCRConfigurableInstanceHelperNestedTesthave been changed to align with the new test classMCRConfigurableInstanceHelperCollectionTestwhich has similar tests (the names and values have become a bit unwieldy).List#getFirst()has been replaced withList#get(0)in the tests, b/c it better reflects the indexed-based access to the tested lists.MCR Conventions & Metadata
mycore.properties.mycore.properties.Multi-Repo Considerations
MIRrequired?