You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2014/01/23 15:44:45 UTC

[1/2] git commit: updated refs/heads/master to 86df2c1

Updated Branches:
  refs/heads/master c53778c33 -> 86df2c1f8


Findbugs finding: Fix potential NPE


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

Branch: refs/heads/master
Commit: 86df2c1f8022bbd4417a06aea22693f14b1db733
Parents: e668c3f
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Jan 23 14:44:02 2014 +0000
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Jan 23 14:44:34 2014 +0000

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java     | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/86df2c1f/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
----------------------------------------------------------------------
diff --git a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
index 21b3026..363b91f 100755
--- a/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
+++ b/vmware-base/src/com/cloud/hypervisor/vmware/mo/DatastoreMO.java
@@ -32,6 +32,7 @@ import com.vmware.vim25.PropertySpec;
 import com.vmware.vim25.SelectionSpec;
 import com.vmware.vim25.TraversalSpec;
 
+import com.cloud.exception.CloudException;
 import com.cloud.hypervisor.vmware.util.VmwareContext;
 import com.cloud.utils.Pair;
 
@@ -181,7 +182,7 @@ public class DatastoreMO extends BaseMO {
     }
 
     public boolean copyDatastoreFile(String srcFilePath, ManagedObjectReference morSrcDc, ManagedObjectReference morDestDs, String destFilePath,
-        ManagedObjectReference morDestDc, boolean forceOverwrite) throws Exception {
+            ManagedObjectReference morDestDc, boolean forceOverwrite) throws Exception {
 
         String srcDsName = getName();
         DatastoreMO destDsMo = new DatastoreMO(_context, morDestDs);
@@ -209,7 +210,7 @@ public class DatastoreMO extends BaseMO {
     }
 
     public boolean moveDatastoreFile(String srcFilePath, ManagedObjectReference morSrcDc, ManagedObjectReference morDestDs, String destFilePath,
-        ManagedObjectReference morDestDc, boolean forceOverwrite) throws Exception {
+            ManagedObjectReference morDestDc, boolean forceOverwrite) throws Exception {
 
         String srcDsName = getName();
         DatastoreMO destDsMo = new DatastoreMO(_context, morDestDs);
@@ -342,6 +343,10 @@ public class DatastoreMO extends BaseMO {
         ArrayList<HostDatastoreBrowserSearchResults> results = browserMo.searchDatastoreSubFolders("[" + getName() + "]", fileName, caseInsensitive);
         if (results != null && results.size() > 1) {
             s_logger.warn("Multiple files with name " + fileName + " exists in datastore " + datastorePath + ". Trying to choose first file found in search attempt.");
+        } else if (results == null) {
+            String msg = "No file found with name " + fileName + " found in datastore " + datastorePath;
+            s_logger.error(msg);
+            throw new CloudException(msg);
         }
         for (HostDatastoreBrowserSearchResults result : results) {
             List<FileInfo> info = result.getFile();


[2/2] git commit: updated refs/heads/master to 86df2c1

Posted by hu...@apache.org.
Add configuration to the reporting section of the pom so we have findbugs and cobertura output in the site output.


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

Branch: refs/heads/master
Commit: e668c3f4e5cd7b1ea38ff5b8b5808b6c0879cb55
Parents: c53778c
Author: Hugo Trippaers <ht...@schubergphilis.com>
Authored: Thu Jan 23 14:42:54 2014 +0000
Committer: Hugo Trippaers <ht...@schubergphilis.com>
Committed: Thu Jan 23 14:44:34 2014 +0000

----------------------------------------------------------------------
 pom.xml | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e668c3f4/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8d84261..76ac046 100644
--- a/pom.xml
+++ b/pom.xml
@@ -897,6 +897,25 @@
       <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
+         <configuration>
+           <minmemory>128m</minmemory>
+           <maxmemory>1g</maxmemory>
+         </configuration>
+      </plugin>
+      <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-project-info-reports-plugin</artifactId>
+         <version>2.7</version>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>cobertura-maven-plugin</artifactId>
+        <version>2.6</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-site-plugin</artifactId>
+        <version>3.3</version>
       </plugin>
     </plugins>
   </reporting>