Github user muthulee commented on a diff in the pull request:
https://github.com/apache/stratos/pull/261#discussion_r27940566
--- Diff:
components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/pojo/policy/PolicyManager.java
---
@@ -71,11 +71,11 @@ public boolean addAutoscalePolicy(AutoscalePolicy
policy) throws InvalidPolicyEx
if (log.isInfoEnabled()) {
log.info(String.format("Adding autoscaling policy: [id] %s",
policy.getId()));
}
- if(StringUtils.isEmpty(policy.getId())){
+ if (StringUtils.isEmpty(policy.getId())) {
throw new AutoScalerException("Autoscaling policy id cannot be
empty");
}
- this.addASPolicyToInformationModel(policy);
RegistryManager.getInstance().persistAutoscalerPolicy(policy);
+ this.addASPolicyToInformationModel(policy);
if (log.isInfoEnabled()) {
log.info(String.format("Autoscaling policy is added
successfully: [id] %s", policy.getId()));
--- End diff --
Why use format for one string?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---