Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-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 34831108D7 for ; Tue, 8 Dec 2015 11:51:35 +0000 (UTC) Received: (qmail 42067 invoked by uid 500); 8 Dec 2015 11:51:35 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 42017 invoked by uid 500); 8 Dec 2015 11:51:34 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 42006 invoked by uid 99); 8 Dec 2015 11:51:34 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2015 11:51:34 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6CB661A0942 for ; Tue, 8 Dec 2015 11:51:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.446 X-Spam-Level: X-Spam-Status: No, score=0.446 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.554] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id vc4WJBO19eK2 for ; Tue, 8 Dec 2015 11:51:33 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id D6B8920599 for ; Tue, 8 Dec 2015 11:51:32 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8517DE028C for ; Tue, 8 Dec 2015 11:46:31 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 01D8C3A04EC for ; Tue, 8 Dec 2015 11:46:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1718573 - /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java Date: Tue, 08 Dec 2015 11:46:30 -0000 To: commits@chemistry.apache.org From: fmui@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151208114631.01D8C3A04EC@svn01-us-west.apache.org> Author: fmui Date: Tue Dec 8 11:46:30 2015 New Revision: 1718573 URL: http://svn.apache.org/viewvc?rev=1718573&view=rev Log: Server: small bug fix in TypeDefinitionFactory Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java?rev=1718573&r1=1718572&r2=1718573&view=diff ============================================================================== --- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java (original) +++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java Tue Dec 8 11:46:30 2015 @@ -20,6 +20,8 @@ */ package org.apache.chemistry.opencmis.server.support; +import static org.apache.chemistry.opencmis.commons.impl.CollectionsHelper.isNotEmpty; + import java.math.BigInteger; import java.util.ArrayList; import java.util.Collections; @@ -1314,7 +1316,7 @@ public final class TypeDefinitionFactory Map attrs = (element.getAttributes() != null ? new HashMap( element.getAttributes()) : null); - if (element.getChildren() == null) { + if (isNotEmpty(element.getChildren())) { return new CmisExtensionElementImpl(element.getNamespace(), element.getName(), attrs, element.getValue()); } else { List children = new ArrayList();