Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikriemer committed Dec 17, 2024
1 parent 9d88ab0 commit 5f66bb8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,20 @@ public SecurityProtocol getSecurityProtocol(String selectedSecurityConfiguration
}

public static Map<String, String> parseAdditionalProperties(String text) {
return Arrays.stream(text.split("\\R"))
.map(String::trim)
.filter(line -> !line.isEmpty() && !line.startsWith("#"))
.filter(line -> line.contains("="))
.map(line -> line.split("=", 2))
.collect(Collectors.toMap(
parts -> parts[0].trim(),
parts -> parts[1].trim(),
(existing, replacement) -> replacement,
LinkedHashMap::new
));
if (text == null || text.isEmpty()) {
return Map.of();
} else {
return Arrays.stream(text.split("\\R"))
.map(String::trim)
.filter(line -> !line.isEmpty() && !line.startsWith("#"))
.filter(line -> line.contains("="))
.map(line -> line.split("=", 2))
.collect(Collectors.toMap(
parts -> parts[0].trim(),
parts -> parts[1].trim(),
(existing, replacement) -> replacement,
LinkedHashMap::new
));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public IAdapterConfiguration prepareAdapter() throws AdapterException {
// Set format to Json
((StaticPropertyAlternatives) (desc)
.getConfig()
.get(7))
.get(8))
.getAlternatives()
.get(0)
.setSelected(true);
Expand Down

0 comments on commit 5f66bb8

Please sign in to comment.