Commit 9e43ee1d authored by Andy Wilkinson's avatar Andy Wilkinson

Merge pull request #15782 from Christoph Dreiss

* gh-15782:
  Optimize ConfigurationPropertyName

Closes gh-15782
parents 7ed92e9b 5b3e1aa2
......@@ -237,7 +237,7 @@ public final class ConfigurationPropertyName
if (this.getNumberOfElements() >= name.getNumberOfElements()) {
return false;
}
for (int i = 0; i < this.elements.getSize(); i++) {
for (int i = this.elements.getSize() - 1; i >= 0; i--) {
if (!elementEquals(this.elements, name.elements, i)) {
return false;
}
......@@ -309,7 +309,7 @@ public final class ConfigurationPropertyName
&& other.elements.canShortcutWithSource(ElementType.UNIFORM)) {
return toString().equals(other.toString());
}
for (int i = 0; i < this.elements.getSize(); i++) {
for (int i = this.elements.getSize() - 1; i >= 0; i--) {
if (!elementEquals(this.elements, other.elements, i)) {
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment