-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BBranch calculated connectable bus from NB view can be null #1008
Conversation
Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
@@ -401,8 +401,8 @@ BusExt getConnectableBus(int node) { | |||
// if nothing found, just take the first bus | |||
if (connectableBus2[0] == null) { | |||
Iterator<CalculatedBus> it = getBuses().iterator(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember why the original check is done using iterator but as getBuses() returns a Collection it would be more clear to use isEmpty()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree on using isEmpty
@@ -401,8 +401,8 @@ BusExt getConnectableBus(int node) { | |||
// if nothing found, just take the first bus | |||
if (connectableBus2[0] == null) { | |||
Iterator<CalculatedBus> it = getBuses().iterator(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree on using isEmpty
Signed-off-by: Luma Zamarreño <zamarrenolm@aia.es>
Signed-off-by: RALAMBOTIANA MIORA miora.ralambotiana@rte-france.com
Please check if the PR fulfills these requirements (please use
'[x]'
to check the checkboxes, or submit the PR and then click the checkboxes)Does this PR already have an issue describing the problem ? If so, link to this issue using
'#XXX'
and skip the restfix #981
fix #939
Other information:
(if any of the questions/checkboxes don't apply, please delete them entirely)