aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src/main/java/org/onap/policy/common/utils/validation/Version.java
AgeCommit message (Collapse)AuthorFilesLines
2021-05-06Fix sonars in policy-commonJim Hahn1-5/+4
Fixed sonars: - use "var" instead of actual type name - re-interrupt threads - use rej2 split() instead of String split() Issue-ID: POLICY-3285 Change-Id: I82261e0b8a53ee5c5264556fbf5cec37454f014e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-18Changes for checkstyle 8.32liamfallon1-2/+1
Issue-ID: POLICY-2188 Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-04-06Address sonar issues in commonJim Hahn1-3/+3
Addressed the following sonar issues: - missing assertion in junit test case - disable sonars about setAccessible() as it's required for jackson emulation - sleep in junit - don't use wild-cards (e.g., "*") with java.util Pattern - use re2j instead of java.util Pattern - use String methods (e.g., startsWith()) - duplicate method bodies - duplicate code in Coder classes - string concatenation in logger calls - UTF-8 encoding - return primitive instead of boxed primitive - add assertion to tests - renamed support methods from doTestXxx to verifyXxx - cognitive complexity - use AtomicRef instead of volatile - use specific Functionals (e.g., IntConsumer) - function always returns the same value - serializable vs transient Issue-ID: POLICY-2305 Change-Id: I08eb7aa495a80bdc1d26827ba17a7946c83b9828 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-29Fix sonar issue with double compare4.0.0-ONAP1.4.0Jim Hahn1-20/+20
The gson code to convert Double to Long/Integer use a direct comparison of the original double with a long. However, sonar does not like that so changed the code to use the Double.compare() method instead. Also fixed sonar issue with diamond operator. Addressed some sonar issues in ServiceManager. Addressed some sonar issues in Version. Change-Id: I0959603918d251db671e87e12c295c6ec911f427 Issue-ID: POLICY-1707 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-04-05Add string constructor to Version classliamfallon1-12/+30
Issue-ID: POLICY-1095 Change-Id: Ib0d2c778f3e8dc5e52369e43b98249ed426fc14a Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-04-04Add semantic version comparable classliamfallon1-0/+113
Class written by Jim Hahn that implements Comparable for comparing semantic versions. Lifted from policy models pap. Issue-ID: POLICY-1095 Change-Id: Ie8c5f9066c06cb569085e1390b3de3e4aa580267 Signed-off-by: liamfallon <liam.fallon@est.tech>