]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui.dist/src/main/java/org/argeo/slc/client/ui/dist/model/ModularDistBaseElem.java
Fix a few issues while testing and building distributions.
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui.dist / src / main / java / org / argeo / slc / client / ui / dist / model / ModularDistBaseElem.java
index 54fdf107054c38aa083b3d760d3f479c93733dc5..b85659440e3156bf93b90897c3458c2b769c6b85 100644 (file)
@@ -49,7 +49,8 @@ public class ModularDistBaseElem extends DistParentElem {
        }
 
        /**
-        * Override normal behaviour to initialise children only when first requested
+        * Override normal behaviour to initialise children only when first
+        * requested
         */
        @Override
        public synchronized boolean hasChildren() {
@@ -61,7 +62,8 @@ public class ModularDistBaseElem extends DistParentElem {
        };
 
        /**
-        * Override normal behaviour to initialise children only when first requested
+        * Override normal behaviour to initialise children only when first
+        * requested
         */
        @Override
        public synchronized Object[] getChildren() {
@@ -72,15 +74,15 @@ public class ModularDistBaseElem extends DistParentElem {
                                NodeIterator ni = getDistVersions();
                                while (ni != null && ni.hasNext()) {
                                        Node curNode = ni.nextNode();
-                                       addChild(new ModularDistVersionElem(this, curNode
-                                                       .getProperty(SlcNames.SLC_ARTIFACT_VERSION)
-                                                       .getString(), curNode));
+                                       if (curNode.hasProperty(SlcNames.SLC_ARTIFACT_VERSION))
+                                               addChild(new ModularDistVersionElem(this, curNode
+                                                               .getProperty(SlcNames.SLC_ARTIFACT_VERSION)
+                                                               .getString(), curNode));
                                }
                                return super.getChildren();
                        } catch (RepositoryException re) {
-                               throw new ArgeoException(
-                                               "Unable to retrieve children for "
-                                                               + modularDistBase, re);
+                               throw new ArgeoException("Unable to retrieve children for "
+                                               + modularDistBase, re);
                        }
                }
        }