replace an emptyArray and computeIfAbsent instead 80/109580/7
authorTaka Cho <takamune.cho@att.com>
Thu, 25 Jun 2020 16:10:00 +0000 (12:10 -0400)
committerTaka Cho <takamune.cho@att.com>
Fri, 26 Jun 2020 14:54:27 +0000 (10:54 -0400)
commit927d8e01915733baa86e0fb9842d29487265817e
treee077ac2a0764dad6a2e2655bc702a30e9c3e46e8
parent69564b4c19a8c890ef7a11344abd246f90af2506
replace an emptyArray and computeIfAbsent instead

- some methods should return an empty array.
- avoid the result of a java.util.Map.get()
  against null before proceeding with adding
  or changing the value in the map.
- Declaring a variable only to immediately
  return or throw it is a bad practice.

Issue-ID: POLICY-2616
Change-Id: I21a55c5ea716d8f64dc9155f84cabcfbcf5a22e0
Signed-off-by: Taka Cho <takamune.cho@att.com>
feature-server-pool/src/main/java/org/onap/policy/drools/serverpool/TargetLock.java