Skip to content

Commit b401563

Browse files
committed
findbugs: serialized class serializable
1 parent df6f40f commit b401563

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

‎server/src/com/cloud/api/doc/Argument.java‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@
1616
// under the License.
1717
package com.cloud.api.doc;
1818

19+
import java.io.Serializable;
1920
import java.util.List;
2021

21-
public class Argument implements Comparable{
22-
private String name;
22+
public class Argument implements Comparable<Object>, Serializable{
23+
/**
24+
*
25+
*/
26+
private static final long serialVersionUID = -5696100838854848492L;
27+
private String name;
2328
private String description;
2429
private Boolean required;
2530
private String type;
@@ -42,7 +47,7 @@ public Argument(String name, String description) {
4247
}
4348

4449
public String getType() {
45-
return this.type;
50+
return type;
4651
}
4752

4853
public void setType(String type) {
@@ -89,11 +94,12 @@ public void setSinceVersion(String sinceVersion) {
8994
this.sinceVersion = sinceVersion;
9095
}
9196

97+
@Override
9298
public int compareTo(Object anotherAgrument) throws ClassCastException {
9399
if (!(anotherAgrument instanceof Argument))
94100
throw new ClassCastException("An Argument object expected.");
95101
Argument argument = (Argument)anotherAgrument;
96-
return this.getName().compareToIgnoreCase(argument.getName());
102+
return getName().compareToIgnoreCase(argument.getName());
97103
}
98104

99105
public boolean hasArguments() {

0 commit comments

Comments
 (0)