From 173678244c13fbe1302b443607806afb3b4f061c Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Wed, 18 Oct 2017 14:47:26 +0530 Subject: Added the missing @Deprecated annotation Issue-id: SO-235 Change-Id: Id3397a8efdecd94b57e761551ced94d6c6a49cb0 Signed-off-by: rama-huawei --- .../src/main/java/com/woorea/openstack/nova/model/KeyPairs.java | 6 +++--- .../com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java | 2 ++ .../src/main/java/com/woorea/openstack/nova/model/Server.java | 2 +- .../src/main/java/com/woorea/openstack/nova/model/ServerAction.java | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'nova-model/src') diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java index 0398bf3..db24f8d 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/KeyPairs.java @@ -39,11 +39,11 @@ public class KeyPairs implements Iterable, Serializable { * @return the list */ public List getList() { - List list = new ArrayList(); + List keyPairList = new ArrayList<>(); for(KeyPairWrapper wrapper : this.list) { - list.add(wrapper.keypair); + keyPairList.add(wrapper.keypair); } - return list; + return keyPairList; } @Override diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java index d5ff7b3..d1a3ec0 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/SecurityGroupRuleForCreate.java @@ -111,6 +111,7 @@ public class SecurityGroupRuleForCreate implements Serializable { * @param parentGroupId the parentGroupId to set * @deprecated Use {@link #setParentGroupId(String)} */ + @Deprecated public void setParentGroupId(Integer parentGroupId) { this.parentGroupId = String.valueOf(parentGroupId); } @@ -189,6 +190,7 @@ public class SecurityGroupRuleForCreate implements Serializable { * @param groupId the groupId to set * @deprecated Use {@link #setGroupId(String)} */ + @Deprecated public void setGroupId(Integer groupId) { this.groupId = String.valueOf(groupId); } diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java index 938fc2b..20ab039 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/Server.java @@ -102,7 +102,7 @@ public class Server implements Serializable { } } - private Map> addresses = new HashMap>(); + private Map> addresses = new HashMap<>(); @JsonAnySetter public void add(String key, List
value) { diff --git a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java index 9ccc43b..80793a7 100644 --- a/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java +++ b/nova-model/src/main/java/com/woorea/openstack/nova/model/ServerAction.java @@ -91,9 +91,9 @@ public interface ServerAction extends Serializable { private String accessIPv6; - private Map metadata = new HashMap(); + private Map metadata = new HashMap<>(); - private List personality = new ArrayList(); + private List personality = new ArrayList<>(); @JsonProperty("OS-DCF:diskConfig") private String diskConfig; -- cgit 1.2.3-korg