From 25c26ffe0ec4b26fbca6f312a3bed1392bdd0c03 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Thu, 20 Sep 2007 12:06:25 +0000
Subject: [PATCH] Fix potential NPE in generated code.

---
 opendj-sdk/opends/resource/admin/property-types/aggregation.xsl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opendj-sdk/opends/resource/admin/property-types/aggregation.xsl b/opendj-sdk/opends/resource/admin/property-types/aggregation.xsl
index b4fb7b8..5ff16d0 100644
--- a/opendj-sdk/opends/resource/admin/property-types/aggregation.xsl
+++ b/opendj-sdk/opends/resource/admin/property-types/aggregation.xsl
@@ -206,6 +206,8 @@
           <xsl:value-of
             select="concat('      String value = get', $java-property-name, '();&#xa;')" />
           <xsl:value-of
+            select="concat('      if (value == null) return null;&#xa;')" />
+          <xsl:value-of
             select="concat('      return INSTANCE.get', $java-property-name, 'PropertyDefinition().getChildDN(value);&#xa;')" />
           <xsl:value-of select="'    }&#xa;'" />
         </xsl:when>

--
Gitblit v1.10.0