Use well-known Status enumeration 10/97110/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 9 Aug 2021 13:08:01 +0000 (15:08 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 9 Aug 2021 14:51:22 +0000 (16:51 +0200)
commitfa330598e44f7cd9a49d6ef36e678efb9209a59f
tree86be8d088a94167bfd40d238c889b5c761f2b91c
parent7d5a34025ecc445ad99b6d78f8eaa11d4a6a27ac
Use well-known Status enumeration

Response.status() can be used with an int, but that ends up walking all
Status.values() in an attempt to find the corresponding constant. While
we end up hitting the first element, use Status.OK explicitly to speed
things up a bit.

Change-Id: I7c72a88602c95ec4c7274369a9e5c613c3ce3b9b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit fdf3ba286a9fd8312abf6e4e5547fe8004987d61)
restconf/restconf-nb-rfc8040/src/main/java/org/opendaylight/restconf/nb/rfc8040/rests/services/impl/RestconfDataServiceImpl.java