Skip to content

Commit 3a7feac

Browse files
committed
Merge remote-tracking branch 'redis/master' into sentinel-tls-3
Conflicts: src/main/java/redis/clients/jedis/JedisSentinelPool.java src/test/java/redis/clients/jedis/tests/SSLJedisSentinelPoolTest.java
2 parents 0c7bfea + 557cdea commit 3a7feac

File tree

140 files changed

+9142
-3310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+9142
-3310
lines changed

.github/release-drafter-config.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name-template: 'Version $NEXT_PATCH_VERSION🌈'
2-
tag-template: 'v$NEXT_PATCH_VERSION'
1+
name-template: '$NEXT_PATCH_VERSION'
2+
tag-template: 'jedis-$NEXT_PATCH_VERSION'
33
categories:
4-
- title: '🚀Features'
4+
- title: 'Features'
55
labels:
66
- 'feature'
77
- 'enhancement'
@@ -10,7 +10,7 @@ categories:
1010
- 'fix'
1111
- 'bugfix'
1212
- 'bug'
13-
- title: '🧰Maintenance'
13+
- title: 'Maintenance'
1414
label: 'chore'
1515
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
1616
exclude-labels:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
update_release_draft:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Drafts your next Release notes as Pull Requests are merged into "master"
14+
- uses: release-drafter/release-drafter@v5
15+
with:
16+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
17+
config-name: release-drafter-config.yml
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Or use it as a maven dependency:
5858
<dependency>
5959
<groupId>redis.clients</groupId>
6060
<artifactId>jedis</artifactId>
61-
<version>3.5.1</version>
61+
<version>3.5.2</version>
6262
<type>jar</type>
6363
<scope>compile</scope>
6464
</dependency>

pom.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<cluster-hosts>localhost:7379,localhost:7380,localhost:7381,localhost:7382,localhost:7383,localhost:7384,localhost:7385</cluster-hosts>
5151
<github.global.server>github</github.global.server>
5252
<log4j.version>2.13.3</log4j.version>
53+
<jedis.module.name>redis.clients.jedis</jedis.module.name>
5354
</properties>
5455

5556
<dependencies>
@@ -200,11 +201,14 @@
200201
<artifactId>maven-jar-plugin</artifactId>
201202
<version>3.0.2</version>
202203
<configuration>
203-
<archive>
204+
<archive>
204205
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
205-
</archive>
206+
<manifestEntries>
207+
<Automatic-Module-Name>${jedis.module.name}</Automatic-Module-Name>
208+
</manifestEntries>
209+
</archive>
206210
</configuration>
207-
</plugin>
211+
</plugin>
208212
<plugin>
209213
<groupId>org.apache.felix</groupId>
210214
<artifactId>maven-bundle-plugin</artifactId>
@@ -213,11 +217,11 @@
213217
<execution>
214218
<id>bundle-manifest</id>
215219
<phase>process-classes</phase>
216-
<goals>
220+
<goals>
217221
<goal>manifest</goal>
218-
</goals>
222+
</goals>
219223
</execution>
220-
</executions>
224+
</executions>
221225
</plugin>
222226
</plugins>
223227
</build>

src/main/java/redis/clients/jedis/AccessControlLogEntry.java

Lines changed: 89 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -4,107 +4,97 @@
44
import java.util.*;
55

66
/**
7-
* This class holds information about an Access Control Log entry (returned by ACL LOG command)
8-
* They can be access via getters.
9-
* For future purpose there is also {@link #getlogEntry} method
10-
* that returns a generic {@code Map} - in case where more info is returned from a server
11-
*
7+
* This class holds information about an Access Control Log entry (returned by ACL LOG command) They
8+
* can be access via getters. For future purpose there is also {@link #getlogEntry} method that
9+
* returns a generic {@code Map} - in case where more info is returned from a server
1210
*/
1311
public class AccessControlLogEntry implements Serializable {
1412

15-
private static final long serialVersionUID = 1L;
16-
17-
public static final String COUNT = "count";
18-
public static final String REASON = "reason";
19-
public static final String CONTEXT = "context";
20-
public static final String OBJECT = "object";
21-
public static final String USERNAME = "username";
22-
public static final String AGE_SECONDS = "age-seconds";
23-
public static final String CLIENT_INFO = "client-info";
24-
25-
private long count;
26-
private final String reason;
27-
private final String context;
28-
private final String object;
29-
private final String username;
30-
private final String ageSeconds;
31-
private final Map<String,String> clientInfo;
32-
private final Map<String,Object> logEntry;
33-
34-
35-
public AccessControlLogEntry(Map<String, Object> map) {
36-
count = (long)map.get(COUNT);
37-
reason = (String)map.get(REASON);
38-
context = (String)map.get(CONTEXT);
39-
object = (String)map.get(OBJECT);
40-
username = (String)map.get(USERNAME);
41-
ageSeconds = (String)map.get(AGE_SECONDS);
42-
clientInfo = getMapFromRawClientInfo((String)map.get(CLIENT_INFO));
43-
logEntry = map;
44-
}
45-
46-
public long getCount() {
47-
return count;
48-
}
49-
50-
public String getReason() {
51-
return reason;
52-
}
53-
54-
public String getContext() {
55-
return context;
56-
}
57-
58-
public String getObject() {
59-
return object;
60-
}
61-
62-
public String getUsername() {
63-
return username;
64-
}
65-
66-
public String getAgeSeconds() {
67-
return ageSeconds;
68-
}
69-
70-
public Map<String, String> getClientInfo() {
71-
return clientInfo;
72-
}
73-
74-
/**
75-
* @return Generic map containing all key-value pairs returned by the server
76-
*/
77-
public Map<String,Object> getlogEntry() {
78-
return logEntry;
79-
}
80-
81-
/**
82-
* Convert the client-info string into a Map of String.
83-
* When the value is empty, the value in the map is set to an empty string
84-
* The key order is maintained to reflect the string return by Redis
85-
* @param clientInfo
86-
* @return A Map with all client info
87-
*/
88-
private Map<String,String> getMapFromRawClientInfo( String clientInfo) {
89-
String[] entries = clientInfo.split(" ");
90-
Map<String,String> clientInfoMap = new LinkedHashMap<>(entries.length);
91-
for (String entry : entries) {
92-
String[] kvArray = entry.split("=");
93-
clientInfoMap.put(kvArray[0], (kvArray.length ==2)?kvArray[1]:"" );
94-
}
95-
return clientInfoMap;
96-
}
97-
98-
@Override
99-
public String toString() {
100-
return "AccessControlLogEntry{" +
101-
"count=" + count +
102-
", reason='" + reason + '\'' +
103-
", context='" + context + '\'' +
104-
", object='" + object + '\'' +
105-
", username='" + username + '\'' +
106-
", ageSeconds='" + ageSeconds + '\'' +
107-
", clientInfo=" + clientInfo +
108-
'}';
13+
private static final long serialVersionUID = 1L;
14+
15+
public static final String COUNT = "count";
16+
public static final String REASON = "reason";
17+
public static final String CONTEXT = "context";
18+
public static final String OBJECT = "object";
19+
public static final String USERNAME = "username";
20+
public static final String AGE_SECONDS = "age-seconds";
21+
public static final String CLIENT_INFO = "client-info";
22+
23+
private long count;
24+
private final String reason;
25+
private final String context;
26+
private final String object;
27+
private final String username;
28+
private final String ageSeconds;
29+
private final Map<String, String> clientInfo;
30+
private final Map<String, Object> logEntry;
31+
32+
public AccessControlLogEntry(Map<String, Object> map) {
33+
count = (long) map.get(COUNT);
34+
reason = (String) map.get(REASON);
35+
context = (String) map.get(CONTEXT);
36+
object = (String) map.get(OBJECT);
37+
username = (String) map.get(USERNAME);
38+
ageSeconds = (String) map.get(AGE_SECONDS);
39+
clientInfo = getMapFromRawClientInfo((String) map.get(CLIENT_INFO));
40+
logEntry = map;
41+
}
42+
43+
public long getCount() {
44+
return count;
45+
}
46+
47+
public String getReason() {
48+
return reason;
49+
}
50+
51+
public String getContext() {
52+
return context;
53+
}
54+
55+
public String getObject() {
56+
return object;
57+
}
58+
59+
public String getUsername() {
60+
return username;
61+
}
62+
63+
public String getAgeSeconds() {
64+
return ageSeconds;
65+
}
66+
67+
public Map<String, String> getClientInfo() {
68+
return clientInfo;
69+
}
70+
71+
/**
72+
* @return Generic map containing all key-value pairs returned by the server
73+
*/
74+
public Map<String, Object> getlogEntry() {
75+
return logEntry;
76+
}
77+
78+
/**
79+
* Convert the client-info string into a Map of String. When the value is empty, the value in the
80+
* map is set to an empty string The key order is maintained to reflect the string return by Redis
81+
* @param clientInfo
82+
* @return A Map with all client info
83+
*/
84+
private Map<String, String> getMapFromRawClientInfo(String clientInfo) {
85+
String[] entries = clientInfo.split(" ");
86+
Map<String, String> clientInfoMap = new LinkedHashMap<>(entries.length);
87+
for (String entry : entries) {
88+
String[] kvArray = entry.split("=");
89+
clientInfoMap.put(kvArray[0], (kvArray.length == 2) ? kvArray[1] : "");
10990
}
91+
return clientInfoMap;
92+
}
93+
94+
@Override
95+
public String toString() {
96+
return "AccessControlLogEntry{" + "count=" + count + ", reason='" + reason + '\''
97+
+ ", context='" + context + '\'' + ", object='" + object + '\'' + ", username='" + username
98+
+ '\'' + ", ageSeconds='" + ageSeconds + '\'' + ", clientInfo=" + clientInfo + '}';
99+
}
110100
}

0 commit comments

Comments
 (0)