Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/614#discussion_r29841051
--- Diff:
usage/rest-server/src/main/java/brooklyn/rest/resources/CatalogResource.java ---
@@ -454,8 +455,20 @@ private Response getCatalogItemIcon(CatalogItem<?, ?>
result) {
@SuppressWarnings("unchecked")
private static <T> List<T> castList(List<? super T> list, Class<T>
elementType) {
List<T> result = Lists.newArrayList();
- for (Object element : list) {
- result.add((T) element);
+ Iterator<? super T> li = list.iterator();
+ while (li.hasNext()) {
+ try {
+ result.add((T) li.next());
+ } catch (Throwable throwable) {
+ if (throwable instanceof NoClassDefFoundError) {
--- End diff --
How is this possible? The destination class is already loaded (passed as
argument).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---