Skip to content

Commit

Permalink
Changed parsing logic
Browse files Browse the repository at this point in the history
Signed-off-by: pierantoniomerlino <[email protected]>
  • Loading branch information
pierantoniomerlino committed Nov 8, 2024
1 parent 274263c commit 93c19e0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,8 @@ private void updateNetInterfaces(Map<String, Object> configurationProperties, St

private Optional<String> parseInterfaceName(String key) {
Optional<String> interfaceName = Optional.empty();
String[] splittedKey = key.split("\\.");
if (splittedKey.length >= 3) {
interfaceName = Optional.of(splittedKey[2]);
if (key.startsWith("net.interface.") && key.contains(".config.")) {
interfaceName = Optional.of(key.substring(14, key.indexOf(".config.")));
}
return interfaceName;
}
Expand Down

0 comments on commit 93c19e0

Please sign in to comment.