From b653fca10b1793a835cc7590d37d451366bd9f3c Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Sat, 07 Jul 2007 22:48:49 +0000
Subject: [PATCH] Update the MakeLDIF tool so that the random:telephone tag will generate telephone numbers that include the country code so that they are more compliant with the ITU-T E.123 specification.

---
 opends/src/server/org/opends/server/tools/makeldif/RandomTag.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java b/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
index ac824e0..a59f9f0 100644
--- a/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
+++ b/opends/src/server/org/opends/server/tools/makeldif/RandomTag.java
@@ -673,16 +673,17 @@
         break;
 
       case RANDOM_TYPE_TELEPHONE:
+        buffer.append("+1 ");
         for (int i=0; i < 3; i++)
         {
           buffer.append(NUMERIC_CHARS[random.nextInt(NUMERIC_CHARS.length)]);
         }
-        buffer.append('-');
+        buffer.append(' ');
         for (int i=0; i < 3; i++)
         {
           buffer.append(NUMERIC_CHARS[random.nextInt(NUMERIC_CHARS.length)]);
         }
-        buffer.append('-');
+        buffer.append(' ');
         for (int i=0; i < 4; i++)
         {
           buffer.append(NUMERIC_CHARS[random.nextInt(NUMERIC_CHARS.length)]);

--
Gitblit v1.10.0