File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
quickfixj-core/src/main/java/quickfix Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -887,12 +887,13 @@ public void removeSection(final SessionID sessionID) throws ConfigError {
887887 }
888888
889889 public void removeSection (final String propertyKey , final String propertyValue ) throws ConfigError {
890- SessionID sessionIdToRemove = sections .entrySet ().stream ()
890+ List < SessionID > sessionIDs = sections .entrySet ().stream ()
891891 .filter (entry -> propertyValue .equals (entry .getValue ().get (propertyKey )))
892892 .map (Map .Entry ::getKey )
893- .findFirst ()
894- .orElseThrow (() -> new ConfigError ("Session not found" ));
893+ .collect (Collectors .toList ());
895894
896- sections .remove (sessionIdToRemove );
895+ for (SessionID sessionID : sessionIDs ) {
896+ this .removeSection (sessionID );
897+ }
897898 }
898899}
You can’t perform that action at this time.
0 commit comments