Return-Path: X-Original-To: apmail-clerezza-commits-archive@www.apache.org Delivered-To: apmail-clerezza-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EB90B10174 for ; Wed, 19 Feb 2014 16:20:32 +0000 (UTC) Received: (qmail 62253 invoked by uid 500); 19 Feb 2014 16:20:32 -0000 Delivered-To: apmail-clerezza-commits-archive@clerezza.apache.org Received: (qmail 62225 invoked by uid 500); 19 Feb 2014 16:20:32 -0000 Mailing-List: contact commits-help@clerezza.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@clerezza.apache.org Delivered-To: mailing list commits@clerezza.apache.org Received: (qmail 62218 invoked by uid 99); 19 Feb 2014 16:20:31 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 16:20:31 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A73BA8C39F5; Wed, 19 Feb 2014 16:20:31 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: reto@apache.org To: commits@clerezza.apache.org Message-Id: <057212646d1a4d7aaebcf5c5c3921186@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: CLEREZZA-830: handling the case when no the list of documentation graphs is empty Date: Wed, 19 Feb 2014 16:20:31 +0000 (UTC) Repository: clerezza Updated Branches: refs/heads/master bb3c91a83 -> d110dfd4a CLEREZZA-830: handling the case when no the list of documentation graphs is empty Project: http://git-wip-us.apache.org/repos/asf/clerezza/repo Commit: http://git-wip-us.apache.org/repos/asf/clerezza/commit/d110dfd4 Tree: http://git-wip-us.apache.org/repos/asf/clerezza/tree/d110dfd4 Diff: http://git-wip-us.apache.org/repos/asf/clerezza/diff/d110dfd4 Branch: refs/heads/master Commit: d110dfd4a1b643e7742b33c93cae7119379581ff Parents: bb3c91a Author: retobg Authored: Wed Feb 19 17:20:13 2014 +0100 Committer: retobg Committed: Wed Feb 19 17:20:13 2014 +0100 ---------------------------------------------------------------------- .../clerezza/platform/documentation/DocumentationProvider.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/clerezza/blob/d110dfd4/platform.documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java ---------------------------------------------------------------------- diff --git a/platform.documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java b/platform.documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java index f92dff8..3923a8b 100644 --- a/platform.documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java +++ b/platform.documentation/src/main/java/org/apache/clerezza/platform/documentation/DocumentationProvider.java @@ -265,6 +265,10 @@ public class DocumentationProvider implements WeightedTcProvider, BundleListener private void createUnionGraph() { MGraph[] docGraphs = bundle2DocGraphMap.values(). toArray(new MGraph[bundle2DocGraphMap.size()]); - unitedDocumentations = new SimpleGraph(new UnionMGraph(docGraphs), true); + if (docGraphs.length > 0) { + unitedDocumentations = new SimpleGraph(new UnionMGraph(docGraphs), true); + } else { + unitedDocumentations = new SimpleGraph(new SimpleMGraph(), true); + } } }