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

ibdp/Node: use Optional#flatMap correctly #7043

Merged
merged 1 commit into from Jun 4, 2021

Conversation

dhalperi
Copy link
Member

@dhalperi dhalperi commented Jun 3, 2021

We accidentally made an Optional<Optional<Rib>> that could be absent, or
present with a Rib, or present with an absent Rib. We meant to chain the
optionality, which is done with flatMap.

We accidentally made an `Optional<Optional<Rib>>` that could be absent, or
present with a Rib, or present with an absent Rib. We meant to chain the
optionality, which is done with `flatMap`.
@dhalperi dhalperi requested a review from corinaminer June 3, 2021 23:00
@batfish-bot
Copy link

This change is Reviewable

@codecov
Copy link

codecov bot commented Jun 3, 2021

Codecov Report

Merging #7043 (196f3ef) into master (c9c89d8) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #7043      +/-   ##
============================================
- Coverage     71.92%   71.90%   -0.03%     
+ Complexity    37727    37715      -12     
============================================
  Files          3036     3036              
  Lines        154786   154786              
  Branches      18576    18576              
============================================
- Hits         111333   111302      -31     
- Misses        34571    34593      +22     
- Partials       8882     8891       +9     
Impacted Files Coverage Δ
...src/main/java/org/batfish/dataplane/ibdp/Node.java 81.81% <100.00%> (+9.09%) ⬆️
.../datamodel/routing_policy/statement/Statement.java 72.72% <0.00%> (-9.10%) ⬇️
...src/main/java/org/batfish/coordinator/PoolMgr.java 54.76% <0.00%> (-5.96%) ⬇️
...rg/batfish/identifiers/StorageBasedIdResolver.java 85.29% <0.00%> (-5.89%) ⬇️
.../org/batfish/dataplane/rib/RouteAdvertisement.java 83.67% <0.00%> (-4.09%) ⬇️
...ain/java/org/batfish/symbolic/IngressLocation.java 65.78% <0.00%> (-2.64%) ⬇️
...col/src/main/java/org/batfish/role/InferRoles.java 91.36% <0.00%> (-1.37%) ⬇️
...main/java/org/batfish/datamodel/acl/AclTracer.java 62.42% <0.00%> (-1.28%) ⬇️
...ain/java/org/batfish/storage/FileBasedStorage.java 84.50% <0.00%> (-0.93%) ⬇️
...ain/java/org/batfish/coordinator/WorkQueueMgr.java 70.93% <0.00%> (-0.59%) ⬇️
... and 2 more

Copy link
Contributor

@corinaminer corinaminer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @dhalperi)

@dhalperi dhalperi merged commit 27b636e into batfish:master Jun 4, 2021
@dhalperi dhalperi deleted the named-rib-fix branch June 4, 2021 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants