Clarify NotificationQueryParams checks 44/108344/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 6 Sep 2023 17:20:45 +0000 (19:20 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 11 Oct 2023 08:42:11 +0000 (10:42 +0200)
commit39653430546f808004f20c988c4b1c7f637106b9
tree9ba94042224cb12419444523f8c457e6ea653376
parentf1182f215f10bc570ce28977d708f42d3b4613e8
Clarify NotificationQueryParams checks

Using checkArgument() involves logical negation of the condition with
respect the message. This can get quite daunting when trying to
understand.

Switch to using plain if() statements, which make the logic much
clearer.

Also tie the messages to uri names, so users get clearer guidance.

Change-Id: I659921075fe3c9e4e234a86bceba24a771a1cf89
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit 6b828e1710315104da40e750cc0c85593183bc68)
(cherry picked from commit 0ba2548351b626286902fcaadf87af838e6433cd)
(cherry picked from commit 024ef99ebba00f5f755f5ad30fd2c01376ca050e)
restconf/restconf-nb/src/main/java/org/opendaylight/restconf/nb/rfc8040/NotificationQueryParams.java