You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2016/01/30 04:45:53 UTC

[07/10] incubator-brooklyn git commit: revert generics change as it causes inconsistent failures in different JVM's

revert generics change as it causes inconsistent failures in different JVM's


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

Branch: refs/heads/master
Commit: 03725f4cc582ad5870c34c4437fcd1f4e6f1926c
Parents: 624cf2a
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Fri Jan 22 11:58:16 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Fri Jan 22 11:58:16 2016 +0000

----------------------------------------------------------------------
 .../org/apache/brooklyn/rest/transform/CatalogTransformer.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/03725f4c/brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/transform/CatalogTransformer.java
----------------------------------------------------------------------
diff --git a/brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/transform/CatalogTransformer.java b/brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/transform/CatalogTransformer.java
index 3c19625..514d9c9 100644
--- a/brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/transform/CatalogTransformer.java
+++ b/brooklyn-server/rest/rest-server/src/main/java/org/apache/brooklyn/rest/transform/CatalogTransformer.java
@@ -69,7 +69,11 @@ public class CatalogTransformer {
 
         EntitySpec<?> spec = null;
         try {
-            spec = (EntitySpec<?>) b.getCatalog().createSpec(item);
+            @SuppressWarnings({ "unchecked", "rawtypes" })
+            // the raw type isn't needed according to eclipse IDE, but jenkins maven fails without it;
+            // must be a java version or compiler thing. don't remove even though it looks okay without it!
+            EntitySpec<?> specRaw = (EntitySpec<?>) b.getCatalog().createSpec((CatalogItem) item);
+            spec = specRaw;
             EntityDynamicType typeMap = BrooklynTypes.getDefinedEntityType(spec.getType());
             EntityType type = typeMap.getSnapshot();