Skip to content
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

Merged
merged 3 commits into from
Nov 12, 2019

Conversation

miovd
Copy link
Contributor

@miovd miovd commented Nov 8, 2019

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)

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)

Does this PR already have an issue describing the problem ? If so, link to this issue using '#XXX' and skip the rest
fix #981
fix #939

Other information:

(if any of the questions/checkboxes don't apply, please delete them entirely)

Signed-off-by: RALAMBOTIANA MIORA <miora.ralambotiana@rte-france.com>
@coveralls
Copy link

coveralls commented Nov 8, 2019

Coverage Status

Coverage increased (+0.4%) to 84.384% when pulling e2e9c6e on null_connectable_bus into c7aa6df on master.

@@ -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();
Copy link
Member

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()

Copy link
Member

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();
Copy link
Member

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants