Move checkNotSealed() to addBuilder() 51/81251/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Mar 2019 10:22:55 +0000 (11:22 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 28 Mar 2019 11:02:32 +0000 (12:02 +0100)
commit35fe9a2bb63d451d820707f5142349539334a7ad
tree6620cc525a2ca84aba76e538407a36f3624f6608
parentb62499730040256c5be1539f409f4a98b557099e
Move checkNotSealed() to addBuilder()

addBuilder() is called after previous check for seal from all callers,
who do not have any side-effects aside allocating arguments to
addBuilder().

Move the call to checkNotSealed() to addBuilder(), making the code
more straightforward and possibly preventing bugs from creeping in.

JIRA: CONTROLLER-1887
Change-Id: I127385378957deb7f38f1203870a0e52cd630644
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/datastore/node/utils/transformer/NormalizedNodePruner.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.