cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject [1/7] git commit: updated refs/heads/master to fe4f0b1
Date Mon, 22 Jun 2015 11:01:42 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 53e42fb45 -> fe4f0b1a5


Cleanup some lint checker warning in base classes

Signed-off-by: Daan Hoogland <daan.hoogland@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1603f722
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1603f722
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1603f722

Branch: refs/heads/master
Commit: 1603f722c4be9fafd54a2f6dcee789ac56d0b053
Parents: 540b163
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sun Jun 21 15:56:18 2015 +0200
Committer: Daan Hoogland <daan.hoogland@gmail.com>
Committed: Mon Jun 22 13:01:18 2015 +0200

----------------------------------------------------------------------
 plugins/hypervisors/ovm3/pom.xml                              | 5 +++++
 .../com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java   | 7 ++++---
 .../main/java/com/cloud/hypervisor/ovm3/objects/Linux.java    | 1 +
 .../main/java/com/cloud/hypervisor/ovm3/objects/Network.java  | 5 +++--
 .../java/com/cloud/hypervisor/ovm3/objects/OvmObject.java     | 4 ----
 .../src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java | 2 ++
 .../java/com/cloud/hypervisor/ovm3/objects/Repository.java    | 3 +++
 .../java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java | 3 +++
 .../src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java  | 4 ++++
 .../ovm3/resources/helpers/Ovm3ConfigurationTest.java         | 2 +-
 10 files changed, 26 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/pom.xml b/plugins/hypervisors/ovm3/pom.xml
index 24ef6a4..d7b1138 100644
--- a/plugins/hypervisors/ovm3/pom.xml
+++ b/plugins/hypervisors/ovm3/pom.xml
@@ -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>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java
index 67d993a..3871787 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/CloudstackPlugin.java
@@ -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);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Linux.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Linux.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Linux.java
index 4ae933c..b037dd7 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Linux.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Linux.java
@@ -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) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Network.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Network.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Network.java
index f6e0848..008eb43 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Network.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Network.java
@@ -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);
     }
 
     /*

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/OvmObject.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/OvmObject.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/OvmObject.java
index cfe249e..d7ef8cd 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/OvmObject.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/OvmObject.java
@@ -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);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java
index 066a08a..48778d9 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Pool.java
@@ -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- */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Repository.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Repository.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Repository.java
index 36b9ea8..7cbf0e7 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Repository.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Repository.java
@@ -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);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java
index e581dea..5bfacd2 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/StoragePlugin.java
@@ -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;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java
b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java
index b03473d..6387566 100644
--- a/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java
+++ b/plugins/hypervisors/ovm3/src/main/java/com/cloud/hypervisor/ovm3/objects/Xen.java
@@ -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() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1603f722/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3ConfigurationTest.java
b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3ConfigurationTest.java
index 5cbb2b7..80ee54f 100644
--- a/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3ConfigurationTest.java
+++ b/plugins/hypervisors/ovm3/src/test/java/com/cloud/hypervisor/ovm3/resources/helpers/Ovm3ConfigurationTest.java
@@ -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");


Mime
View raw message