diff options
author | sanchitap <sanchita@techmahindra.com> | 2017-09-27 12:26:01 +0530 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2017-09-27 21:59:24 +0000 |
commit | f2e77cc8209018f6955fba400ab4d0ff609448b1 (patch) | |
tree | d1721e77b6f8e2d20bcfa805b6373bf39fe73b52 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src | |
parent | a51683d2c64b86086a49ec0623c41823502f6503 (diff) |
Sonar Critical Fix
ProviderStackOperation.java: L98 and L178
Sonar link:https://sonar.onap.org/component_issues/index?id=org.openecomp.appc%3Aappc#resolved=false|severities=CRITICAL|rules=squid%3AS2184
Change-Id: Id73e2153b13716706b0dce4204d8c7519855afe5
Issue-Id :APPC-237
Signed-off-by: sanchitap <sanchita@techmahindra.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src')
-rw-r--r-- | appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/openecomp/appc/adapter/iaas/provider/operation/impl/base/ProviderStackOperation.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/openecomp/appc/adapter/iaas/provider/operation/impl/base/ProviderStackOperation.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/openecomp/appc/adapter/iaas/provider/operation/impl/base/ProviderStackOperation.java index 28d8e3d4d..9579fec33 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/openecomp/appc/adapter/iaas/provider/operation/impl/base/ProviderStackOperation.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/openecomp/appc/adapter/iaas/provider/operation/impl/base/ProviderStackOperation.java @@ -90,7 +90,8 @@ public abstract class ProviderStackOperation extends ProviderOperation{ } } - private boolean checkStatus(String expectedStatus, int pollInterval, String actualStatus) { +/* Changed the 'pollInterval' type as long. Thread.sleep method needs 'long millis' as an argument */ + private boolean checkStatus(String expectedStatus, long pollInterval, String actualStatus) { if (actualStatus.toUpperCase().equals(expectedStatus)) { return true; } else { @@ -161,8 +162,8 @@ public abstract class ProviderStackOperation extends ProviderOperation{ SvcLogicContext ctx = rc.getSvcLogicContext(); Context context = stack.getContext(); StackService stackService = context.getStackService(); - - int pollInterval = configuration.getIntegerProperty(Constants.PROPERTY_OPENSTACK_POLL_INTERVAL); +/* Changed the 'pollInterval' type as long. Thread.sleep method needs 'long millis' as an argument */ + long pollInterval = configuration.getIntegerProperty(Constants.PROPERTY_OPENSTACK_POLL_INTERVAL); int timeout = configuration.getIntegerProperty(Constants.PROPERTY_STACK_STATE_CHANGE_TIMEOUT); long maxTimeToWait = System.currentTimeMillis() + (long) timeout * 1000; Stack.Status stackStatus; |