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
Chris Ramstad [Wed, 4 Mar 2020 21:10:18 +0000 (13:10 -0800)]
SONAR: Resolving server hostnames should be verified
Per Jorge Hernandez, we don't want to fix this as
it falls under the selfSignedCert clause which is
used in testing and non-production environments.
Marking as //NOSONAR
Issue-ID: POLICY-2389
Signed-off-by: Chris Ramstad <cramstad@ciena.com>
Change-Id: Iaf47e19dc8450607b1dc3aa260370e9c0d7d491d
Jim Hahn [Tue, 3 Mar 2020 16:55:02 +0000 (11:55 -0500)]
Add gson adapters for special field types
Added type adapters for Instant, LocalDateTime, and ZonedDateTime. UUID
seems to work already.
Added new Coder that offers an alternative encoding for Instant.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I5230fa7fe955d78c5f2da1316cb1504b5875ea84
Ram Krishna Verma [Tue, 3 Mar 2020 15:10:50 +0000 (15:10 +0000)]
Merge "Add JettyStaticResourceServer to policy-endpoints"
Jim Hahn [Tue, 3 Mar 2020 15:00:09 +0000 (15:00 +0000)]
Merge "Use policy/parent awaitility"
Jim Hahn [Tue, 3 Mar 2020 14:57:45 +0000 (14:57 +0000)]
Merge "BidirectionalTopic should use plain TopicSink"
Pamela Dragosh [Tue, 3 Mar 2020 13:28:36 +0000 (08:28 -0500)]
Use policy/parent awaitility
Consolidate to what is in policy/parent - this upgrades
the version.
Issue-ID: POLICY-2381
Change-Id: Ibf18fb131c7fc694215a5d34d734392e722f5970
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Tue, 3 Mar 2020 04:43:06 +0000 (23:43 -0500)]
BidirectionalTopic should use plain TopicSink
BidirectionalTopicClient use plain TopicSink instead of
TopicSinkClient, because the latter encodes its message, while
BidirectionalTopicClient should not, because encoding should
be left up to the user of the class.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I6c67e1ee0c56e96a0efcc90eaf1c0a940902e8b3
Jim Hahn [Tue, 3 Mar 2020 00:13:16 +0000 (19:13 -0500)]
Provide access to HttpClient's WebTarget
Issue-ID: POLICY-2349
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Iad10c3b6d77f859235c9e63f3fc0693bd9ba3c27
Hengye [Sat, 29 Feb 2020 12:39:45 +0000 (20:39 +0800)]
Add JettyStaticResourceServer to policy-endpoints
Using DefaultServlet to manage static resources
on Jetty Server.
Issue-ID: POLICY-2311
Signed-off-by: Hengye <yehui.wang@est.tech>
Change-Id: Ife0eda06334eb0b6350110254945975050181f20
Hengye [Tue, 25 Feb 2020 02:43:40 +0000 (10:43 +0800)]
Adding DefaultServlet to support static resources
Adding DefaultServlet to make embeded jetty not only
support Jersey, but also support static resources, like
html, css and js.
Issue-ID: POLICY-2311
Signed-off-by: Hengye <yehui.wang@est.tech>
Change-Id: I71309036627d75dcc56947b395688a4e2f22c0ce
Pamela Dragosh [Mon, 24 Feb 2020 12:38:20 +0000 (07:38 -0500)]
Fixes to support dependency upgrade
Uped the time for Thread.sleep due to new http core dependency. It
seems to randomly timeout inconsistently due to that upgrade.
Google gson seems to have changed its layout. Did not see any
problems with the other repos.
Issue-ID: POLICY-2381
Change-Id: Id2a9bfffd42a2c713af042bd2a8cc4abafba2d9f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Mon, 17 Feb 2020 18:21:08 +0000 (13:21 -0500)]
Add convert() to Coder
This addresses Liam's review comment about moving the "translate"
method from the actor Util class into policy-common.
Added a method to Coder to convert from one object type to
another (e.g., from a Map to a POJO, or vice versa).
Issue-ID: POLICY-2363
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I2a0b5ab4ce4b0eeda216a57cbe23a8bb64f64940
Jim Hahn [Mon, 17 Feb 2020 17:00:55 +0000 (17:00 +0000)]
Merge "Allow storing REST servers password and userName in environment variables"
Dominik Mizyn [Mon, 17 Feb 2020 14:23:43 +0000 (15:23 +0100)]
Allow storing REST servers password and userName in environment variables
This patch allows to store and get REST servers password and userName from
environment variables. This is needed if we want to send those
variables by helm secrets.
Issue-ID: OOM-2287
Change-Id: I4d6a8bf188a0d17e5444137d871dd341627ec397
Signed-off-by: Dominik Mizyn <d.mizyn@samsung.com>
Jim Hahn [Fri, 14 Feb 2020 21:29:11 +0000 (16:29 -0500)]
Add PseudoExecutor to utils-test
Moved MyExec from actors package to policy-common/utils-test,
renaming it to PseudoExecutor.
Updated per review comment(s):
- declare "task" of type "Queue" instead of "LinkedList"
Issue-ID: POLICY-2363
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I40049ca52defecc4f3f7479470c28da58521866d
Jim Hahn [Fri, 14 Feb 2020 16:15:13 +0000 (11:15 -0500)]
Added BidirectionalTopicClient to policy-common
Added review comments:
- check for too many topic sources
Issue-ID: POLICY-2363
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I89f34c4f756fb0c938dd7dda5896f3426cfc7ac2
Ram Krishna Verma [Mon, 10 Feb 2020 15:58:04 +0000 (15:58 +0000)]
Merge "Add headers to asynchronous get in HttpClient"
Jim Hahn [Sat, 8 Feb 2020 18:02:02 +0000 (13:02 -0500)]
Add enhancements to standard coder
Added support for array indices in StandardCoderObject getString().
Also made it Serializable.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ia514aed96fdfe7f635c5a6dc3e1f90939654d383
Jim Hahn [Sat, 8 Feb 2020 19:16:15 +0000 (14:16 -0500)]
Add headers to asynchronous get in HttpClient
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I61ef2fcfde5eb361652d2d6e3f55324af7ca7b4e
Pamela Dragosh [Mon, 3 Feb 2020 12:23:15 +0000 (12:23 +0000)]
Merge "Fix ResourceUtilsTest junit"
Pamela Dragosh [Mon, 3 Feb 2020 12:22:59 +0000 (12:22 +0000)]
Merge "Add pretty() method to Coder"
Jim Hahn [Fri, 31 Jan 2020 16:15:44 +0000 (11:15 -0500)]
Add pretty() method to Coder
"Pretty" JSON is often needed, so added Coder.pretty() to facilitate
that.
Incorporated review comment(s):
- changed pretty() to encode(object, pretty)
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I180fa6de416836008bf1c410132ae30f4dde9271
Jim Hahn [Fri, 31 Jan 2020 17:03:08 +0000 (12:03 -0500)]
Fix ResourceUtilsTest junit
The junit for ResourceUtilsTest fails when run on a non-linux box due
to the different path separator. Modified the test to normalize path
names before making comparisons.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I58db71155d30b379e20e7c46bedfc6d79e26b6cb
Jim Hahn [Fri, 31 Jan 2020 14:42:04 +0000 (09:42 -0500)]
Add async support to HttpClient
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I0123b98e89b734efd264dd62080bb23573a7a3e6
Jim Hahn [Fri, 31 Jan 2020 00:15:01 +0000 (19:15 -0500)]
Add Configurable to common/capabilities
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Iab0ce1ba0c478d646546d02734228ef97d58b4c4
Pamela Dragosh [Thu, 30 Jan 2020 15:38:57 +0000 (15:38 +0000)]
Merge "Add a bean validator"
Jim Hahn [Thu, 30 Jan 2020 05:11:26 +0000 (00:11 -0500)]
Add a bean validator
Added a bean validator that will validate the fields within an arbitrary
object using the annotations in the parameters package.
Also added validateMap to the bean validators.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I2192f3d1ba735d3779c35711a7dba053918aa547
Jim Hahn [Wed, 29 Jan 2020 22:21:24 +0000 (17:21 -0500)]
Convert double to int when decoding JSON
When decoding straight into a List or Map class, StandardCoder was not
applying the double-to-int conversion. Fixed it.
Issue-ID: POLICY-1625
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I939e3378645d45ac98d2bca6b2a4076870a05626
jhh [Mon, 27 Jan 2020 12:45:07 +0000 (06:45 -0600)]
Schema validation extension to StandardCoder
Issue-ID: POLICY-2331
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic3e8d21715d17a61ea5d07740dd9f4dd0dbb8641
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Liam Fallon [Thu, 23 Jan 2020 13:35:07 +0000 (13:35 +0000)]
Merge "Create path to text file being created"
liamfallon [Wed, 22 Jan 2020 17:51:26 +0000 (17:51 +0000)]
Create path to text file being created
If you try and write to a file where part of the pat does not exist,
that path should be created.
Issue-ID: POLICY-1581
Change-Id: Ifb7a4ff4e1804814b6679956f0c58d5ac026c4a4
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Mon, 20 Jan 2020 22:39:32 +0000 (17:39 -0500)]
Replace deprecated Nashorn javascript engine
Some test drivers use javascript to evaluate expected results.
In java 8, the standard javascript engine was Nashorn, but that has
been deprecated. As the test scripts use a simple xxx.yyy.zzz notation,
decided to go with a small expression language, Apache JEXL, instead.
Issue-ID: POLICY-2324
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Iffff468a880c612bdb31da84964dfa4132fa15e3
Pamela Dragosh [Tue, 14 Jan 2020 18:51:12 +0000 (13:51 -0500)]
Sonar cleanup overrides and fixes
Removal of UTF-8 because its already set
capabilities doesn't generate any code, no need to include
override false positives for passwords etc.
override for logging and exception throw that we want
add synchronized to overrides that are synchronized
ignore checking of some conditions
adding synchronized to match set* methods
Issue-ID: POLICY-2321
Change-Id: I26d9ca22a0cdd67fdaae9c44b718b8dc103f190e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Pamela Dragosh [Tue, 14 Jan 2020 12:35:41 +0000 (12:35 +0000)]
Merge "Changed Matchers to ArgumentMatchers"
liamfallon [Fri, 10 Jan 2020 20:27:22 +0000 (20:27 +0000)]
Add method to return resource directory contents
In order to avoid hard coding the policy types and policies that are in
the example directories into unit test cases, and in order to
automatically pick up added and removed policy types and policies, it
would be good to read the contents of resource directories at run time
in unit tests. This change brings in that functionality into
ResourceUtils.
Issue-ID: POLICY-2315
Change-Id: I601718828aad0f065dbbaa1f5af8d0a0f133f44d
Signed-off-by: liamfallon <liam.fallon@est.tech>
Jim Hahn [Fri, 10 Jan 2020 22:20:07 +0000 (17:20 -0500)]
Changed Matchers to ArgumentMatchers
Issue-ID: POLICY-1406
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I6d85bb10c15f9d82fa55d9328d18640098050dd9
Ram Krishna Verma [Mon, 13 Jan 2020 12:56:55 +0000 (12:56 +0000)]
Merge "Update sonar configuration"
Ram Krishna Verma [Mon, 13 Jan 2020 12:55:56 +0000 (12:55 +0000)]
Merge "Address items deprecated by move to java 11"
Jim Hahn [Fri, 10 Jan 2020 21:59:48 +0000 (16:59 -0500)]
Fix mockito import in common
ONAP-Logging was failing when using powermock-mockito2.
This change also requires a property (version.javax.bind) to be
added to the parent/integration pom.
Issue-ID: POLICY-1406
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If8813edaf86d84cff72c0e476ebf2a36bf5dcf18
Pamela Dragosh [Fri, 10 Jan 2020 01:26:46 +0000 (20:26 -0500)]
Update sonar configuration
Sonarcloud upgrade resulted in new configuration property
Removed deprecated properties
No need for plugin configuration override of oparent
Issue-ID: POLICY-2321
Change-Id: Ia294575d2ea0a589eab6797b48b8c1924f9f1b36
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Jim Hahn [Fri, 10 Jan 2020 16:30:21 +0000 (11:30 -0500)]
Address items deprecated by move to java 11
Addressed the following deprecated items:
- "new Integer(xxx)"
- Observable/Observer
- Mockito.anyObject()
Added assertion to a junit test to address a sonar issue.
Did not address deprecated Nashorn javascript interpreter; that will be
done in a separate review.
Updated licenses.
Issue-ID: POLICY-1406
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: I81fd158f831e01d5410d79898ced658285787d47
HOCKLA [Thu, 9 Jan 2020 17:48:49 +0000 (11:48 -0600)]
policy/common jdk11 upgrades
Issue-ID: POLICY-1583
Change-Id: I6bcd320a6cdedd84dad9b54fdb4fec0cb8443b44
Signed-off-by: HOCKLA <ah999m@att.com>
liamfallon [Thu, 12 Dec 2019 14:11:28 +0000 (14:11 +0000)]
Update policy common for checkstyle 8
Minor changes to clear down checkstyle warnings in policy common.
Issue-ID: POLICY-206
Change-Id: Ifa6753bafdc4b2a9ee0725c4f3751c6eac03e096
Signed-off-by: liamfallon <liam.fallon@est.tech>
HOCKLA [Wed, 11 Dec 2019 16:24:44 +0000 (10:24 -0600)]
Added JDK 11 upgrades and point to parent java 11 branch
Issue-ID: POLICY-1583
Change-Id: Ic46ffcb6eb5b0d18f9cb0a6a2ec46374e523f54a
Signed-off-by: HOCKLA <ah999m@att.com>
Pamela Dragosh [Fri, 6 Dec 2019 21:47:40 +0000 (21:47 +0000)]
Merge "Minor changes for new Eclipse checkstyle checks"
HOCKLA [Fri, 6 Dec 2019 20:29:46 +0000 (14:29 -0600)]
Bumped policy/common patch version to 1.6.2-SNAPSHOT
Issue-ID: POLICY-1583
Change-Id: I4a1c5848f158d10b4b6f21f048f92d69ccc90a83
Signed-off-by: HOCKLA <ah999m@att.com>
HOCKLA [Fri, 6 Dec 2019 17:16:11 +0000 (11:16 -0600)]
Release 1.6.1 policy/common
This is a re-release, previous release wasn't pointing to
an already installed release
Issue-ID: POLICY-1583
Change-Id: I613dd5a78b439b60455be58b476204e422ebbf02
Signed-off-by: HOCKLA <ah999m@att.com>