Replace static methods with single getInstance 18/79118/3
authorJim Hahn <jrh3@att.com>
Mon, 25 Feb 2019 16:36:23 +0000 (11:36 -0500)
committerJim Hahn <jrh3@att.com>
Mon, 25 Feb 2019 17:47:32 +0000 (12:47 -0500)
commit6329d5933f064f9418b300ef87235681fabd717d
tree1f8a914b40a385110dc4fd1998685156d375dee2
parent92eabbc64c1ea6f6bfe6df979ccc487e99e806be
Replace static methods with single getInstance

Some of the PAP classes use a number of static methods.  These have
been modified to use regular, non-static methods, a single static
method, getInstance.
Also modified PapStatisticsManager so its methods are thread safe.
Changed "instance" to "current" for the activator, as it may be changed.
Fix new checkstyle issues.
Updated copyrights.
Renamed test class to be consistent.
Added test for getCurrent/setCurrent and isAlive.

Change-Id: Id6df55fa4c116852032ad61f80f899fcd292f864
Issue-ID: POLICY-1444
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pap/main/rest/HealthCheckProvider.java
main/src/main/java/org/onap/policy/pap/main/rest/PapStatisticsManager.java
main/src/main/java/org/onap/policy/pap/main/rest/StatisticsProvider.java
main/src/main/java/org/onap/policy/pap/main/startstop/Main.java
main/src/main/java/org/onap/policy/pap/main/startstop/PapActivator.java
main/src/test/java/org/onap/policy/pap/main/rest/TestPapRestServer.java
main/src/test/java/org/onap/policy/pap/main/rest/TestPapStatisticsManager.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java