From 868abb93bdc4a7d67e840eb67e71c0743d24103a Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Mon, 16 Dec 2013 10:27:49 +0000
Subject: [PATCH] Minor refactoring: rename MatchingRule.getAssertion() for substrings to MatchingRule.getSubstringAssertion().
---
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Matcher.java | 2 +-
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java | 2 +-
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleImpl.java | 12 ++++++------
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java | 14 +++++++-------
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstringMatchingRuleTest.java | 8 ++++----
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java | 6 +++---
6 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Matcher.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Matcher.java
index c4b8730..337ac5f 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Matcher.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/Matcher.java
@@ -481,7 +481,7 @@
}
try {
- assertion = rule.getAssertion(initialSubstring, anySubstrings, finalSubstring);
+ assertion = rule.getSubstringAssertion(initialSubstring, anySubstrings, finalSubstring);
} catch (final DecodeException de) {
// TODO: I18N
DEFAULT_LOG.warn("The substring assertion values contain an invalid value", de);
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java
index f253b27..4031b8c 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractMatchingRuleImpl.java
@@ -77,7 +77,7 @@
return new DefaultEqualityAssertion(normalizeAttributeValue(schema, value));
}
- public Assertion getAssertion(final Schema schema, final ByteSequence subInitial,
+ public Assertion getSubstringAssertion(final Schema schema, final ByteSequence subInitial,
final List<? extends ByteSequence> subAnyElements, final ByteSequence subFinal)
throws DecodeException {
return UNDEFINED_ASSERTION;
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java
index 4d81170..b0af401 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/AbstractSubstringMatchingRuleImpl.java
@@ -144,7 +144,7 @@
final String valueString = value.toString();
if (valueString.length() == 1 && valueString.charAt(0) == '*') {
- return getAssertion(schema, initialString, anyStrings, finalString);
+ return getSubstringAssertion(schema, initialString, anyStrings, finalString);
}
final char[] escapeChars = new char[] { '*' };
@@ -178,11 +178,11 @@
}
}
- return getAssertion(schema, initialString, anyStrings, finalString);
+ return getSubstringAssertion(schema, initialString, anyStrings, finalString);
}
@Override
- public Assertion getAssertion(final Schema schema, final ByteSequence subInitial,
+ public Assertion getSubstringAssertion(final Schema schema, final ByteSequence subInitial,
final List<? extends ByteSequence> subAnyElements, final ByteSequence subFinal)
throws DecodeException {
final ByteString normInitial =
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
index 85f07b4..7ae600d 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRule.java
@@ -290,7 +290,7 @@
/**
* Returns the normalized form of the provided assertion value, which is
- * best suite for efficiently performing matching operations on that value.
+ * best suited for efficiently performing matching operations on that value.
* The assertion value is guaranteed to be valid against this matching
* rule's assertion syntax.
*
@@ -306,7 +306,7 @@
/**
* Returns the normalized form of the provided assertion substring values,
- * which is best suite for efficiently performing matching operations on
+ * which is best suited for efficiently performing matching operations on
* that value.
*
* @param subInitial
@@ -322,15 +322,15 @@
* @throws DecodeException
* if the syntax of the value is not valid.
*/
- public Assertion getAssertion(final ByteSequence subInitial,
+ public Assertion getSubstringAssertion(final ByteSequence subInitial,
final List<? extends ByteSequence> subAnyElements, final ByteSequence subFinal)
throws DecodeException {
- return impl.getAssertion(schema, subInitial, subAnyElements, subFinal);
+ return impl.getSubstringAssertion(schema, subInitial, subAnyElements, subFinal);
}
/**
* Returns the normalized form of the provided assertion value, which is
- * best suite for efficiently performing greater than or equal ordering
+ * best suited for efficiently performing greater than or equal ordering
* matching operations on that value. The assertion value is guaranteed to
* be valid against this matching rule's assertion syntax.
*
@@ -346,7 +346,7 @@
/**
* Returns the normalized form of the provided assertion value, which is
- * best suite for efficiently performing greater than or equal ordering
+ * best suited for efficiently performing greater than or equal ordering
* matching operations on that value. The assertion value is guaranteed to
* be valid against this matching rule's assertion syntax.
*
@@ -459,7 +459,7 @@
/**
* Returns the normalized form of the provided attribute value, which is
- * best suite for efficiently performing matching operations on that value.
+ * best suited for efficiently performing matching operations on that value.
*
* @param value
* The attribute value to be normalized.
diff --git a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleImpl.java b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleImpl.java
index 99fc96e..923ab0b 100644
--- a/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleImpl.java
+++ b/opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/schema/MatchingRuleImpl.java
@@ -51,7 +51,7 @@
/**
* Retrieves the normalized form of the provided assertion value, which is
- * best suite for efficiently performing matching operations on that value.
+ * best suited for efficiently performing matching operations on that value.
* The assertion value is guarenteed to be valid against this matching
* rule's assertion syntax.
*
@@ -67,7 +67,7 @@
/**
* Retrieves the normalized form of the provided assertion substring values,
- * which is best suite for efficiently performing matching operations on
+ * which is best suited for efficiently performing matching operations on
* that value.
*
* @param schema
@@ -85,13 +85,13 @@
* @throws DecodeException
* if an syntax error occured while parsing the value.
*/
- public Assertion getAssertion(Schema schema, ByteSequence subInitial,
+ public Assertion getSubstringAssertion(Schema schema, ByteSequence subInitial,
List<? extends ByteSequence> subAnyElements, ByteSequence subFinal)
throws DecodeException;
/**
* Retrieves the normalized form of the provided assertion value, which is
- * best suite for efficiently performing greater than or equal matching
+ * best suited for efficiently performing greater than or equal matching
* operations on that value. The assertion value is guarenteed to be valid
* against this matching rule's assertion syntax.
*
@@ -108,7 +108,7 @@
/**
* Retrieves the normalized form of the provided assertion value, which is
- * best suite for efficiently performing greater than or equal matching
+ * best suited for efficiently performing greater than or equal matching
* operations on that value. The assertion value is guarenteed to be valid
* against this matching rule's assertion syntax.
*
@@ -125,7 +125,7 @@
/**
* Retrieves the normalized form of the provided attribute value, which is
- * best suite for efficiently performing matching operations on that value.
+ * best suited for efficiently performing matching operations on that value.
*
* @param schema
* The schema in which this matching rule is defined.
diff --git a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstringMatchingRuleTest.java b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstringMatchingRuleTest.java
index c0b654a..28bdc0e 100644
--- a/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstringMatchingRuleTest.java
+++ b/opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/SubstringMatchingRuleTest.java
@@ -94,7 +94,7 @@
// normalize the 2 provided values and check that they are equals
final ByteString normalizedValue = rule.normalizeAttributeValue(ByteString.valueOf(value));
- if (rule.getAssertion(null, null, ByteString.valueOf(finalValue)).matches(normalizedValue) != result
+ if (rule.getSubstringAssertion(null, null, ByteString.valueOf(finalValue)).matches(normalizedValue) != result
|| rule.getAssertion(ByteString.valueOf("*" + finalValue)).matches(normalizedValue) != result) {
fail("final substring matching rule " + rule + " does not give expected result ("
+ result + ") for values : " + value + " and " + finalValue);
@@ -112,7 +112,7 @@
// normalize the 2 provided values and check that they are equals
final ByteString normalizedValue = rule.normalizeAttributeValue(ByteString.valueOf(value));
- if (rule.getAssertion(ByteString.valueOf(initial), null, null).matches(normalizedValue) != result
+ if (rule.getSubstringAssertion(ByteString.valueOf(initial), null, null).matches(normalizedValue) != result
|| rule.getAssertion(ByteString.valueOf(initial + "*")).matches(normalizedValue) != result) {
fail("initial substring matching rule " + rule + " does not give expected result ("
+ result + ") for values : " + value + " and " + initial);
@@ -133,7 +133,7 @@
for (final String middleSub : anys) {
anyList.add(ByteString.valueOf(middleSub));
}
- rule.getAssertion(subInitial == null ? null : ByteString.valueOf(subInitial), anyList,
+ rule.getSubstringAssertion(subInitial == null ? null : ByteString.valueOf(subInitial), anyList,
subFinal == null ? null : ByteString.valueOf(subFinal));
}
@@ -182,7 +182,7 @@
middleList.add(ByteString.valueOf(middleSub));
}
- if (rule.getAssertion(null, middleList, null).matches(normalizedValue) != result
+ if (rule.getSubstringAssertion(null, middleList, null).matches(normalizedValue) != result
|| rule.getAssertion(ByteString.valueOf(printableMiddleSubs)).matches(
normalizedValue) != result) {
fail("middle substring matching rule " + rule + " does not give expected result ("
--
Gitblit v1.10.0