brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [2/5] incubator-brooklyn git commit: Improve errors messages for catalog libraries
Date Mon, 18 May 2015 15:32:33 GMT
Improve errors messages for catalog libraries


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/32a98ea7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/32a98ea7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/32a98ea7

Branch: refs/heads/master
Commit: 32a98ea78fa0cb773dcb5ef6399b0808ea89ec0b
Parents: 4acb6ea
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Thu May 14 10:46:35 2015 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Thu May 14 10:46:35 2015 +0300

----------------------------------------------------------------------
 .../main/java/brooklyn/catalog/internal/CatalogBundleDto.java  | 6 +++---
 .../brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java  | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/32a98ea7/core/src/main/java/brooklyn/catalog/internal/CatalogBundleDto.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/catalog/internal/CatalogBundleDto.java b/core/src/main/java/brooklyn/catalog/internal/CatalogBundleDto.java
index 35353c4..46658fb 100644
--- a/core/src/main/java/brooklyn/catalog/internal/CatalogBundleDto.java
+++ b/core/src/main/java/brooklyn/catalog/internal/CatalogBundleDto.java
@@ -32,10 +32,10 @@ public class CatalogBundleDto implements CatalogBundle {
 
     public CatalogBundleDto(String name, String version, String url) {
         if (name == null && version == null) {
-            Preconditions.checkNotNull(url, "url");
+            Preconditions.checkNotNull(url, "url to an OSGi bundle is required");
         } else {
-            Preconditions.checkNotNull(name, "name");
-            Preconditions.checkNotNull(version, "version");
+            Preconditions.checkNotNull(name, "both name and version are required");
+            Preconditions.checkNotNull(version, "both name and version are required");
         }
 
         this.symbolicName = name;

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/32a98ea7/usage/camp/src/test/java/io/brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java
----------------------------------------------------------------------
diff --git a/usage/camp/src/test/java/io/brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java
b/usage/camp/src/test/java/io/brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java
index b0afede..4103c45 100644
--- a/usage/camp/src/test/java/io/brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java
+++ b/usage/camp/src/test/java/io/brooklyn/camp/brooklyn/catalog/CatalogYamlEntityTest.java
@@ -417,7 +417,7 @@ public class CatalogYamlEntityTest extends AbstractYamlTest {
                 "- type: " + SIMPLE_ENTITY_TYPE);
             fail();
         } catch (NullPointerException e) {
-            Assert.assertEquals(e.getMessage(), "version");
+            Assert.assertEquals(e.getMessage(), "both name and version are required");
         }
         try {
             addCatalogItem(
@@ -431,7 +431,7 @@ public class CatalogYamlEntityTest extends AbstractYamlTest {
                 "- type: " + SIMPLE_ENTITY_TYPE);
             fail();
         } catch (NullPointerException e) {
-            Assert.assertEquals(e.getMessage(), "name");
+            Assert.assertEquals(e.getMessage(), "both name and version are required");
         }
     }
 


Mime
View raw message