Make AuthorizedKeysDecoder thread-safe 00/110100/1
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 31 Jan 2024 11:17:51 +0000 (12:17 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 31 Jan 2024 11:19:59 +0000 (12:19 +0100)
commite589f5691e8a1cbec2709ea305aba6d2360c77c4
tree9c511dd5b8386b08d4c8fce1c7258c6cd480b3c5
parent1f59826c4be7e2afd3463eec1467184ba0006483
Make AuthorizedKeysDecoder thread-safe

AuthorizedKeysDecoder is mutating state of a single instance, which is
counter-intuitive and leads to the last decoded key to be left present
in the instance.

Fix this by making the deconding method static and keeping the instance
an internal thing, closing the leak and making the decoding process
inherently thread-safe.

Change-Id: I000b100773d206aee6b0e4f634f7d46a8b56544e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/AuthorizedKeysDecoder.java
apps/callhome-provider/src/main/java/org/opendaylight/netconf/callhome/mount/CallHomeMountSshAuthProvider.java