Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some typos and formatting issues across the project #3486

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ The most recent version of this library supports redis version [5.0](https://git

The table below highlights version compatibility of the most-recent library versions and Redis versions. Compatibility means communication features, and Redis command capabilities.

| Library version | Supported redis versions |
|-----------------|-------------------|
| 3.9+ | 5.0 and 6.2 Family of releases |
| >= 4.0 | Version 5.0 to current |
| Library version | Supported redis versions |
|-----------------|--------------------------------|
| 3.9+ | 5.0 and 6.2 Family of releases |
| >= 4.0 | Version 5.0 to current |

## Getting started

Expand Down Expand Up @@ -78,7 +78,7 @@ for the complete list of supported commands.

### Easier way of using connection pool

Using a *try-with-resources* block for each command may be cumbursome, so you may consider using JedisPooled.
Using a *try-with-resources* block for each command may be cumbersome, so you may consider using JedisPooled.

```java
JedisPooled jedis = new JedisPooled("localhost", 6379);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/redis/clients/jedis/StreamEntryID.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public int hashCode() {

@Override
public int compareTo(StreamEntryID other) {
int timeComapre = Long.compare(this.time, other.time);
return timeComapre != 0 ? timeComapre : Long.compare(this.sequence, other.sequence);
int timeCompare = Long.compare(this.time, other.time);
return timeCompare != 0 ? timeCompare : Long.compare(this.sequence, other.sequence);
}

public long getTime() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public interface ServerCommands {
* The SAVE commands performs a synchronous save of the dataset producing a point in time snapshot
* of all the data inside the Redis instance, in the form of an RDB file. You almost never want to
* call SAVE in production environments where it will block all the other clients. Instead usually
* BGSAVE is used. However in case of issues preventing Redis to create the background saving
* BGSAVE is used. However, in case of issues preventing Redis to create the background saving
* child (for instance errors in the fork(2) system call), the SAVE command can be a good last
* resort to perform the dump of the latest dataset.
* @return result of the save
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/redis/clients/jedis/params/MigrateParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class MigrateParams implements IParams {
private boolean copy = false;
private boolean replace = false;
private String username = null;
private String passowrd = null;
private String password = null;

public MigrateParams() {
}
Expand All @@ -28,13 +28,13 @@ public MigrateParams replace() {
}

public MigrateParams auth(String password) {
this.passowrd = password;
this.password = password;
return this;
}

public MigrateParams auth2(String username, String password) {
this.username = username;
this.passowrd = password;
this.password = password;
return this;
}

Expand All @@ -47,9 +47,9 @@ public void addParams(CommandArguments args) {
args.add(Keyword.REPLACE);
}
if (username != null) {
args.add(Keyword.AUTH2).add(username).add(passowrd);
} else if (passowrd != null) {
args.add(Keyword.AUTH).add(passowrd);
args.add(Keyword.AUTH2).add(username).add(password);
} else if (password != null) {
args.add(Keyword.AUTH).add(password);
}
}
}
12 changes: 6 additions & 6 deletions src/main/java/redis/clients/jedis/params/ZAddParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public class ZAddParams implements IParams {

private Keyword existance;
private Keyword existence;
private Keyword comparison;
private boolean change;

Expand All @@ -21,16 +21,16 @@ public static ZAddParams zAddParams() {
* @return ZAddParams
*/
public ZAddParams nx() {
this.existance = Keyword.NX;
this.existence = Keyword.NX;
return this;
}

/**
* Only set the key if it already exist.
* Only set the key if it already exists.
* @return ZAddParams
*/
public ZAddParams xx() {
this.existance = Keyword.XX;
this.existence = Keyword.XX;
return this;
}

Expand Down Expand Up @@ -64,8 +64,8 @@ public ZAddParams ch() {

@Override
public void addParams(CommandArguments args) {
if (existance != null) {
args.add(existance);
if (existence != null) {
args.add(existence);
}
if (comparison != null) {
args.add(comparison);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

/**
* This class holds information about an Access Control Log entry (returned by ACL LOG command) They
* can be access via getters. For future purpose there is also {@link #getlogEntry} method that
* can be accessed via getters. For future purpose there is also {@link #getlogEntry} method that
* returns a generic {@code Map} - in case where more info is returned from a server
*/
// TODO: remove
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/**
* This class holds information about a stream consumer with command
* {@code xinfo stream mystream full}. They can be access via getters. There is also
* {@code xinfo stream mystream full}. They can be accessed via getters. There is also
* {@link StreamConsumerFullInfo#getConsumerInfo()} method that returns a generic {@link Map} in
* case more info are returned from the server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Map;

/**
* This class holds information about a consumer. They can be access via getters. There is also
* This class holds information about a consumer. They can be accessed via getters. There is also
* {@link StreamConsumersInfo#getConsumerInfo()}} method that returns a generic {@code Map} in case
* more info are returned from the server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.Map;

/**
* This class holds information about a consumer. They can be access via getters. There is also
* This class holds information about a consumer. They can be accessed via getters. There is also
* {@link StreamConsumersInfo#getConsumerInfo()}} method that returns a generic {@code Map} in case
* more info are returned from the server.
* @deprecated Use {@link StreamConsumerInfo}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* This class holds information about a stream info with command {@code xinfo stream mystream full}.
* They can be access via getters. There is also {@link StreamFullInfo#getStreamFullInfo()} method
* They can be accessed via getters. There is also {@link StreamFullInfo#getStreamFullInfo()} method
* that returns a generic {@link Map} in case where more info are returned from the server.
*/
public class StreamFullInfo implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

/**
* This class holds information about a stream group with command {@code xinfo stream mystream full}.
* They can be access via getters. There is also {@link StreamGroupFullInfo#getGroupFullInfo()}
* They can be accessed via getters. There is also {@link StreamGroupFullInfo#getGroupFullInfo()}
* method that returns a generic {@link Map} in case more info are returned from the server.
*/
public class StreamGroupFullInfo implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import redis.clients.jedis.StreamEntryID;

/**
* This class holds information about a stream group. They can be access via getters. There is also
* This class holds information about a stream group. They can be accessed via getters. There is also
* {@link StreamGroupInfo#getGroupInfo()} method that returns a generic {@code Map} in case more
* info are returned from the server.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/redis/clients/jedis/resps/StreamInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import redis.clients.jedis.StreamEntryID;

/**
* This class holds information about stream. They can be access via getters. There is also
* This class holds information about stream. They can be accessed via getters. There is also
* {@link StreamInfo#getStreamInfo} method that returns a generic {@code Map} in case more info are
* returned from the server.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/redis/clients/jedis/util/RedisInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public byte[] readLineBytes() {

/**
* Slow path in case a line of bytes cannot be read in one #fill() operation. This is still faster
* than creating the StrinbBuilder, String, then encoding as byte[] in Protocol, then decoding
* than creating the StringBuilder, String, then encoding as byte[] in Protocol, then decoding
* back into a String.
*/
private byte[] readLineBytesSlowly() {
Expand Down Expand Up @@ -236,7 +236,7 @@ public int read(byte[] b, int off, int len) throws JedisConnectionException {
}

/**
* This methods assumes there are required bytes to be read. If we cannot read anymore bytes an
* This method assumes there are required bytes to be read. If we cannot read anymore bytes an
* exception is thrown to quickly ascertain that the stream was smaller than expected.
*/
private void ensureFill() throws JedisConnectionException {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/redis/clients/jedis/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public void tearDown() throws Exception {
}

@Test(expected = JedisConnectionException.class)
public void checkUnkownHost() {
public void checkUnknownHost() {
client = new Connection("someunknownhost", Protocol.DEFAULT_PORT);
client.connect();
}
Expand Down