Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Sho SHIMIZU
2016-05-13 13:09:50 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
860bb539411ad556f74da023a8aac989556872d6
860bb539
1 parent
a7e32778
Refactor: Simplify if-statement
Change-Id: I869b6a6e9f85422262dd7dbd3884534dcc7affb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java
core/store/dist/src/main/java/org/onosproject/store/resource/impl/TransactionalContinuousResourceStore.java
View file @
860bb53
...
...
@@ -191,11 +191,7 @@ class TransactionalContinuousResourceStore {
ImmutableList
<
ResourceAllocation
>
finalAllocations
=
Stream
.
concat
(
nonMatched
.
stream
(),
matched
.
stream
()).
collect
(
GuavaCollectors
.
toImmutableList
());
if
(!
consumers
.
replace
(
resource
.
id
(),
oldAllocation
,
new
ContinuousResourceAllocation
(
oldAllocation
.
original
(),
finalAllocations
)))
{
return
false
;
}
return
true
;
return
consumers
.
replace
(
resource
.
id
(),
oldAllocation
,
new
ContinuousResourceAllocation
(
oldAllocation
.
original
(),
finalAllocations
));
}
}
...
...
Please
register
or
login
to post a comment