Age | Commit message (Collapse) | Author | Files | Lines |
|
* Useless assignments
* Commented out code
* Unused imports
* Add simple JUnit for exception classes
Issue-ID: POLICY-456
Change-Id: I012c2b6bdaf1b5803b2f1c37fd4d9514055e4ef0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-ID: POLICY-457
Change-Id: I6e4bc00bc85f73bcb4c58c54378f062d98e6876d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
IntegrityMonitor.java:
Renamed variables, Ex: dep_groups => depGroups.
Renamed enum constants, Ex: pdp_xacml => PDP_XACML.
Merged "if" tests.
Cast values to "long" before multiplying.
Re-throw interrupt().
Write exception via logger instead of e.printStackTrace().
Moved constructor to top of the file.
Removed most logger.isDebugEnabled() checks.
Returned generic List instead of ArrayList.
Used entrySet() instead of keySet().
Removed useless parentheses.
Removed superfluous exceptions from "throws" declaration.
DbAudit.java:
Modified DbAudit to throw DbAuditException.
Replaced references to HashSet and HashMap with generic Set and Map.
Modified DbAudit to iterate over entrySet() instead of keySet().
ComponentAdminException:
Created ComponentAdminException class.
Modified ComponentAdmin methods to throw new exception class.
Extracted "stateManager" String constant.
Eliminated logger.isDebugEnabled() calls.
Updated the license data.
Eliminated double-checked locking problem from PropertyUtil:
Modified code to use Initialization On Demand Holder idiom.
Change-Id: Ic01288542041da26df483ce85ecaf292ac138f85
Issue-ID: POLICY-246
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Patch 1:
This change modifies StateManagement methods that use transactions so
that an EntityManager is created each time the method is called. This
eliminates issues with EntityManager transactions being shared across
threads causing errors when multiple threads are active.
Issue-ID: POLICY-518
Change-Id: I071660a530de610ec56af82347b92496f87bf4e1
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
Patch 1:
This bug tracks the AT&T bug 355533. The symptom was that drools pdps
that were backing each other up were becoming stuck in a standby state.
The cause was that the election handler thread was being hung by a call
to PolicyEngine.manager.deactivate which shuts down the topic endpoints
when the drools pdp operational state transitions to disabled. Related
problems were that the election handler heartbeat was NOT blocked when
the main thread was blocked and the IntegrityMonitor forward progress
counter was NOT blocked from incrementing when the election handler
thread was blocked. This prevented the correct failover of the drools
pdp to another healthy one. This change fixes the two causes of the
thread blockage, moves the election handler heartbeat to the main
thread and adds an interface (AllSeemsWell) which is called when
the election handler has stalled/resumed. The AllSeemsWell interface
will block forward progress counter increments when ALLNOTWELL and will
resume forward progress counter increments when ALLSEEMSWELL. In
addition, it reduces the run time of the StandbyStateManagementTest
from approximately 8 minutes to approximately 2 minutes. Since this
changes classes also changed by POLICY-444, this change must be merged
before POLICY-444 can be merged.
Patch 2: Extended sleep times in AllSeemsWellTest.
Patch 3: Commented out asserts that are keeping it from building.
Note: It builds just fine in local environment.
Patch 4: Moved the check of allNotWellMap from testTransaction to
endTransaction so it will cover calls to endTransaction from application
code rather than just calls from testTransaction.
Patch 5: Fixed potential Sonar issue in initialization of HashMaps
allSeemsWellMap and allNotWellMap
Patch 6: Changes to IntegrityMonitorTest to make it run faster and
more deterministically. This satisfies POLICY-444.
Issue-ID: POLICY-501
Change-Id: I8fbbdc481839ec6066f26392d30e230d6b1293f2
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
Address technical debt in policy/common integrity-audit submodule.
Implementation for empty constructors, remove useless assignment,
use <> on constructor, use @Override. Not all technical debt
addressed, only the ones specified by Pam in POLICY-336, except
the use Set instead of HashSet where a method signature would
change.
Issue-ID: POLICY-456
Change-Id: If8f9f4151503bdd22c8c405485538f8be779cabd
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
|
|
|
|
|
|
Fixed the Sonar issues in ONAP-logging that required minimal refactoring
of the code. Many of the System.out and System.err issues I did not
fix, as I don't know what loggers to use.
Issue-ID: POLICY-458
Change-Id: I8eccb932b350a170b9cd680b90009e6612a0abcd
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
Replaced the string parameter with a StringBuilder so that the modified
version can be accessed outside the method, since strings are immutable.
Added null check for properties. Removed trim on properties in case the
property is null. Added junit to test that the modified StringBuilder can
be read outside the paramsAreBad method.
Issue-ID: POLICY-492
Change-Id: I0550e9d639cbbcc876e6aafb84f6e9a363b653ff
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
|
|
|
|
Under some conditions the JPA transaction may be already closed
when commit is called in StateManagement. Surround it with a
check to see if the transaction is active, so it will not
generate an error in the log.
Issue-ID: POLICY-484
Change-Id: Id54585e68361a0be9ae8afd7e9ccba2f7eadfe5f
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
Changed version of version.properties from 1.1.2 to 1.2.0
Change-Id: I4d8eb4bdd52ae7d98627f28f0bca72443bfd23eb
Issue-ID: CIMAN-120
Signed-off-by: Charles Cole <cc847m@att.com>
|
|
|
|
Bump minor version in preparation for Amsterdam
branching.
Change-Id: Id33c61586582d008ecede4cd31ed6b046a5bafc0
Issue-ID: CIMAN-120
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
|
|
We release 1.1.1, now move up to 1.1.2
Issue-ID: POLICY-436
Change-Id: I5d2c79ac5f7a2561e79a6644785238465180c59c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Missing staging repo
Issue-ID: POLICY-441
Change-Id: I7b74861d774685c5d0418fcde68fd0992dd58198
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Remove the line where password get stored in variable
Issue-ID: POLICY-442
Change-Id: I5d474c7a27dfbdcf49b5f1578be75bd2cb627afe
Signed-off-by: Joseph Chou <jc2555@att.com>
|
|
Releasing version 1.1.0 so we need to update to 1.1.1
Issue-ID: POLICY-436
Change-Id: Ie8979e618b49ebd50d0527275cb70cc3824cde1f
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Changes to dependencyCheck to correctly take into account subsystemTest on the first pass through dependencies. Allows for status of repo to remain failed in the case that it fails.
Issue-ID: POLICY-431
Change-Id: I23ce43ce41c546edad73ec8055e513ccc61933b0
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
|
|
Remove startTransaction from testTransaction since it does
nothing functionally and causes exceptions which are logged.
Issue-ID: POLICY-369
Change-Id: Idd064b49e1d68832d14039870414626ca56c779b
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
|
|
Issue-Id:POLICY-252
Change-Id: I839811ba15d0c478c83c03818087d3153b77ddb1
Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
|
|
Following independent release and versioning process guidelines.
Issue-ID: POLICY-225
Change-Id: I3dad2abc5040255c9271c45eae99394dfd4208b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Issue-Id:POLICY-252
Change-Id: Ibf8b6790cbf9f65f1d3b3fc4476f686ff8981a10
Signed-off-by: Bharat saraswal <bharat.saraswal@huawei.com>
|
|
I think that making these private and using accessor functions
we can remove the sonar critical for them.
Issue-ID: POLICY-237
Change-Id: I4edbf909935fe17b0ef087b5cd0e384d78d104d6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Focused on hard coded passwords. I believe they are only
used for JUnit tests so I moved them into a file for use.
If they still show up on sonar then I will move into a properties
file and/or mark as not going to fix.
Issue-ID: POLICY-237
Change-Id: I6fa561714091043a2ea5e2edfb0441c2dfc8b044
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Changed all instances of Sys.out or PolicyLogger to
slf4j.
Issue-ID: POLICY-178
Change-Id: Ia91af1deb18a9b5c466f6f8a6c546c17c54e14ad
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Just logging the exceptions anyway and remove e.printstack since
that goes to stdout/stderr.
Issue-ID: POLICY-195
Change-Id: I60616bd6ce633e2fcae266bb37eb735c6e6bb4c4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Addressing the following sonar critical:
Use a logger to log this exception
Either log or rethrow this exception
It does not hurt to simply do these as well as clean out
lines of code that dump to Sys.out via e.printStackTrace.
Issue-ID: POLICY-195
Change-Id: Ibc328094a0653b7baa04778298e4a69955105ea3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
|
|
The name parameter in the root pom.xml should
match the project name in gerrit to reflect consistency
in Sonar.
Change-Id: Iff23fa13f8b3500aa107447896eed07bfd0d5847
Issue-id: CIMAN-65
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
|
|
Seems oparent sets the version resulting in Eclipse generating warnings for the pom.
Also cleaned up unused imports.
Issue-ID: POLICY-216
Change-Id: I634025f67aa8847d1c2b6c76b0c8c09336886594
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Included license header in IntegrityAuditException class since
it was accidentally omitted when class was originally created.
Issue-ID: POLICY-96
Change-Id: Idcb24e8c7fc6b5a17dc96b51c227be3e24be2bda
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Patch 1: Tweaks Integrity-Audit JUnits to allow
at least some estimate of code coverage. It was
not possible to enable all the tests as there are
threading issues when run in the JUnit environment.
Consequently, this is about 2/3 of the actual code
coverage. The estimate coverage is about 46%
Patch 2: Changes a persistence unit in DBDAOTest.
Patch 3: Adds tweaks to IntegrityMonitor JUnits. The
estimated state management code coverage is 70%.
Patch 4: Removed an IntegrityAudit test that failed
which reduced the estimated coverage to 45%
Issue-ID: POLICY-108
Change-Id: I693e56083c3ed66e020e82d5ac906ce29224bd58
Signed-off-by: Kevin McKiou <km097d@att.com>
|
|
|
|
Resolved major and critical sonar issues in integrity-monitor
module.
Issue-ID: [POLICY-96]
Change-Id: If1da196134a73535668d42f429d647fc819ecaee
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Change-Id: I599fd087c803d062ed6fe1145bf0526fdd29d723
Issue-ID: POLICY-71
Signed-off-by: Jorge Hernandez <jh1730@att.com>
|
|
Add this should remove Eclipse warnings:
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check (execution: check-style, phase: process-sources)
Issue-Id: POLICY-166
Change-Id: I6e83f05e4d034475d04d85e9b9fbf5f11a1969c7
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Modified classes in integrity-audit module to resolve major sonar issues.
Issue-ID: [POLICY-96]
Change-Id: I5ef0abb8d2a3ea1ae93edc00363c4d2bea1747e2
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
|
|
|
|
Resolved 7 sonar blockers in the integrity monitor and integrity audit
projects.
Change-Id: I7bba7619d3b71f7aebcc2642d07a64876ee7aea0
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Change-Id: I63ae06a4ed4d9f327a75da021d710da6616465c8
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
|
|
Modified code in ECOMP-Logging to resolve critical/major sonar issues.
Not all issues were resolved as some guidance needs to be provided for
specific cases.
Restored config/policyLogger.properties file. It was modified by a junit
test.
Change-Id: I49fee98b2497d9d503d81bbbacbb1b416e1058a7
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
|
|
PolicyLogger.info(Object arg0) calls itself recursively until it eventually
causes a stack overflow error.
Fix is to call debugLogger.info(MessageCodes, String) from within
PolicyLogger.info(Object).
Additionally, PolicyLogger.info(String arg0) was removed as
debugLogger.info(MessageCodes, String) can be called directly.
Change-Id: Id141027b544efa06b79f54a6726843b2a47481b9
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
|
|
Change-Id: If1edee2823e1edc83781b2e757364b62cb9b6d36
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Change-Id: I9a9b2ba08d4570c1782914fbc087e9c0d6328ed2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
The error for merging is permissions issue. Helpdesk #43714
Change-Id: Ifc641b630b023defc56da42aa3359ad330361395
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|