mirror of https://github.com/apache/cloudstack.git
Cleanup some lint checker warning in base classes
Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>
This commit is contained in:
parent
540b163cfc
commit
1603f722c4
|
|
@ -55,6 +55,11 @@
|
|||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.3</version>
|
||||
<configuration>
|
||||
<showDeprecation>true</showDeprecation>
|
||||
<showWarnings>true</showWarnings>
|
||||
<debug>true</debug>
|
||||
<debuglevel>lines,vars,source</debuglevel>
|
||||
<verbose>true</verbose>
|
||||
<useIncrementalCompilation>true</useIncrementalCompilation>
|
||||
<forceJavacCompilerUse>true</forceJavacCompilerUse>
|
||||
<compilerArgs>
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ public class CloudstackPlugin extends OvmObject {
|
|||
put("err", null);
|
||||
put("out", null);
|
||||
}
|
||||
private static final long serialVersionUID = 5L;
|
||||
};
|
||||
public ReturnCode() {
|
||||
}
|
||||
|
|
@ -120,7 +121,7 @@ public class CloudstackPlugin extends OvmObject {
|
|||
Integer sleep = interval;
|
||||
try {
|
||||
while (!x && retries > 0) {
|
||||
x = (Boolean) nullIsFalseCallWrapper("check_dom0_port", ip, port, interval);
|
||||
x = nullIsFalseCallWrapper("check_dom0_port", ip, port, interval);
|
||||
retries--;
|
||||
Thread.sleep(sleep * 1000);
|
||||
}
|
||||
|
|
@ -177,9 +178,9 @@ public class CloudstackPlugin extends OvmObject {
|
|||
return (Boolean) callWrapper("check_dom0_storage_health", path, script, guid, timeout);
|
||||
}
|
||||
public boolean ovsMkdirs(String dir) throws Ovm3ResourceException{
|
||||
return (Boolean) nullIsTrueCallWrapper("ovs_mkdirs", dir);
|
||||
return nullIsTrueCallWrapper("ovs_mkdirs", dir);
|
||||
}
|
||||
public boolean ovsMkdirs(String dir, Integer mode) throws Ovm3ResourceException{
|
||||
return (Boolean) nullIsTrueCallWrapper("ovs_mkdirs", dir, mode);
|
||||
return nullIsTrueCallWrapper("ovs_mkdirs", dir, mode);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ public class Linux extends OvmObject {
|
|||
put(MOUNTPOINT, null);
|
||||
put("Uuid", null);
|
||||
}
|
||||
private static final long serialVersionUID = 123L;
|
||||
};
|
||||
|
||||
public Boolean setDetails(Map<String, Object> fs) {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ public class Network extends OvmObject {
|
|||
put("MAC", null);
|
||||
put("Vlan", null);
|
||||
}
|
||||
private static final long serialVersionUID = 6L;
|
||||
};
|
||||
|
||||
public Interface() {
|
||||
|
|
@ -294,7 +295,7 @@ public class Network extends OvmObject {
|
|||
|
||||
public Object ovsBrConfig(String action, String br, String net)
|
||||
throws Ovm3ResourceException {
|
||||
return (Object) callWrapper("ovs_br_config", action, br, net);
|
||||
return callWrapper("ovs_br_config", action, br, net);
|
||||
}
|
||||
|
||||
/* 1 is untagged, goes till 4095 */
|
||||
|
|
@ -319,7 +320,7 @@ public class Network extends OvmObject {
|
|||
|
||||
private Object ovsVlanBridge(String action, String br, String net, int vlan)
|
||||
throws Ovm3ResourceException {
|
||||
return (Object) callWrapper("ovs_vlan_bridge", action, br, net, vlan);
|
||||
return callWrapper("ovs_vlan_bridge", action, br, net, vlan);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -93,7 +93,6 @@ public class OvmObject {
|
|||
}
|
||||
|
||||
/* nice try but doesn't work like that .. */
|
||||
@SafeVarargs
|
||||
public final <T> Object callWrapper(String call, T... args)
|
||||
throws Ovm3ResourceException {
|
||||
List<T> params = new ArrayList<T>();
|
||||
|
|
@ -109,7 +108,6 @@ public class OvmObject {
|
|||
}
|
||||
|
||||
/* should check on nil ? */
|
||||
@SafeVarargs
|
||||
public final <T> Boolean nullCallWrapper(String call, Boolean nullReturn, T... args) throws Ovm3ResourceException {
|
||||
Object x = callWrapper(call, args);
|
||||
if (x == null) {
|
||||
|
|
@ -120,11 +118,9 @@ public class OvmObject {
|
|||
return false;
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
public final <T> Boolean nullIsFalseCallWrapper(String call, T... args) throws Ovm3ResourceException {
|
||||
return nullCallWrapper(call, false, args);
|
||||
}
|
||||
@SafeVarargs
|
||||
public final <T> Boolean nullIsTrueCallWrapper(String call, T... args) throws Ovm3ResourceException {
|
||||
return nullCallWrapper(call, true, args);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public class Pool extends OvmObject {
|
|||
add("xen");
|
||||
add("utility");
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
private List<String> poolHosts = new ArrayList<String>();
|
||||
private final List<String> poolRoles = new ArrayList<String>();
|
||||
|
|
@ -155,6 +156,7 @@ public class Pool extends OvmObject {
|
|||
put("manager_certificate", managerCert);
|
||||
put("signed_server_certificate", signedCert);
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
Boolean rc = nullIsTrueCallWrapper("take_ownership", mgrConfig);
|
||||
/* because it restarts when it's done.... 2000? -sigh- */
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ public class Repository extends OvmObject {
|
|||
}
|
||||
|
||||
public static class RepoDbDetails {
|
||||
private static final long serialVersionUID = 2L;
|
||||
private final Map<String, String> dbEntry = new HashMap<String, String>() {
|
||||
{
|
||||
put("Uuid", null);
|
||||
|
|
@ -74,6 +75,7 @@ public class Repository extends OvmObject {
|
|||
put("Manager_uuid", null);
|
||||
put("Status", null);
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
|
||||
public RepoDbDetails() {
|
||||
|
|
@ -127,6 +129,7 @@ public class Repository extends OvmObject {
|
|||
private List<String> virtualDisks = new ArrayList<String>();
|
||||
private List<String> isos = new ArrayList<String>();
|
||||
private final Map<String, String> dbEntry = new HashMap<String, String>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
put("Repository_UUID", null);
|
||||
put(VERSION, null);
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ public class StoragePlugin extends OvmObject {
|
|||
put(NAME, EMPTY_STRING);
|
||||
put(MOUNTOPTIONS, new ArrayList<String>());
|
||||
}
|
||||
private static final long serialVersionUID = 3L;
|
||||
};
|
||||
public Map<String, Object> getDetails() {
|
||||
return storageDetails;
|
||||
|
|
@ -180,6 +181,7 @@ public class StoragePlugin extends OvmObject {
|
|||
put(USEDSIZE, 0);
|
||||
put(NAME, EMPTY_STRING);
|
||||
}
|
||||
private static final long serialVersionUID = 4L;
|
||||
};
|
||||
public Map<String, Object> getDetails() {
|
||||
return storageSource;
|
||||
|
|
@ -285,6 +287,7 @@ public class StoragePlugin extends OvmObject {
|
|||
put(FILEPATH, EMPTY_STRING);
|
||||
put(FILESIZE, EMPTY_STRING);
|
||||
}
|
||||
private static final long serialVersionUID = 1234L;
|
||||
};
|
||||
public Map<String, Object> getProperties() {
|
||||
return fileProperties;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ public class Xen extends OvmObject {
|
|||
*/
|
||||
public class Vm {
|
||||
/* 'vfb': [ 'type=vnc,vncunused=1,vnclisten=127.0.0.1,keymap=en-us'] */
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final List<String> vmVncElement = new ArrayList<String>();
|
||||
private Map<String, String> vmVnc = new HashMap<String, String>() {
|
||||
{
|
||||
|
|
@ -56,6 +57,7 @@ public class Xen extends OvmObject {
|
|||
put(VNCLISTEN, "127.0.0.1");
|
||||
put("keymap", "en-us");
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -75,6 +77,7 @@ public class Xen extends OvmObject {
|
|||
put("protocol", "x86_32-abi");
|
||||
put("uname", "");
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
|
||||
/* 'vif': [ 'mac=00:21:f6:00:00:00,bridge=c0a80100'] */
|
||||
|
|
@ -141,6 +144,7 @@ public class Xen extends OvmObject {
|
|||
put(DOMTYPE, vmDomainType);
|
||||
put(EXTRA, vmExtra);
|
||||
}
|
||||
private static final long serialVersionUID = 1L;
|
||||
};
|
||||
|
||||
public boolean isControlDomain() {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class Ovm3ConfigurationTest {
|
|||
params.put("max.template.iso.size", "50");
|
||||
params.put("host", "ovm-1");
|
||||
params.put("com.cloud.network.Networks.RouterPrivateIpStrategy",
|
||||
"DcGlobal");
|
||||
"DcGlobal");
|
||||
params.put("agentport", "8899");
|
||||
params.put("Host.OS.Kernel.Version", "2.6.39-300.22.2.el5uek");
|
||||
params.put("migratewait", "3600");
|
||||
|
|
|
|||
Loading…
Reference in New Issue