Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use constant
Browse files Browse the repository at this point in the history
sazzad16 committed Aug 3, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6973782 commit df3d657
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -52,13 +52,13 @@ public byte[][] getByteParams(Long from, Long to, String... filters) {
List<byte[]> params = new ArrayList<>();

if (from == null) {
params.add("-".getBytes());
params.add(RedisTimeSeries.MINUS);
} else {
params.add(Protocol.toByteArray(from));
}

if (to == null) {
params.add("+".getBytes());
params.add(RedisTimeSeries.PLUS);
} else {
params.add(Protocol.toByteArray(to));
}
Original file line number Diff line number Diff line change
@@ -17,6 +17,8 @@
public class RedisTimeSeries implements AutoCloseable {

private static final byte[] STAR = SafeEncoder.encode("*");
protected static final byte[] PLUS = SafeEncoder.encode("+");
protected static final byte[] MINUS = SafeEncoder.encode("-");

private final Pool<Jedis> pool;

0 comments on commit df3d657

Please sign in to comment.