@@ -106,8 +106,8 @@ byte[] rawKey(Object key) {
106
106
107
107
Assert .notNull (key , "non null key required" );
108
108
109
- if (keySerializer () == null && key instanceof byte []) {
110
- return ( byte []) key ;
109
+ if (keySerializer () == null && key instanceof byte [] bytes ) {
110
+ return bytes ;
111
111
}
112
112
113
113
return keySerializer ().serialize (key );
@@ -121,8 +121,8 @@ byte[] rawString(String key) {
121
121
@ SuppressWarnings ("unchecked" )
122
122
byte [] rawValue (Object value ) {
123
123
124
- if (valueSerializer () == null && value instanceof byte []) {
125
- return ( byte []) value ;
124
+ if (valueSerializer () == null && value instanceof byte [] bytes ) {
125
+ return bytes ;
126
126
}
127
127
128
128
return valueSerializer ().serialize (value );
@@ -161,8 +161,8 @@ byte[][] rawValues(Collection<V> values) {
161
161
@ SuppressWarnings ("unchecked" )
162
162
<HK > byte [] rawHashKey (HK hashKey ) {
163
163
Assert .notNull (hashKey , "non null hash key required" );
164
- if (hashKeySerializer () == null && hashKey instanceof byte []) {
165
- return ( byte []) hashKey ;
164
+ if (hashKeySerializer () == null && hashKey instanceof byte [] bytes ) {
165
+ return bytes ;
166
166
}
167
167
return hashKeySerializer ().serialize (hashKey );
168
168
}
@@ -180,8 +180,8 @@ <HK> byte[][] rawHashKeys(HK... hashKeys) {
180
180
@ SuppressWarnings ("unchecked" )
181
181
<HV > byte [] rawHashValue (HV value ) {
182
182
183
- if (hashValueSerializer () == null && value instanceof byte []) {
184
- return ( byte []) value ;
183
+ if (hashValueSerializer () == null && value instanceof byte [] bytes ) {
184
+ return bytes ;
185
185
}
186
186
return hashValueSerializer ().serialize (value );
187
187
}
@@ -268,8 +268,8 @@ Set<Tuple> rawTupleValues(Set<TypedTuple<V>> values) {
268
268
Set <Tuple > rawTuples = new LinkedHashSet <>(values .size ());
269
269
for (TypedTuple <V > value : values ) {
270
270
byte [] rawValue ;
271
- if (valueSerializer () == null && value .getValue () instanceof byte []) {
272
- rawValue = ( byte []) value . getValue () ;
271
+ if (valueSerializer () == null && value .getValue () instanceof byte [] bytes ) {
272
+ rawValue = bytes ;
273
273
} else {
274
274
rawValue = valueSerializer ().serialize (value .getValue ());
275
275
}
0 commit comments