Skip to content

Commit 24c4ea6

Browse files
committed
run spotless apply
Signed-off-by: Kaushal Kumar <[email protected]>
1 parent 75b6e68 commit 24c4ea6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

plugins/workload-management/src/main/java/org/opensearch/plugin/wlm/rule/storage/DefaultAttributeValueStore.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public Optional<V> get(String key) {
5050
* 1. There is a Rule which has this prefix as one of the attribute values. In this case we should return the
5151
* Rule's label otherwise send empty
5252
*/
53-
for (Map.Entry<String, V> possibleMatch :trie.prefixMap(longestMatchingPrefix).entrySet()) {
53+
for (Map.Entry<String, V> possibleMatch : trie.prefixMap(longestMatchingPrefix).entrySet()) {
5454
if (key.startsWith(possibleMatch.getKey())) {
5555
return Optional.of(possibleMatch.getValue());
5656
}
@@ -61,7 +61,7 @@ public Optional<V> get(String key) {
6161

6262
private String findLongestMatchingPrefix(String key) {
6363
int low = 0;
64-
int high = key.length()-1;
64+
int high = key.length() - 1;
6565

6666
while (low < high) {
6767
int mid = low + (high - low + 1) / 2;
@@ -73,7 +73,7 @@ private String findLongestMatchingPrefix(String key) {
7373
if (!trie.prefixMap(possibleMatchingPrefix).isEmpty()) {
7474
low = mid;
7575
} else {
76-
high = mid-1;
76+
high = mid - 1;
7777
}
7878
}
7979

plugins/workload-management/src/test/java/org/opensearch/plugin/wlm/rule/storage/AttributeValueStoreTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import org.apache.commons.collections4.trie.PatriciaTrie;
1212
import org.opensearch.test.OpenSearchTestCase;
1313

14-
1514
public class AttributeValueStoreTests extends OpenSearchTestCase {
1615

1716
AttributeValueStore<String, String> subjectUnderTest;
@@ -46,7 +45,6 @@ public void testGetWhenNoProperPrefixIsPresent() {
4645
assertFalse(subjectUnderTest.get("foxtail").isEmpty());
4746
}
4847

49-
5048
public void testClear() {
5149
subjectUnderTest.add("foo", "bar");
5250
subjectUnderTest.clear();

0 commit comments

Comments
 (0)