Skip to content

Commit

Permalink
Fix wrong CommandObject called for strAlgoLCSKeys (#2859)
Browse files Browse the repository at this point in the history
* Fix wrong CommandObject called for strAlgoLCSKeys

* Remove 'final' from interface

* Edit JavaDoc
  • Loading branch information
sazzad16 authored Feb 1, 2022
1 parent ef8d545 commit 3c46791
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
12 changes: 6 additions & 6 deletions src/main/java/redis/clients/jedis/Jedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -7351,9 +7351,9 @@ public long strlen(final String key) {

/**
* Calculate the longest common subsequence of keyA and keyB.
* @param keyA keyA
* @param keyB keyB
* @param params the params
* @param keyA
* @param keyB
* @param params
* @return According to StrAlgoLCSParams to decide to return content to fill LCSMatchResult.
*/
@Override
Expand All @@ -7364,9 +7364,9 @@ public LCSMatchResult strAlgoLCSKeys(final String keyA, final String keyB, final

/**
* Calculate the longest common subsequence of strA and strB.
* @param strA strA
* @param strB strB
* @param params the params
* @param strA
* @param strB
* @param params
* @return According to StrAlgoLCSParams to decide to return content to fill LCSMatchResult.
*/
public LCSMatchResult strAlgoLCSStrings(final String strA, final String strB, final StrAlgoLCSParams params) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2998,7 +2998,7 @@ public Response<Long> bitop(BitOP op, byte[] destKey, byte[]... srcKeys) {

@Override
public Response<LCSMatchResult> strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params) {
return appendCommand(commandObjects.strAlgoLCSStrings(keyA, keyB, params));
return appendCommand(commandObjects.strAlgoLCSKeys(keyA, keyB, params));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/redis/clients/jedis/Pipeline.java
Original file line number Diff line number Diff line change
Expand Up @@ -3008,7 +3008,7 @@ public Response<Long> bitop(BitOP op, byte[] destKey, byte[]... srcKeys) {

@Override
public Response<LCSMatchResult> strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params) {
return appendCommand(commandObjects.strAlgoLCSStrings(keyA, keyB, params));
return appendCommand(commandObjects.strAlgoLCSKeys(keyA, keyB, params));
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/redis/clients/jedis/TransactionBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,7 @@ public Response<Long> bitop(BitOP op, byte[] destKey, byte[]... srcKeys) {

@Override
public Response<LCSMatchResult> strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params) {
return appendCommand(commandObjects.strAlgoLCSStrings(keyA, keyB, params));
return appendCommand(commandObjects.strAlgoLCSKeys(keyA, keyB, params));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,6 @@ public interface StringBinaryCommands {

long bitop(BitOP op, byte[] destKey, byte[]... srcKeys);

LCSMatchResult strAlgoLCSKeys(final byte[] keyA, final byte[] keyB, final StrAlgoLCSParams params);
LCSMatchResult strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params);

}
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ public interface StringCommands {

/**
* Calculate the longest common subsequence of keyA and keyB.
* @param keyA keyA
* @param keyB keyB
* @param params the params
* @param keyA
* @param keyB
* @param params
* @return According to StrAlgoLCSParams to decide to return content to fill LCSMatchResult.
*/
LCSMatchResult strAlgoLCSKeys(String keyA, String keyB, StrAlgoLCSParams params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,6 @@ public interface StringPipelineBinaryCommands {

Response<Long> bitop(BitOP op, byte[] destKey, byte[]... srcKeys);

Response<LCSMatchResult> strAlgoLCSKeys(final byte[] keyA, final byte[] keyB, final StrAlgoLCSParams params);
Response<LCSMatchResult> strAlgoLCSKeys(byte[] keyA, byte[] keyB, StrAlgoLCSParams params);

}

0 comments on commit 3c46791

Please sign in to comment.