commit | 15014b8ca386a8bfd5c26435f45de94ca06e95e8 | [log] [tgz] |
---|---|---|
author | Jim Hahn <jrh3@att.com> | Mon Apr 06 15:33:23 2020 -0400 |
committer | Jim Hahn <jrh3@att.com> | Mon Apr 06 19:30:02 2020 -0400 |
tree | 3cca518b950dfa35da0ea64dab2f9ff2b80f4595 | |
parent | ece155048af47ea83ff898c999aa5137dc99a988 [diff] |
Address sonar issues in drools-pdp Addressed the following sonar issues: - add "final" to public static fields - commented code; some were bogus - just updated the comments so sonar is happy - use "{}" instead of string concatenation - junit should assert something - when using logger, invoke compute-intensive tasks conditionally - use superclass name instead of subclass name to access static fields - don't always return the same value - remove "transient" from fields of classes that aren't Serializable - don't nest try/catch blocks - use appropriate class name in Logger.getLogger() - use Predicate<T> instead of Function<T,Boolean> - remove unused parameters from private methods - either log or throw - remove duplicate methods - use remove() TLS instead of set(null) - null check is implicit in instanceof check - do something with return value - don't use volatile - don't return "null" list; used Optional instead - add no-arg constructor to non-Serializable superclass - add callSuper=true for EqualsAndHashCode - don't declare "throws XXX" where XXX is a subclass of RuntimeException - remove serialVersionUID field if the class isn't Serializable Also addressed some eclipse warnings: - unused fields - suppress generic typic cast warnings Issue-ID: POLICY-2305 Change-Id: I906d5bf71c1f86531423e23b3667a585cdba45e1 Signed-off-by: Jim Hahn <jrh3@att.com>
Copyright 2018 AT&T Intellectual Property. All rights reserved. This file is licensed under the CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE Full license text at https://creativecommons.org/licenses/by/4.0/legalcode
This source repository contains the ONAP Policy DroolsPDP code. To build it: