From 1c45c905fb44ecb8c3b267674a5d62c613ce9a9f 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.

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

diff --git a/opends/resource/admin/property-types/aggregation.xsl b/opends/resource/admin/property-types/aggregation.xsl
index b4fb7b8..5ff16d0 100644
--- a/opends/resource/admin/property-types/aggregation.xsl
+++ b/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