aboutsummaryrefslogtreecommitdiffstats
path: root/common-logging/src/main/java/org/onap/policy/common/logging
AgeCommit message (Collapse)AuthorFilesLines
2019-12-06Minor changes for new Eclipse checkstyle checksliamfallon3-34/+33
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. logging pattern in logback.xml files amended to be less than 120 characters. Test case added for checking parameter is valid. Issue-ID: POLICY-2204 Change-Id: Id7293e44b56c225afc6290e1c599603e9ebedb19 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-07-08Replace ONAP-logging getters/setters with lombokJim Hahn1-24/+0
Added lombok annotations to EvenData, but forgot to remove the get/set methods. Change-Id: I4dc21fdf1e57e2d326a122ddebe10ef99a9b2638 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-05Fix sonar issues in policy ONAP loggingJim Hahn17-633/+538
Sonar fixes, other than code coverage. These changes are disruptive and will likely cause breakage in a number of policy repos. Renamed constants. Moved constants/factories from interfaces to classes. Also fixed remaining checkstyle issues, which was equally disruptive, as it required renaming of methods and classes. Split out Onap config properties from EELF config properties, in case changes are made in the future such that Onap properties can no longer subclass from EELF properties (e.g., if EELF properties are converted from a interface to a utility class with a private constructor). Attempted to eliminate some duplicate blocks of code by refactoring out common methods. Change-Id: Ie038d2d4ed553037a9af3f0ddf31baf2b3628fa3 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-13More sonar fixes in policy/commonJim Hahn1-55/+59
Note: this does not increase code coverage, but should fix other code issues. Resolved cyclomatic complexity issue in ParameterValidationResult. Refactored duplicate code in GroupValidationResult. Removed IOException from NetworkUtil "throws". Replaced null/empty string tests with StringUtils.isBlank(). Added @FunctionalInterface where needed. Replaced anonymous classes with lambda expressions. Replaced duplicate strings with a constant. Added private constructors for utility classes. Removed sleep() from tests. Removed unused parameter from method call. Made some protected methods private. Compute integrity monitor's state-transition table once. Use for-loop instead of iterator. Moved constructors. Fixed some checkstyle issues (tabs => spaces, trailing spaces). Change-Id: I9a962ca45c4ff3f212c6014da799d06f07b232ef Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-08-14Fixes for checkstyle issuesPamela Dragosh2-3/+3
More fixes for spacing, adding comments, adding period at the end, and move code closer to usage. Issue-ID: POLICY-881 Change-Id: Ife99eaf627a221e87d65d24dfd145b0ee4e06d21 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-06-21PropertyUtil: remove sleep when running junit testJim Hahn1-15/+9
Update licenses. Remove uneeded dependencies. Make "timer" field private. Make LazyHolder protected. Add comment to TestListener. Combine copyright lines. Change-Id: I77c198c9bc6c224fa93ef74d0c56aa73b187e169 Issue-ID: POLICY-908 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-03-20Removed checkstyle warningsmmis24-4090/+4219
Removed checkstyle warnings in policy/common/logging Some warnings remain that required renaming of classes and public methods. These will be taken separately Issue-ID: POLICY-695 Change-Id: Id604c66708917de390c556b50f6266f929b09134 Signed-off-by: mmis <michael.morris@ericsson.com>
2018-02-27Added junit tests in ONAP-Loggingmmis5-112/+19
Added junit tests to org.onap.policy.common.logging.flexlogger package in ONAP-Logging Issue-ID: POLICY-582 Change-Id: I024f990960fa71bff7655da9c2cd5dd0db8ee33c Signed-off-by: mmis <michael.morris@ericsson.com>
2018-02-23Added junit tests in ONAP-Loggingmmis2-72/+48
Added junit tests to org.onap.policy.common.logging.eelf package in ONAP-Logging Issue-ID: POLICY-582 Change-Id: Ifca9c38d8b8703b183c25d891d6ed257eb21c91b Signed-off-by: mmis <michael.morris@ericsson.com>
2018-02-20Increase junit coverage in ONAP-loggingJim Hahn9-92/+88
Added some junit tests to increase coverage of ONAP-logger. Many classes still need test cases. Also fixed some sonar issues: Returned interface instead of ConcurrentHashMap. Used EnumMap instead of HashMap. Used StringBuilder instead of StringBuffer. Replaced literals with constants. Replaced enum1.toString().equals(enum2.toString()) with enum1 == enum2 Updated license dates. Updated another license date. Change-Id: I777b6a913d7d03187a29dfeb817800b386ee23aa Issue-ID: POLICY-582 Signed-off-by: Jim Hahn <jrh3@att.com>
2017-12-04Fix sonar issues in ONAP-loggingCharles Cole12-214/+219
Fixed the Sonar issues in ONAP-logging that required minimal refactoring of the code. Many of the System.out and System.err issues I did not fix, as I don't know what loggers to use. Issue-ID: POLICY-458 Change-Id: I8eccb932b350a170b9cd680b90009e6612a0abcd Signed-off-by: Charles Cole <cc847m@att.com>
2017-09-21Redundant code removal and hadrcoded stringsBharat saraswal6-300/+289
Issue-Id:POLICY-252 Change-Id: I839811ba15d0c478c83c03818087d3153b77ddb1 Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
2017-09-20Redundant code removal and hadrcoded stringsBharat saraswal1-481/+488
Issue-Id:POLICY-252 Change-Id: Ibf8b6790cbf9f65f1d3b3fc4476f686ff8981a10 Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
2017-09-19Remove sonar critical for public staticPamela Dragosh4-19/+59
I think that making these private and using accessor functions we can remove the sonar critical for them. Issue-ID: POLICY-237 Change-Id: I4edbf909935fe17b0ef087b5cd0e384d78d104d6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2017-08-14fix resource path bug from package renamingJorge Hernandez1-1/+1
Change-Id: I599fd087c803d062ed6fe1145bf0526fdd29d723 Issue-ID: POLICY-71 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-04[POLICY-98] Code cleanup for sonar issues.Magnusen, Drew (dm741q)14-160/+86
Modified code in ECOMP-Logging to resolve critical/major sonar issues. Not all issues were resolved as some guidance needs to be provided for specific cases. Restored config/policyLogger.properties file. It was modified by a junit test. Change-Id: I49fee98b2497d9d503d81bbbacbb1b416e1058a7 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-08-01[POLICY-134] Fixed bug in PolicyLogger.Magnusen, Drew (dm741q)1-9/+1
PolicyLogger.info(Object arg0) calls itself recursively until it eventually causes a stack overflow error. Fix is to call debugLogger.info(MessageCodes, String) from within PolicyLogger.info(Object). Additionally, PolicyLogger.info(String arg0) was removed as debugLogger.info(MessageCodes, String) can be called directly. Change-Id: Id141027b544efa06b79f54a6726843b2a47481b9 Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
2017-07-31[POLICY-71] replace openecomp for policy-commonGuo Ruijing25-0/+5707
Change-Id: I3241f5d1f0234043b4dff718eda1ffdc48052276 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com> Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>