Age | Commit message (Collapse) | Author | Files | Lines |
|
Addressed the following sonar issues:
- extract common test methods
Issue-ID: POLICY-2650
Change-Id: I0b27c83d7bbe3d5fe83859b189c37507aabe7489
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Issue-ID: POLICY-2789
Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: Ic1b0a3b467fd9e4f65b2e12d9f6ed33e38e4f44d
Issue-ID: POLICY-2755
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
|
|
Issue-ID: POLICY-2695
Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
|
|
Issue-ID: POLICY-2387
Change-Id: I43916ce97c43892fed4ed3a78f972f6b97e3237f
Signed-off-by: RossC <ross.carter@est.tech>
|
|
Issue-ID: POLICY-2387
Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb
Signed-off-by: RossC <ross.carter@est.tech>
|
|
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>
|
|
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>
|
|
Issue-ID: POLICY-2188
Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
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>
|
|
Issue-ID: POLICY-2514
Change-Id: Ic7bcf44a9f0c887d6c99edb8609725a15c4aa9a7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-2514
Change-Id: Ied6a2571a0f1008eefa87b8aefdde12bd494a79b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-2378
Change-Id: I0012a2cd7acbb9d634b1fc7226992b873142016a
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
|
|
Issue-ID: POLICY-2378
Change-Id: Ib3afcf81460f42e1a62d51a484184763d61dace6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Unused imports
Not enough arguments
Issue-ID: POLICY-2204
Change-Id: I6405cb697ea976096b1276e2291b1c73617d33b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Released 1.6.2
Issue-ID: POLICY-2378
Change-Id: I12c93a88af2b00c25d457ff9aa9e50c1845e004c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
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
|
|
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
|
|
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>
|
|
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
|
|
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
|
|
|
|
"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
|
|
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
|
|
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
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
|
|
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
|
|
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
|
|
Issue-ID: POLICY-1583
Change-Id: I6bcd320a6cdedd84dad9b54fdb4fec0cb8443b44
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Issue-ID: POLICY-1583
Change-Id: I4a1c5848f158d10b4b6f21f048f92d69ccc90a83
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Issue-ID: POLICY-1583
Change-Id: I805ebed75e7e0cb5109946328958341018421aad
Signed-off-by: HOCKLA <ah999m@att.com>
|
|
Issue-ID: POLICY-2204
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If0a11913f614e038ecd3e8c3f0b56d3ac78b03ec
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Issue-ID: POLICY-2204
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: If55ea1a804997ab751f15813e6b643572d4f189f
|
|
Issue-ID: POLICY-1869
Signed-off-by: Jim Hahn <jrh3@att.com>
Change-Id: Ic757d3a8e7e0e3537ecba979a919b9ea3c1aa797
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Update junit to add test cases
Change-Id: If3236853138a05faac5f51a859b935265c14f0d6
Issue-ID: POLICY-1945
Signed-off-by: Chou, Joseph (jc2555) <jc2555@att.com>
|
|
This is to allow multiple supporting implementations.
Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I42491e5671f561fe320f034bf8ffe03848dff43f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
|
|
additional minor javadoc clean up
Issue-ID: POLICY-1945
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I23927b8c4dd63ed658e8062c87b4884ea1d31825
|
|
Refactored StandardYamlCoder, extracting a new class, YamlJsonTranslator,
from it. This facilitates performing yaml translation when not using a
standard "gson" coder.
Added YamlJacksonHandler which supports YAML translation layered on
top of a JacksonHandler instead of a GsonMessageBodyHandler.
Also added junit tests to complete coverage of StandardCoder.
Also added public APPLICATION_YAML to YamlMessageBodyHandler.
Change-Id: Ia470fa194661fbf1aebeaf0f18b57f2a984cb64b
Issue-ID: POLICY-2081
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
After the implementation was finalized, it turned out that YamlException
was no longer needed, so it has been deleted.
Change-Id: Ie895fc096787f05eff36a6127b08247a7664ff8d
Issue-ID: POLICY-2065
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Created StandardYamlCoder which is like a StandardCoder, except that
the original converts to/from JSON, while the new class converts to/from
YAML. Also added YamlMessageBodyHandler and incorporated it into the
http server so that it supports a media type of */yaml.
Change-Id: Ibd83a9f6d355a330f63e435f2bb41affcf1947c2
Issue-ID: POLICY-2065
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: If86cac60ee143b1d8ae92fd3893ea33a0d3e1b81
Issue-ID: POLICY-2045
Signed-off-by: Jim Hahn <jrh3@att.com>
|