aboutsummaryrefslogtreecommitdiffstats
path: root/feature-server-pool/src/main/java/org/onap
AgeCommit message (Collapse)AuthorFilesLines
2020-09-18Fix more sonars in feature-server-poolJim Hahn8-32/+57
Addressed the following sonars: - move fields from "interface" to "class" - don't always return the same value - remove commented-out code - make constants "final" - don't synchronize on parameters Issue-ID: POLICY-2546 Change-Id: If2d410664d956a7efabf3a4dbef96bbf7d24de5e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-31Fix more sonars in drools-pdpJim Hahn4-40/+49
Fixed more sonars in drools-pdp: - remove commented code - don't throw generic Exception - unused field (made it protected instead of private) - log conditionally - cognitive complexity - too many break/continue - return empty list instead of null - Random() is not secure Fixed more eclipse warnings: - parameterize generic types Issue-ID: POLICY-2616-sonars3 Change-Id: Ia5ad769b2ea763568cfae3d81807926d89153b09 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-28Fix sonars in server-poolJim Hahn8-345/+473
Addressed the following sonars in feature-server-pool: - re-interrupt after catching an InterruptException - reduce cognitive complexity - cognitive complexity - not enough arguments for logger message - use UnaryOperator instead of Function - update static fields via static methods - too many break/continue in for-loop Also fixed some Eclipse warnings: - add parameter to generic types - useless assignments - newInstance() has been deprecated - close streams Issue-ID: POLICY-2616 Change-Id: Ibf6c20e6c2a7eb8c60e1b38f388d86a0f9b8804b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09sonar fix for server poolTaka Cho3-25/+24
- move to a method for nest try and catch - fixed some typos in comments - use constant for the same String - boolean method should be checked - removed unnecessary exceptions Issue-ID: POLICY-2616 Change-Id: I647ee095171feedfd44ca6967676f61842c2c91b Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-07-06Merge "sonar fix for TargetLock"Jorge Hernandez1-20/+19
2020-07-06sonar fix for TargetLockTaka Cho1-20/+19
- duplicating strings to constant - to not log tainted, user-controlled data. Issue-ID: POLICY-2616 Change-Id: Iaa9dd9f9ef839cec58ae60d8464b889a02b8ddb5 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-07-02drools-pdp sonar fixTaka Cho1-2/+1
most of changes are assert statement Issue-ID: POLICY-2616 Change-Id: I3bd3076115d28d8cfabcbe0859cc4b21085e1394 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-30sonar fix for feature server poolTaka Cho2-50/+67
- reduce cognitive complexity - return a boolean value - Replace this lambda with a method reference - use lombok annotation @EqualsAndHashcode - removed unnecessary exception Issue-ID: POLICY-2616 Change-Id: Ia0c300c2909bbdd232f2a3c758a5709b70f06d1c Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-29Merge "Clean up of Pair classes - drools-pdp"Jim Hahn1-4/+5
2020-06-29Merge "sonar fix - FeatureServerPool"Jim Hahn1-10/+5
2020-06-29Clean up of Pair classes - drools-pdpwaynedunican1-4/+5
Removed Pair class from drools-pdp and replaced with Apache Common Pair class Issue-ID: POLICY-2202 Change-Id: Ica2a5b734fb6eebfc0713027c1c4dc3b8d3882c8 Signed-off-by: waynedunican <wayne.dunican@est.tech>
2020-06-26Merge "replace an emptyArray and computeIfAbsent instead"Ram Krishna Verma1-24/+13
2020-06-26replace an emptyArray and computeIfAbsent insteadTaka Cho1-24/+13
- 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>
2020-06-26sonar fix - FeatureServerPoolTaka Cho1-10/+5
- sonar thinks one block of comments are code, so changed some syntax in comments - not more than one break or continue statement Issue-ID: POLICY-2616 Change-Id: Ia35b73584f5a8492320c4beaa069ba7f903ce268 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-26feature server Keyword sonar fixTaka Cho1-10/+15
- remove unnecessary cast - A "NullPointerException" could be thrown; "last" is nullable here - regexp method name - remove curly braces and 'return' Issue-ID: POLICY-2616 Change-Id: Icd6ab0cf1f77cdc8cf1bffb3ae2781702add9ab5 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-24fix sonar issue - feature-serverTaka Cho2-17/+18
- A field should not duplicate the name of its containing class - Invoke method(s) only conditionally - add equals and hashcode - some leftover changes for %n Issue-ID: POLICY-2616 Change-Id: Icc094c17245e6a163d1158d97890579d76b84aec Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-23Merge "need Override equals and hashCode method"Pamela Dragosh1-0/+17
2020-06-23Merge "fix sonar - feature-server"Pamela Dragosh1-5/+5
2020-06-23fix sonar - feature-serverTaka Cho1-5/+5
%n is portable across platforms \n is not. Issue-ID: POLICY-2616 Change-Id: I6daa827b93384c8b25dcb58b87fff116d09a2176 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-22need Override equals and hashCode methodTaka Cho1-0/+17
Use eclipse to generate those two Overrides in order to avoid sonar issue Issue-ID: POLICY-2616 Change-Id: If7e887b99fa44dac5ac5fa6f8c8cfe677238576d Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-22reduce sonar issue - feature-serverTaka Cho1-23/+21
Remove useless curly braces around statement Rename the method name change to '<>' Issue-ID: POLICY-2616 Change-Id: I679ce7e44b1a8c2c30f78820c12f91f18e5aa944 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-22removed unused methods parameterTaka Cho2-3/+2
Unused parameters are misleading. Whatever the values passed to such parameters, the behavior will be the same. Issue-ID: POLICY-2616 Change-Id: I9a595dca81ce061846fa53adf8086130ffd31a74 Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-19Address checkstyle version issues in drools-pdpJim Hahn13-134/+135
Also added serializationId to several classes to address eclipse warnings. Issue-ID: POLICY-2188 Change-Id: I3df5e8abaad8da9261c0d5cd19a93ed68dceb870 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-18equals and hashCode should be overridden in pairsTaka Cho1-18/+2
hashCode should be overridden in pairs. followed by Effective Java: You must override hashCode() in every class that overrides equals(). Failure to do so will result in a violation of the general contract for Object.hashCode(), which will prevent your class from functioning properly in conjunction with all hash-based collections, including HashMap, HashSet, and Hashtable. Issue-ID: POLICY-2616 Change-Id: I2b29722daab5c520547397aae68d8ebaa71b2c4b Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-06-10reduce sonar issue - drools-pdpTaka Cho3-9/+8
remove unused import rename the method name Issue-ID: POLICY-2616 Change-Id: I15845159063ec5fa3cfb34a59b9c433ba3201ccc Signed-off-by: Taka Cho <takamune.cho@att.com>
2020-05-15Reduce Sonar complaints in 'feature-server-pool'Straubs, Ralph (rs8887)12-1098/+1149
Issue-ID: POLICY-2546 Change-Id: Ibddde78d705349b3c8510678f25dfce817b1a091 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>
2020-03-04Add feature-server-pool to the ONAP drools-pdp repository.Straubs, Ralph (rs8887)15-0/+11361
Issue-ID: POLICY-2351 Change-Id: I8ddde547a73a51c04c8dd9f1d66232e8281599a9 Signed-off-by: Straubs, Ralph (rs8887) <rs8887@att.com>