Skip to content

Commit 2f202fd

Browse files
bergerstchristophstrobl
authored andcommitted
Fix typo in DELIMITTER
Closes: #2158
1 parent f5420d0 commit 2f202fd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/main/java/org/springframework/data/redis/core/convert/MappingRedisConverter.java

+10-8
Original file line numberDiff line numberDiff line change
@@ -1214,13 +1214,14 @@ public int compareTo(Part that) {
12141214
* {@literal keyspace:id}.
12151215
*
12161216
* @author Mark Paluch
1217+
* @author Stefan Berger
12171218
* @since 1.8.10
12181219
*/
12191220
public static class KeyspaceIdentifier {
12201221

12211222
public static final String PHANTOM = "phantom";
1222-
public static final String DELIMITTER = ":";
1223-
public static final String PHANTOM_SUFFIX = DELIMITTER + PHANTOM;
1223+
public static final String DELIMITER = ":";
1224+
public static final String PHANTOM_SUFFIX = DELIMITER + PHANTOM;
12241225

12251226
private final String keyspace;
12261227
private final String id;
@@ -1244,7 +1245,7 @@ public static KeyspaceIdentifier of(String key) {
12441245
Assert.isTrue(isValid(key), String.format("Invalid key %s", key));
12451246

12461247
boolean phantomKey = key.endsWith(PHANTOM_SUFFIX);
1247-
int keyspaceEndIndex = key.indexOf(DELIMITTER);
1248+
int keyspaceEndIndex = key.indexOf(DELIMITER);
12481249
String keyspace = key.substring(0, keyspaceEndIndex);
12491250
String id;
12501251

@@ -1270,7 +1271,7 @@ public static boolean isValid(@Nullable String key) {
12701271
return false;
12711272
}
12721273

1273-
int keyspaceEndIndex = key.indexOf(DELIMITTER);
1274+
int keyspaceEndIndex = key.indexOf(DELIMITER);
12741275

12751276
return keyspaceEndIndex > 0 && key.length() > keyspaceEndIndex;
12761277
}
@@ -1293,13 +1294,14 @@ public boolean isPhantomKey() {
12931294
* {@literal keyspace:id}.
12941295
*
12951296
* @author Mark Paluch
1297+
* @author Stefan Berger
12961298
* @since 1.8.10
12971299
*/
12981300
public static class BinaryKeyspaceIdentifier {
12991301

13001302
public static final byte[] PHANTOM = KeyspaceIdentifier.PHANTOM.getBytes();
1301-
public static final byte DELIMITTER = ':';
1302-
public static final byte[] PHANTOM_SUFFIX = ByteUtils.concat(new byte[] { DELIMITTER }, PHANTOM);
1303+
public static final byte DELIMITER = ':';
1304+
public static final byte[] PHANTOM_SUFFIX = ByteUtils.concat(new byte[] { DELIMITER }, PHANTOM);
13031305

13041306
private final byte[] keyspace;
13051307
private final byte[] id;
@@ -1324,7 +1326,7 @@ public static BinaryKeyspaceIdentifier of(byte[] key) {
13241326

13251327
boolean phantomKey = ByteUtils.startsWith(key, PHANTOM_SUFFIX, key.length - PHANTOM_SUFFIX.length);
13261328

1327-
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITTER);
1329+
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITER);
13281330
byte[] keyspace = extractKeyspace(key, keyspaceEndIndex);
13291331
byte[] id = extractId(key, phantomKey, keyspaceEndIndex);
13301332

@@ -1344,7 +1346,7 @@ public static boolean isValid(byte[] key) {
13441346
return false;
13451347
}
13461348

1347-
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITTER);
1349+
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITER);
13481350

13491351
return keyspaceEndIndex > 0 && key.length > keyspaceEndIndex;
13501352
}

0 commit comments

Comments
 (0)