From d7710a13cd5413f790f125550d324b4c5c1ea4f5 Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Thu, 23 Apr 2009 17:15:32 +0000
Subject: [PATCH] Fixes the warning messages generated by fix for issue# 3387
---
opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
index dc8f792..2d76721 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/schema/ObjectClassSyntax.java
@@ -261,8 +261,8 @@
// and with all lowercase characters.
String valueStr = value.toString();
String lowerStr = toLowerCase(valueStr);
-
-
+ boolean allowExceptions = DirectoryServer.isRunning()?
+ DirectoryServer.allowAttributeNameExceptions():true;
// We'll do this a character at a time. First, skip over any leading
// whitespace.
int pos = 0;
@@ -360,7 +360,7 @@
while ((pos < length) && ((c = valueStr.charAt(pos++)) != ' '))
{
if (isAlpha(c) || isDigit(c) || (c == '-') ||
- ((c == '_') && DirectoryServer.allowAttributeNameExceptions()))
+ ((c == '_') && allowExceptions))
{
// This is fine. It is an acceptable character.
}
@@ -510,8 +510,6 @@
//RFC 2251: A specification may also assign one or more textual names
//for an attribute type. These names MUST begin with a letter, and
//only contain ASCII letters, digit characters and hyphens.
- boolean allowExceptions =
- DirectoryServer.allowAttributeNameExceptions();
//Iterate over all the names and throw an exception if it is invalid.
for(String name : names)
{
@@ -1161,8 +1159,8 @@
// Skip over any spaces at the beginning of the value.
char c = '\u0000';
int length = lowerStr.length();
- boolean allowExceptions =
- DirectoryServer.allowAttributeNameExceptions();
+ boolean allowExceptions = DirectoryServer.isRunning()?
+ DirectoryServer.allowAttributeNameExceptions():true;
while ((startPos < length) && ((c = lowerStr.charAt(startPos)) == ' '))
{
startPos++;
@@ -1237,7 +1235,7 @@
while ((startPos < length) && ((c = lowerStr.charAt(startPos++)) != ' '))
{
if (isAlpha(c) || isDigit(c) || (c == '-') ||
- ((c == '_') && DirectoryServer.allowAttributeNameExceptions()))
+ ((c == '_') && allowExceptions))
{
woidBuffer.append(c);
}
--
Gitblit v1.10.0