Age | Commit message (Collapse) | Author | Files | Lines |
|
CryptoUtilsTest runs slowly because the SecureRandom that CryptoUtils
uses to generate an "iv" takes a while to create enough randomness.
However, as the "iv" is only used as a "salt", it is not necessary
to use SecureRandom; the values generated by Random are sufficient.
Change-Id: I1f3b03b85d28852a7969d3a83802a2691308caa5
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Moving ToStringTester to utils-test as thos module holds all test
related utilities. Keeping the original one for now as it will break
build for all the repos.
Will delete the original one after pointing all the dependent repos to
the new one.
Change-Id: I5f90b722452178e1e1a30d759679b8738dadfb65
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Removed duplicate code in DbDao by refactoring common code
into a new updateIae() method.
Removed duplicate code in IntegrityMonitor by refactoring common code
into a new withinTransaction() method.
Removed duplicate code in StateManagementEntity, StateElement by
replacing with lombok Getter & Setter annotations.
Removed duplicate code in StateManagement by refactoring common code
into new setState() and getState() methods. Also removed
logger.isDebugEnabled() tests.
Added coverage for StateChangeNotifier.
Change-Id: I2e29b836dafc5de569a2267206a6a34105e44021
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Used Eclipse Refactor->Extract Method to reduce cyclomatic
complexity.
Flattened nested FpManager class into IntegrityMonitor class.
Changed some strings to StringBuilder, where lots of concatenation
was being done.
Simplified some things by eliminating some try/catch blocks where
an exception can't actually (except may an out-of-memory exception).
Also addressed some sonar issues in the tests (e.g., use "<>" where
appropriate).
Eliminated some assertException methods, replacing them with assertj
methods.
Did not attempt to increase junit coverage.
Change-Id: I311acaffcd87f0cbbf382c06c7fa26177007abd5
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Mostly used Eclipse Refactor->Extract Method to reduce cyclomatic
complexity. Also combined a few "if" statements to reduce nesting
levels.
Also addressed some sonar issues in the tests (e.g., use "<>" where
appropriate).
Did not attempt to increase junit coverage.
Change-Id: I9d6c1305ce455f0d64249b548d123bb9bf37292a
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Released 1.5.0
Issue-ID: POLICY-1737
Change-Id: I51b1c264d52cab2b2501dce7c5b0e7805d39ad5c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Policy/parent released
Issue-ID: POLICY-1737
Change-Id: I0fe368d5a4771813b1afb5fec5f9d48f7df39c87
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Per javadocs, getName() should generally be used instead of
Class.getCanonicalName().
This change only applies to classes; it does not apply to File
objects.
Change-Id: Iea0995d1167f4837607f194d35f0193eeedeacd7
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Note: A number of these were identified, by SonarLint, in the Test
classes, which are not typically scanned by Sonar.
Removed unnecessary imports.
Removed unneeded "throws Xxx".
Replaced lambda with method references.
Replaced duplicate strings with constants.
Replaced try-fail-catch with assert-j methods to eliminate sonar
complaints about duplicate failure messages.
Added missing @Override annotations.
Use map.computeIfAbsent() where appropriate.
Also fixed some minor checkstyle issues.
Removed unneeded "volatile" declarations.
Replaced some if-else constructs with "?:" construct, per sonar.
Replaced Object.wait() with CountDownLatch.await(); according to sonar
(and javadocs), Object.wait() can return due to "spurious wakeups".
Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse.
Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I928eeb6bf52cb9e825db456278ce8bff449c692c
Issue-ID: POLICY-1762
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
No longer used.
Issue-ID: POLICY-1737
Signed-off-by: pdragosh <pdragosh@research.att.com>
Change-Id: Ia85139cbb200d3ca71bcdedd43e2ae838eeb79bb
Signed-off-by: pdragosh <pdragosh@research.att.com>
|
|
Upgrade minor review for El Alto.
Update to policy/parent
Issue-ID: POLICY-1747
Change-Id: I5c54479d7b1e1951e52580c40127177e5f6d389d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-1775
Change-Id: I7a1327a73617d5d7ffb07754b9b6f39abb089d99
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
Change-Id: Ibc15649c26eaafc620cec85876790fd2d73372fe
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
In prep for next version.
Issue-ID: POLICY-1700
Change-Id: I4dec2414dbd3d0d941bf24e9cd359265d7105371
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
The gson code to convert Double to Long/Integer use a direct comparison
of the original double with a long. However, sonar does not like that
so changed the code to use the Double.compare() method instead.
Also fixed sonar issue with diamond operator.
Addressed some sonar issues in ServiceManager.
Addressed some sonar issues in Version.
Change-Id: I0959603918d251db671e87e12c295c6ec911f427
Issue-ID: POLICY-1707
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Policy/parent is released.
Issue-ID: POLICY-1700
Change-Id: I4a3f11bd069eefbe7205495b83fc8d8b68a221a9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
|
|
Makes Junit debugging more simple.
Issue-ID: POLICY-1641
Change-Id: I5835f608e468e90e11d923973d726b0313e91189
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added implementations of ValidationResult for arbitrary objects and
for beans (i.e., containers of arbitrary objects).
Change-Id: I4c6f35bd19f1386062ce19125cbc648c399cc331
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
By default, gson treats all numbers as Double when placed into a
generic Map. This is not backward compatible with existing policy
APIs. Added a type adapter that walks Map objects and converts the
Double values to Integer or Long, where possible.
Made this the default behavior in the GsonMessageBodyHandler, the
JacksonHandler, and the StandardCoder.
Also fixed a couple of checkstyle errors in the gson project.
Change-Id: I9ac0c77e6592d1c039646f0662c077b77a1e9aaf
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I889cb9397b4b834ab273ec8f8ddc1af2b3c3c05e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-1095
Change-Id: Ib0d2c778f3e8dc5e52369e43b98249ed426fc14a
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Class written by Jim Hahn that implements Comparable for comparing
semantic versions. Lifted from policy models pap.
Issue-ID: POLICY-1095
Change-Id: Ie8c5f9066c06cb569085e1390b3de3e4aa580267
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Change-Id: I1b599ce62a4fab852420089b5d1d8ae8f5cfe7ca
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Added Registry.get() that does not need a class argument.
Change-Id: I3e8b0e3cc14eda914e0b1b201e6ddf67a9e3462e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Typically, singleton classes have lots of static methods, or use
a getInstance() method to get the singleton. This provides an alternative
mechanism, similar to the JDNI and the common-paramater property registry,
where singletons can be registered.
Clean up registry after junit test.
Modified a few comments. (I prefer 90 characters for comments.)
Added a method to register or replace an existing key without throwing
an exception.
Change-Id: I3b62719013d3b5f71adb5e9299d3c1257fb55c80
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This makes it easier for a class to implement a Startable interface,
using a ServiceManager internally, while preventing other classes from
adding services to the manager (as would be the case if the class were
simply subclassed from the ServiceManager).
Changed the field name to be more descriptive.
Fixed a typo in a comment.
Change-Id: I1bed6291114d21c20d2324cbda81518bf9183139
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
This reverts commit c8da79dec8d68cded0e1608c914364c2148bb6ec.
Change-Id: I8d9efd3c2d886e3d86ba3fdded3b057a45ed6ed3
Signed-Off-by: Pamela Dragosh <pdragosh@research.att.com>
Issue-ID: POLICY-1609
|
|
|
|
Issue-ID: POLICY-1609
Change-Id: I462f0cce8f8b189082bc2cb4bbd23b927f2cb871
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
regardless of type (source or sink)
Change-Id: Idaebae611746e364364d35375519173a7461ae61
Issue-ID: POLICY-1608
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Change-Id: Ic529e166ce4cdc93830f7da06db5ae752d86260d
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
Change-Id: I6b92dcc0f225aa712b34adb9a1f9ab47df412c81
Issue-ID: POLICY-1608
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Update code to fix sonar scan issues
Change-Id: I5ccf3d774651bd3d8df908c1e7fe83218016a007
Issue-ID: POLICY-1561
Signed-off-by: Chou, Joseph <jc2555@att.com>
|
|
Also added a "name" to the manager, for logger purposes.
Change-Id: Ide57cdec1fafc36c43b7f7584c0baad6261e8412
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
Change-Id: I7cc9baa21654e3d416a6ca1143f365ca295bf1d6
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Update missing information blocks and
indentation to pass verify job.
Change-Id: I0f514e9fb4a429addf40ba1171a8b7a363a070ae
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
|
|
Added a getter to allow the Gson object to be retrieved from a GSON
message body handler, useful for testing.
Moved the TextFileUtils utility class from APEX utilites to policy common
utils
Issue-ID: POLICY-1195
Change-Id: I7c8074e8177a90b292c6dfd6e7f0d352063818e7
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Change-Id: I64a997bbd1f21cb4eef134a1c474f8b5780dceb6
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This is part 1 of introducing the mdc filter feature. Network
logging has to have interception points in order to pre/post
process messages coming in from a network endpoint.
The OrderedService interface and OrderedServiceImpl of the
drools-pdp project have now been migrated to common but is
also left in drools-pdp to mitigate disruption to existing
features. However for features that need to use common's
OrderedServiceImpl and drools-pdp version of OrderedServiceImpl
there will be a conflict with getSequenceNumber(). So a migration
of the other features is suggested.
Network logging is moved to its own util class so that feature
hooks can be invoked any time an event is being logged by a
network logger. This util class will also be accessible to
drools-applications in the case where drools-applications
would like to invoke network logging features for REST events.
Change-Id: I83d7c46e5abb351486f841c3be4d9009f7992476
Issue-ID: POLICY-1499
Signed-off-by: Daniel Cruz <dc443y@att.com>
|
|
|