Skip to content

Commit 80472bc

Browse files
committed
Fix typo in DELIMITTER
1 parent a944aa2 commit 80472bc

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,7 @@ protected Object readProperty(String path, RedisData source, RedisPersistentProp
303303
Bucket bucket = source.getBucket().extract(currentPath + ".");
304304

305305
RedisData newBucket = new RedisData(bucket);
306-
TypeInformation<?> typeToRead = typeMapper.readType(bucket.getPropertyPath(currentPath),
307-
typeInformation);
306+
TypeInformation<?> typeToRead = typeMapper.readType(bucket.getPropertyPath(currentPath), typeInformation);
308307

309308
return readInternal(currentPath, typeToRead.getType(), newBucket);
310309
}
@@ -584,8 +583,7 @@ RedisPersistentProperty getTargetPropertyOrNullForPath(String path, Class<?> typ
584583
* @param sink
585584
*/
586585
private void writeInternal(@Nullable String keyspace, String path, @Nullable Object value,
587-
TypeInformation<?> typeHint,
588-
RedisData sink) {
586+
TypeInformation<?> typeHint, RedisData sink) {
589587

590588
if (value == null) {
591589
return;
@@ -736,8 +734,7 @@ private void writeAssociation(String path, RedisPersistentEntity<?> entity, @Nul
736734
* @param sink
737735
*/
738736
private void writeCollection(@Nullable String keyspace, String path, @Nullable Iterable<?> values,
739-
TypeInformation<?> typeHint,
740-
RedisData sink) {
737+
TypeInformation<?> typeHint, RedisData sink) {
741738

742739
if (values == null) {
743740
return;
@@ -1131,6 +1128,7 @@ private enum NaturalOrderingKeyComparator implements Comparator<String> {
11311128
* (non-Javadoc)
11321129
* @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
11331130
*/
1131+
@Override
11341132
public int compare(String s1, String s2) {
11351133

11361134
int s1offset = 0;
@@ -1214,13 +1212,14 @@ public int compareTo(Part that) {
12141212
* {@literal keyspace:id}.
12151213
*
12161214
* @author Mark Paluch
1215+
* @author Stefan Berger
12171216
* @since 1.8.10
12181217
*/
12191218
public static class KeyspaceIdentifier {
12201219

12211220
public static final String PHANTOM = "phantom";
1222-
public static final String DELIMITTER = ":";
1223-
public static final String PHANTOM_SUFFIX = DELIMITTER + PHANTOM;
1221+
public static final String DELIMITER = ":";
1222+
public static final String PHANTOM_SUFFIX = DELIMITER + PHANTOM;
12241223

12251224
private final String keyspace;
12261225
private final String id;
@@ -1244,7 +1243,7 @@ public static KeyspaceIdentifier of(String key) {
12441243
Assert.isTrue(isValid(key), String.format("Invalid key %s", key));
12451244

12461245
boolean phantomKey = key.endsWith(PHANTOM_SUFFIX);
1247-
int keyspaceEndIndex = key.indexOf(DELIMITTER);
1246+
int keyspaceEndIndex = key.indexOf(DELIMITER);
12481247
String keyspace = key.substring(0, keyspaceEndIndex);
12491248
String id;
12501249

@@ -1270,7 +1269,7 @@ public static boolean isValid(@Nullable String key) {
12701269
return false;
12711270
}
12721271

1273-
int keyspaceEndIndex = key.indexOf(DELIMITTER);
1272+
int keyspaceEndIndex = key.indexOf(DELIMITER);
12741273

12751274
return keyspaceEndIndex > 0 && key.length() > keyspaceEndIndex;
12761275
}
@@ -1293,13 +1292,14 @@ public boolean isPhantomKey() {
12931292
* {@literal keyspace:id}.
12941293
*
12951294
* @author Mark Paluch
1295+
* @author Stefan Berger
12961296
* @since 1.8.10
12971297
*/
12981298
public static class BinaryKeyspaceIdentifier {
12991299

13001300
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);
1301+
public static final byte DELIMITER = ':';
1302+
public static final byte[] PHANTOM_SUFFIX = ByteUtils.concat(new byte[] { DELIMITER }, PHANTOM);
13031303

13041304
private final byte[] keyspace;
13051305
private final byte[] id;
@@ -1324,7 +1324,7 @@ public static BinaryKeyspaceIdentifier of(byte[] key) {
13241324

13251325
boolean phantomKey = ByteUtils.startsWith(key, PHANTOM_SUFFIX, key.length - PHANTOM_SUFFIX.length);
13261326

1327-
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITTER);
1327+
int keyspaceEndIndex = ByteUtils.indexOf(key, DELIMITER);
13281328
byte[] keyspace = extractKeyspace(key, keyspaceEndIndex);
13291329
byte[] id = extractId(key, phantomKey, keyspaceEndIndex);
13301330

@@ -1344,7 +1344,7 @@ public static boolean isValid(byte[] key) {
13441344
return false;
13451345
}
13461346

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

13491349
return keyspaceEndIndex > 0 && key.length > keyspaceEndIndex;
13501350
}

0 commit comments

Comments
 (0)