Jim Hahn [Fri, 21 May 2021 21:31:02 +0000 (17:31 -0400)]
Fix sonar duplicate code issue
Issue-ID: POLICY-3284
Change-Id: I78c3a8ac92e18e2b0088eb07e27a4e97866d6182
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 7 May 2021 19:35:55 +0000 (15:35 -0400)]
Change java.util.regex to re2j
Sonar complains about java.util.regex. Thought I used re2j when
creating all of the patterns, but apparently not. Fixed that oversight.
Issue-ID: POLICY-3284
Change-Id: Idbec112ab0d4c3b477ce357f8a556d95e4dea083
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 6 May 2021 15:28:53 +0000 (11:28 -0400)]
Fix sonars in policy-common
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>
Jim Hahn [Mon, 26 Apr 2021 21:41:25 +0000 (17:41 -0400)]
Remove GroupValidationResult
Removed GroupValidationResult, replacing it with BeanValidationResult.
Modified the ParameterGroup subclasses to use BeanValidator, adding
annotations where needed to trigger the validations that had been
automatically performed by GroupValidationResult.
Added Size annotation, used to verify minimum lengths of maps and
collections.
Added ClassName annotation, used to verify that a property contains the
name of a class that is actually in the classpath.
Added another addResult() method to make it easier when replacing calls
to GroupValidationResult setResult() method with BeanValidationResult.
Issue-ID: POLICY-2059
Change-Id: Id4da24886908723006624c5d53edeb034102299d
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Tue, 13 Apr 2021 17:16:58 +0000 (17:16 +0000)]
Merge "Revert "Modify StandardCoder to handle empty source""
Jim Hahn [Tue, 13 Apr 2021 15:31:48 +0000 (15:31 +0000)]
Revert "Modify StandardCoder to handle empty source"
This reverts commit
04623fef95f2b164d79ad48de2ef3708d02eda80.
Reason for revert: prefer consistency with gson
Issue-ID: POLICY-3172
Change-Id: Ic2501abcc68ec1186142a7e520e7985c43fd3315
Signed-off-by: Jim Hahn <jrh3@att.com>
adheli.tavares [Fri, 9 Apr 2021 10:51:05 +0000 (11:51 +0100)]
Add command line handler
Added a Handler for command line classes to share common strucutures.
Issue-ID: POLICY-3128
Change-Id: I662911c467faf5c39b8db018bb1a564fba7587a6
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Jim Hahn [Wed, 7 Apr 2021 20:23:10 +0000 (16:23 -0400)]
Modify StandardCoder to handle empty source
Currently, if the source string or source file is empty, the
StandardCoder just returns null. Modified it to throw an exception in
those cases. However, if the string reference is null, it will still
return null.
Issue-ID: POLICY-3172
Change-Id: Ie7d5e1b0328a24d94a75af8d18a341faebbe5d5f
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 25 Mar 2021 17:52:02 +0000 (13:52 -0400)]
Use self-signed-cert property for HTTP clients
Currently, the HttpClient code sets self-signed-certs to true whenever
https is specified. This is insecure. Modified the code to set the
value based on the property, defaulting to false.
Issue-ID: POLICY-3145
Change-Id: Ie88cf2411ae44a7c53bc8943f615a74c5b87d1aa
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 17 Mar 2021 22:55:15 +0000 (18:55 -0400)]
Add utility to generate keystore for testing
Added a class that will generate a keystore containing a self-signed
certificate.
Issue-ID: POLICY-3147
Change-Id: I25e7307c2e73dbacae24c8fce616bf2ada93df9f
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 12 Mar 2021 22:07:34 +0000 (17:07 -0500)]
Remove more unnecessary plugins from common
Issue-ID: POLICY-3126
Change-Id: I2f39e14c9cea0ec58709e24995aab536f2df7990
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 8 Mar 2021 19:28:10 +0000 (14:28 -0500)]
Address plugin-not-found issues
Removed references to archetype-packaging and lifecycle-mapping, where
unnecessary due to pom inheritance.
Issue-ID: POLICY-3126
Change-Id: Ie31edcb7ae31e1bb495904fce2c8ed56d9bf10f5
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 10 Mar 2021 19:27:32 +0000 (14:27 -0500)]
Bump version to 1.9.0 in common
Issue-ID: POLICY-3105
Change-Id: I1fd654fef96a1e41f150ea13baf39acc882f6bb2
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Wed, 24 Feb 2021 14:52:26 +0000 (09:52 -0500)]
Update info.yaml in common
Issue-ID: POLICY-3028
Change-Id: Id67f1f5205fe0522b8f909015a7cf503d82a585c
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Tue, 23 Feb 2021 13:30:23 +0000 (08:30 -0500)]
Bump version to 1.8.1-SNAPSHOT in common
Issue-ID: POLICY-3088
Change-Id: I1cc2d1d26c337d67b0ecadd852e43b603902415e
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 22 Feb 2021 22:30:54 +0000 (17:30 -0500)]
Release artifacts 1.8.0 of common
Issue-ID: POLICY-3088
Change-Id: I2419754fc055bb350ebb9299a69c5e2d81fac173
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 22 Feb 2021 21:03:13 +0000 (16:03 -0500)]
Point to non-snapshots in common
Issue-ID: POLICY-3088
Change-Id: I3b3afdc15fb006c6b5fc6b223aa4d3ff6f112f31
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 18 Feb 2021 22:15:07 +0000 (17:15 -0500)]
Remove duplicate code from type adapters
Extracted a common superclass, StringTypeAdapter, out of the gson type
adapter classes.
Issue-ID: POLICY-2914
Change-Id: I4bbd2a6e8372e7f42c4952ba9ff03eed97473fb2
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Thu, 18 Feb 2021 15:57:23 +0000 (09:57 -0600)]
Add more java.time adapters
The time extensions require these adapters for anyone using our
gson adapter to serialize/deserialize the DecisionRequest.
Issue-ID: POLICY-2810
Change-Id: I64a7e4a5a256c77bd67dab867664e41b61cd0050
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Fri, 12 Feb 2021 15:06:27 +0000 (10:06 -0500)]
Make gson type adapters more generic
Enhanced ZonedDateTime adapter so a date format string can be provided.
Simplified InstantAsMillis adapter.
Issue-ID: POLICY-2905
Change-Id: Ic4ddba19391b165d6a7528ce18c22541d12324c7
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 11 Feb 2021 21:13:32 +0000 (16:13 -0500)]
Fix sonars from depeendency upgrade
The dependency upgrades in policy-parent caused some new sonars. In
particular, initMocks() has been deprecated - replaced with calls to the
Mockito Runner.
Issue-ID: POLICY-2914
Change-Id: Iaf10f676c380adb9785e836cb15792596b378e4e
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 10 Feb 2021 19:23:02 +0000 (14:23 -0500)]
More sonar issues in common
Addressed the issues:
- use of eq() in verify()
- remove @NamedQueries
- use computeIfAbsent()
Issue-ID: POLICY-2914
Change-Id: I265bc98f0f326e7b4ce86c25e68fc4859bd7fb02
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 4 Feb 2021 22:12:46 +0000 (17:12 -0500)]
Remove javax.persistence dependency
Running into a dependency collision between two eclipselink jars. Turns
out, we don't actually need to include the javax.persistence dependency,
so removed it altogether.
Issue-ID: POLICY-3005
Change-Id: I5f09ddc27cdaa329b4604e6c715879d52335f870
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Sat, 16 Jan 2021 09:06:21 +0000 (09:06 +0000)]
Add policy-clamp to policy Message constants
policy-clamp is now a valid component inthe policy framework and should
be added to the message constants in policy common.
Issue-ID: POLICY-2971
Change-Id: Iead3d4f854057c8e968d62928026b74c41bc1346
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Thu, 7 Jan 2021 15:03:30 +0000 (10:03 -0500)]
Deprecate old validation annotations
Removed @Items and @Entries validation annotations, as they are no
longer needed.
Issue-ID: POLICY-2648
Change-Id: I68b78738d520ad96175567572e3c2f4a845dae44
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 6 Jan 2021 16:15:45 +0000 (11:15 -0500)]
Support annotations on parameterized types
It appears that java.validation allows validation annotations to be used
on the type parameters of Collection and Map classes. Updated the
validation code to support that. Once policy-models has been updated to
use this approach, the original @Items and @Entries annotations will be
deprecated.
Issue-ID: POLICY-2648
Change-Id: Ic953be485ebafc9869f72407518f6549585353c9
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 4 Jan 2021 17:11:32 +0000 (12:11 -0500)]
Update junits for Validation
The Validation code was previously refactored. Added/updated junits
correspondingly.
Issue-ID: POLICY-2648
Change-Id: I570c0ec692ecfcb6e69ada45f7997f6e63735ea0
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 18 Dec 2020 20:53:20 +0000 (15:53 -0500)]
Make validators extensible
Modified the validator to make it extensible. Also added annotations
to:
- cascade a validation to a sub-object
- perform regex
- examine items in a list
- examine entries in a map
Still need more junit tests.
Issue-ID: POLICY-2648
Change-Id: I94f1b9e8fbf7a6b9b002d0b05cc9119bdfcf8bf2
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 14 Dec 2020 16:36:50 +0000 (11:36 -0500)]
Convert YAML Double to Integer/Long
When a YAML number is decoded directly to type Object.class using the
decode() or fromJson() methods of the StandardYamlCoder, the number is
left as a Double. It should be converted to an Integer or Long, where
possible.
Issue-ID: POLICY-2900
Change-Id: I7707ac5c54167cbc3a4b23985c6e5fa1a507324e
Signed-off-by: Jim Hahn <jrh3@att.com>
a.sreekumar [Fri, 4 Dec 2020 11:04:10 +0000 (11:04 +0000)]
Fixing sonar issues in policy-common
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7
Issue-ID: POLICY-2914
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Jim Hahn [Mon, 30 Nov 2020 19:34:29 +0000 (14:34 -0500)]
Generalize LocalDateTimeTypeAdapter
The GSON DateTime type adapter uses a hard-coded formatter. Generalized
it to allow a different formatter to be provided to the constructor.
Issue-ID: POLICY-2903
Change-Id: Icdd51190f465bc4c73cd593d6d1b2003165a4b60
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 6 Nov 2020 13:14:51 +0000 (08:14 -0500)]
Fix upcoming checkstyle issues
When we upgrade to oparent, these will fail as oparent upgrades
to 8.37 of puppycrawl which fixes a few bugs that should have
flagged these previously.
Issue-ID: POLICY-2887
Change-Id: I5618ce67d84e94321f884ed6d929c05fc33a0b3d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Thu, 29 Oct 2020 20:07:19 +0000 (16:07 -0400)]
Remove server-side filtering from policy-endpoints
ONAP DMaaP Message Router no longer supports server-side filtering.
Removed it from policy-endpoints.
Issue-ID: POLICY-2881
Change-Id: I08157f7699608af63992dec78a61c5f9c55037b9
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 29 Oct 2020 19:12:23 +0000 (15:12 -0400)]
Include jackson jar in policy-endpoints
Issue-ID: POLICY-2878
Change-Id: Ibfe4c220c7b15bb0b752537d080481350a1332e4
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 28 Oct 2020 20:22:01 +0000 (16:22 -0400)]
Fix sonar security issue in CryptoUtils
Sonar reports that CryptoUtils is using AES with CBC, which is known
to be insecure. Switched to "AES/GCM/NoPadding".
Note: values in any property files using encryption or the "enc:"
prefix will have to be re-encrypted.
Issue-ID: POLICY-2801
Change-Id: I41f00d4f3ee67a00b92135150120d1faa621655a
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 27 Oct 2020 17:26:59 +0000 (13:26 -0400)]
Bump common master to 1.8.0 SNAPSHOT
Bumping minor version now that guilin branch has been created.
Issue-ID: POLICY-2875
Change-Id: Id812dfd1406f8567a17ce4037eaa8cf8e7e4be26
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 30 Sep 2020 21:31:34 +0000 (17:31 -0400)]
Fix more sonars in policy/common
Addressed the following sonar issues:
- extract common test methods
Issue-ID: POLICY-2650
Change-Id: I0b27c83d7bbe3d5fe83859b189c37507aabe7489
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Wed, 30 Sep 2020 16:41:42 +0000 (12:41 -0400)]
Skip sonar in common utils-test
sonar.tests didn't work, so just switching to sonar.skip, because
utils-test is not used in production code.
Issue-ID: POLICY-2650
Change-Id: I67bf9abda724944e080bbbf3a9bdc108dbd629c8
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 28 Sep 2020 18:37:44 +0000 (14:37 -0400)]
New sonars in policy-common
Addressed the following sonars:
- too many assertions in a test case
- use parameterized test method
Disabled production sonars for util-test, as the entire module is only
used for testing other modules.
Issue-ID: POLICY-2650-sonar
Change-Id: If49775a6c95855dcd9601ee0d833bb00741b1550
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 8 Sep 2020 15:08:56 +0000 (11:08 -0400)]
Bump common to 1.7.2
Issue-ID: POLICY-2789
Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 8 Sep 2020 13:46:53 +0000 (09:46 -0400)]
Release common 1.7.1
Issue-ID: POLICY-2789
Change-Id: Ifbbf7eadca68892254acabcecbb3710a0de41aff
Signed-off-by: Jim Hahn <jrh3@att.com>
a.sreekumar [Fri, 14 Aug 2020 10:24:10 +0000 (11:24 +0100)]
Adding common success/failure messages for policy components
Change-Id: Ic1b0a3b467fd9e4f65b2e12d9f6ed33e38e4f44d
Issue-ID: POLICY-2755
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
Jim Hahn [Tue, 28 Jul 2020 18:04:18 +0000 (14:04 -0400)]
Update INFO.yaml in policy-common
Verified with Jessica W that the "type" should still be "Addition",
even when updating the PTL.
Updated to Mature, per TSC.
Issue-ID: POLICY-2738
Change-Id: I9fd1adf4986edfe0b87b337a3e913608084da04d
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Thu, 23 Jul 2020 22:57:30 +0000 (18:57 -0400)]
Add Ajith to policy-common info
Issue-ID: POLICY-2738
Change-Id: I368308548f5f7d97db774ea27677171181d217b5
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 20 Jul 2020 20:33:10 +0000 (16:33 -0400)]
Remove jackson from policy-common
Issue-ID: POLICY-1528
Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Thu, 9 Jul 2020 17:26:45 +0000 (13:26 -0400)]
Bump policy/common to 1.7.1-SNAPSHOT
Issue-ID: POLICY-2695
Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Thu, 9 Jul 2020 15:57:36 +0000 (11:57 -0400)]
Release policy/common 1.7.0
Issue-ID: POLICY-2695
Change-Id: I3605de083efbaeae276a09da409ce44c982bc173
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Thu, 9 Jul 2020 15:36:24 +0000 (11:36 -0400)]
Refer to released parent in policy/common
Issue-ID: POLICY-2695
Change-Id: Ife7a14cbc1197dd45281f1e846a906310496bf3a
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jorge Hernandez [Thu, 2 Jul 2020 16:10:55 +0000 (16:10 +0000)]
Merge "Removing hamcrest and openpojo from utils pom"
RossC [Thu, 2 Jul 2020 15:35:08 +0000 (16:35 +0100)]
Removing hamcrest and openpojo from utils pom
Issue-ID: POLICY-2387
Change-Id: I43916ce97c43892fed4ed3a78f972f6b97e3237f
Signed-off-by: RossC <ross.carter@est.tech>
Jorge Hernandez [Thu, 2 Jul 2020 14:50:16 +0000 (14:50 +0000)]
Merge "Updating common dependencies"
RossC [Wed, 1 Jul 2020 15:45:01 +0000 (16:45 +0100)]
Updating common dependencies
Issue-ID: POLICY-2387
Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb
Signed-off-by: RossC <ross.carter@est.tech>
Jim Hahn [Wed, 1 Jul 2020 14:36:31 +0000 (10:36 -0400)]
Fix build breakage in policy-common
When the commit for https://gerrit.onap.org/r/c/policy/parent/+/109705
was applied, it broke the changes to common to fix new sonar issues.
Backed out some of those changes.
Issue-ID: POLICY-2650
Change-Id: Id498392ff798e49c281296575223298c0b6e5143
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 30 Jun 2020 17:01:09 +0000 (13:01 -0400)]
Fix sonars in common due to dependency upgrades
Fixed the following issues:
- don't use annotation wrappers
- version overridden in pom
Issue-ID: POLICY-2650
Change-Id: Ia520037529861f8ace160c172ed70a5671b740d9
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Tue, 30 Jun 2020 13:14:51 +0000 (09:14 -0400)]
Fix sonar about always-trust-manager
This trust manager is not secure and should be avoided. However,
it is only used when the configuration explicitly says to allow
self-signed certificates. Modified the code to use an apache trust
manager, thus avoid the sonar complaint.
Issue-ID: POLICY-2650
Change-Id: Iaf4c72689916ed5ed5e6864666f3f54b2c5e0f12
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 29 Jun 2020 18:55:27 +0000 (14:55 -0400)]
Fix new logger sonars in policy-common
Not sure if this was introduced with the new logger version, but
now seeing a number of new sonars about using "{}". Fixed those.
Issue-ID: POLICY-2650
Change-Id: If36b2e89aa9151700bb9cea2906b6afaad5c4c72
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Mon, 29 Jun 2020 18:07:50 +0000 (18:07 +0000)]
Merge "upgrade eelf-core dependency: 1.0.0 -> 2.0.0-oss"
Jim Hahn [Mon, 29 Jun 2020 14:16:44 +0000 (10:16 -0400)]
Fix issues in common for new sonar rules
Addressed issues reported due to updates to the sonar rules:
- invoke only one method in a junit lambda
- complete the assertion
- add DOCTYPE to html
Issue-ID: POLICY-2650
Change-Id: Ib8b8a2e4736cc23849c0f7aef972ffa3365a3e00
Signed-off-by: Jim Hahn <jrh3@att.com>
jhh [Mon, 29 Jun 2020 14:54:06 +0000 (09:54 -0500)]
upgrade eelf-core dependency: 1.0.0 -> 2.0.0-oss
Issue-ID: POLICY-2387
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I837c2e958a388e8b6f2df2aff9f995359e44ad62
Pamela Dragosh [Thu, 25 Jun 2020 16:13:37 +0000 (16:13 +0000)]
Merge "Fix deprecated method in policy-common"
Utkarsh Jauhari [Wed, 24 Jun 2020 20:49:50 +0000 (20:49 +0000)]
Fix Junit failed after AAF version change 2.1.21
Issue-ID: POLICY-2623
Signed-off-by: Utkarsh Jauhari <uj426b@att.com>
Change-Id: I86c5b6efac8f62dd0d4ba576d8ec49cfa63a58bb
Jim Hahn [Wed, 24 Jun 2020 19:07:23 +0000 (15:07 -0400)]
Fix deprecated method in policy-common
Probably due to a jar update, some methods are now deprecated.
Fixed them.
Issue-ID: POLICY-2650
Change-Id: I48aabd4552faaf88671dfbe6556dc739a8c94809
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 19 Jun 2020 11:05:39 +0000 (11:05 +0000)]
Merge "More sonar issues in policy-common"
Jim Hahn [Thu, 18 Jun 2020 14:42:08 +0000 (10:42 -0400)]
More sonar issues in policy-common
Addressed the following sonar issues:
- add parameters to types
- ObjectInputStream.readObject() is unsafe
Issue-ID: POLICY-2650
Change-Id: I41e1bd08643b04f409ce87c884cb0c28995e431b
Signed-off-by: Jim Hahn <jrh3@att.com>
liamfallon [Thu, 18 Jun 2020 12:49:01 +0000 (13:49 +0100)]
Changes for checkstyle 8.32
Issue-ID: POLICY-2188
Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Wed, 17 Jun 2020 12:37:15 +0000 (08:37 -0400)]
Cleanup various sonar issues in policy-common
Addressed the following issues:
- unused imports
- unused method parameters
- use assertEquals, assertSame instead of assertTrue
- provide the parametrized type for this generic
Also fixed some checkstyle issues:
- removed blank lines between "import" groups
Issue-ID: POLICY-2650
Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Fri, 12 Jun 2020 14:48:20 +0000 (14:48 +0000)]
Merge "Remove logback.xml files bundled as part of jar"
a.sreekumar [Fri, 12 Jun 2020 09:42:01 +0000 (10:42 +0100)]
Remove logback.xml files bundled as part of jar
Change-Id: Ia98493a3ec6ad91a46c88ab71998eb039da44842
Issue-ID: POLICY-2627
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
uj426b [Thu, 11 Jun 2020 17:32:53 +0000 (13:32 -0400)]
Removing log4j from policy/common
Change-Id: Ib662556533f72c99180b611d0a1933f20e231b2c
Issue-ID: POLICY-2623
Signed-off-by: uj426b <uj426b@att.com>
Jim Hahn [Tue, 2 Jun 2020 13:55:34 +0000 (09:55 -0400)]
Code changes for dmaap-client upgrade
Issue-ID: POLICY-1996
Change-Id: Id8a3acf9406c6acada4c3ffee679f2baf819cded
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Thu, 28 May 2020 21:52:46 +0000 (17:52 -0400)]
jetty-servlets now defined in oparent
latest oparent has this new dependency in it.
Issue-ID: POLICY-2319
Change-Id: If3b9f64caa41923da1fabc6183434fc21ec00548
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Thu, 28 May 2020 18:31:31 +0000 (14:31 -0400)]
Point to parent SNAPSHOT
So we can tackle security dependency upgrades
Issue-ID: POLICY-2391
Change-Id: Iffbcc045d487045a982035e1f832f8eede59c919
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Tue, 26 May 2020 20:25:59 +0000 (16:25 -0400)]
Make GSON the default serializer
The default serialization provider for HttpClient and
HttpServletServer was Jackson. Modified to use GSON instead.
Issue-ID: POLICY-1526
Change-Id: Ic6282d119fa63d12470903a4f1eb4da3afd6efe7
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Tue, 19 May 2020 17:34:34 +0000 (13:34 -0400)]
Bump common master to 1.7.0
Issue-ID: POLICY-2514
Change-Id: Ic7bcf44a9f0c887d6c99edb8609725a15c4aa9a7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 5 May 2020 18:24:58 +0000 (14:24 -0400)]
Bump common to 1.6.6-SNAPSHOT
Issue-ID: POLICY-2514
Change-Id: Ied6a2571a0f1008eefa87b8aefdde12bd494a79b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 5 May 2020 17:01:45 +0000 (13:01 -0400)]
Release common 1.6.5 java
Issue-ID: POLICY-2514
Change-Id: Idc7bb4791743c52a0ceaef4316d7c4c47271ec05
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 5 May 2020 16:12:03 +0000 (12:12 -0400)]
Point to released parent
Issue-ID: POLICY-2514
Change-Id: I5de2239e78761d0e4433521054fa9e3cad5f5a99
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 28 Apr 2020 14:18:30 +0000 (14:18 +0000)]
Merge "Logging enhancement work"
Joseph Chou [Wed, 22 Apr 2020 18:06:23 +0000 (14:06 -0400)]
Logging enhancement work
Update log tool to provide placeholder feature
Change-Id: I3f2b10d009a1d51f30a6080c07459eb0ac07189f
Issue-ID: POLICY-2478
Signed-off-by: Joseph Chou <jc2555@att.com>
Jim Hahn [Fri, 24 Apr 2020 13:34:07 +0000 (09:34 -0400)]
Bump parent release version in common
Issue-ID: POLICY-2521
Change-Id: I27ca8ba624ce91a249be175b61d50f7ace5256da
Signed-off-by: Jim Hahn <jrh3@att.com>
Ram Krishna Verma [Tue, 14 Apr 2020 16:39:27 +0000 (12:39 -0400)]
Bump common to 1.6.5-SNAPSHOT
Issue-ID: POLICY-2378
Change-Id: I0012a2cd7acbb9d634b1fc7226992b873142016a
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Ram Krishna Verma [Tue, 14 Apr 2020 14:51:55 +0000 (10:51 -0400)]
Release common 1.6.4
Issue-ID: POLICY-2378
Change-Id: Id54e49ffded160a4df3540ed6adf3961ba6b9def
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Jim Hahn [Mon, 13 Apr 2020 17:03:08 +0000 (13:03 -0400)]
Fix handling of number fields Yaml
This fix also impacts StandardCoder, allowing Map.class to be used
as the target type instead of requiring LinkedHashMap.class.
Note: still doesn't do any translation if Object.class is used, as
there is no way to override GSON's handler for the Object type.
Issue-ID: POLICY-2488
Change-Id: Ia7cd0c85dc5a2a9e93360fa1c8397531b8503f2d
Signed-off-by: Jim Hahn <jrh3@att.com>
Pamela Dragosh [Fri, 10 Apr 2020 18:48:07 +0000 (14:48 -0400)]
Bump common to 1.6.4-SNAPSHOT
Issue-ID: POLICY-2378
Change-Id: Ib3afcf81460f42e1a62d51a484184763d61dace6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Fri, 10 Apr 2020 17:17:42 +0000 (13:17 -0400)]
Release common 1.6.3
Issue-ID: POLICY-2378
Change-Id: I708035d5e1ba13150d51a7bf6317ce43b313419e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Fri, 10 Apr 2020 16:49:36 +0000 (16:49 +0000)]
Merge "Update common-logging for log enhancement work"
Joseph Chou [Wed, 8 Apr 2020 21:45:38 +0000 (17:45 -0400)]
Update common-logging for log enhancement work
Resolve missing error code, add marker/mdc for audit/metrics
Change-Id: I490b17aac86f3b63df43e267a5dbe1d1588e5fdf
Issue-ID: POLICY-2478
Signed-off-by: Joseph Chou <jc2555@att.com>
Pamela Dragosh [Fri, 10 Apr 2020 15:20:05 +0000 (11:20 -0400)]
Point to released parent 3.1.2
Issue-ID: POLICY-2378
Change-Id: If1ac42ecc4465321d0392610bf0d1c94ccb22dd7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
jhh [Thu, 9 Apr 2020 18:31:38 +0000 (13:31 -0500)]
rename jpa persistence file
After inspecting the fat jar generated by brmsgw, noticed that
the persistence.xml included from here it was overriden by another
one, therefore the persistence unit was not available. This
may solve the issue for the brmsgw, as with a far jar build, there
are the risks of collisions such as this of files with the same
name.
Issue-ID: POLICY-2471
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I91cf2b6d3d2f5086d77795e08800ca96d984c214
Jim Hahn [Tue, 7 Apr 2020 12:35:36 +0000 (08:35 -0400)]
Update licenses on sonar fixes in common
Forgot to update licenses on some of the files that were modified
as part of addressing sonar issues. Updated.
Issue-ID: POLICY-2305
Change-Id: I9858bfb54be5b8eb42406e944361ec100ae238ff
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 6 Apr 2020 19:12:11 +0000 (19:12 +0000)]
Merge "More sonar issues in common"
Jim Hahn [Mon, 6 Apr 2020 16:17:11 +0000 (12:17 -0400)]
Address sonar issues in ONAP-logging
Addressed the following sonar issues in ONAP-logging:
- use Map instead of ConcurrentHashMap
- remove unusued fields
- use Map.computeIfAbsent() instead of get()/put() pair
- readObject is unsafe
- use try-with-resources
- junit should assert something
Also removed some unused imports.
Issue-ID: POLICY-2305
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I3480a55da4d0e771f8083c97770a6c9707d871f7
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Mon, 6 Apr 2020 15:26:13 +0000 (11:26 -0400)]
More sonar issues in common
Fixed additional sonar issues:
- infinit loop; while the issue is bogus, it was easy enough to
modify the code to satisfy sonar
- doesn't like "volatile"; again, the issue is bogus, but easy enough
to modify the code
Disabled a couple of sonars in NetworkUtil, as they are not actually
an issue.
Issue-ID: POLICY-2305
Change-Id: I5500183e3fe4060696994cff55bdae4ba7e138c7
Signed-off-by: Jim Hahn <jrh3@att.com>
Jim Hahn [Fri, 3 Apr 2020 13:44:26 +0000 (09:44 -0400)]
Address sonar issues in common
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>
Pamela Dragosh [Fri, 27 Mar 2020 12:03:24 +0000 (08:03 -0400)]
More sonar issues cleanup
Either log or rethrow
Use boolean expression
Add at least one test
Remove commented out code
Issue-ID: POLICY-2204
Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 24 Mar 2020 21:13:24 +0000 (17:13 -0400)]
Sonar and eclipse warnings common
Unused imports
Not enough arguments
Issue-ID: POLICY-2204
Change-Id: I6405cb697ea976096b1276e2291b1c73617d33b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Fri, 20 Mar 2020 11:35:03 +0000 (07:35 -0400)]
Bump common to 1.6.3-SNAPSHOT
Released 1.6.2
Issue-ID: POLICY-2378
Change-Id: I12c93a88af2b00c25d457ff9aa9e50c1845e004c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Thu, 19 Mar 2020 22:14:48 +0000 (18:14 -0400)]
Release policy/common 1.6.2
Issue-ID: POLICY-2378
Change-Id: I0b35e462f3ecbd193680548e94e65a2c438a5a9a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Thu, 19 Mar 2020 20:10:54 +0000 (16:10 -0400)]
Point to policy/parent 3.1.1
Issue-ID: POLICY-2378
Change-Id: Id362530ff1947220827adfc9428ff7453190876e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Thu, 12 Mar 2020 19:49:01 +0000 (15:49 -0400)]
Move code from drools-apps to common
Extracted code from ControlLoopUtils to create a new class in
common, PropertyObjectUtils.
Fixed a deprecated method invocation in a junit.
Fixed an object casting (i.e., sonar) issue in SCO.
Issue-ID: POLICY-2305
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I331a47297f67097ea6986be125ef93cd1954b5ff