Skip to content
Snippets Groups Projects
Commit 0d3cf0df authored by Johannes Mey's avatar Johannes Mey
Browse files

be much more resilient when getting current config of an attribute in a living partition

parent f5e1058c
Branches
No related tags found
No related merge requests found
...@@ -79,7 +79,13 @@ public class ERISLivingPartition { ...@@ -79,7 +79,13 @@ public class ERISLivingPartition {
} }
public Optional<ERISLPConfiguration> getConfigForAttribute(ERISAttribute attribute, boolean index) { public Optional<ERISLPConfiguration> getConfigForAttribute(ERISAttribute attribute, boolean index) {
if (this.configurations == null) {
return Optional.empty();
}
for (ERISLPConfiguration config : this.configurations) { for (ERISLPConfiguration config : this.configurations) {
if (config == null || config.getAttributesAndKeys() == null || config.getAccessPath() == null || config.getAccessPath().getAddressingMode() == null) {
continue;
}
if (config.getAttributesAndKeys().contains(attribute) && config.getAccessPath().getAddressingMode().equals("index") == index) { if (config.getAttributesAndKeys().contains(attribute) && config.getAccessPath().getAddressingMode().equals("index") == index) {
return Optional.of(config); return Optional.of(config);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment