错误代码如下
java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
at kotlin.collections.EmptyList.add(Collections.kt)
at io.protostuff.runtime.RuntimeRepeatedFieldFactory$1.mergeFrom(RuntimeRepeatedFieldFactory.java:72)
at io.protostuff.runtime.RuntimeSchema.mergeFrom(RuntimeSchema.java:466)
at io.protostuff.runtime.ObjectSchema.readObjectFrom(ObjectSchema.java:693)
at io.protostuff.runtime.ObjectSchema.mergeFrom(ObjectSchema.java:350)
at io.protostuff.ByteArrayInput.mergeObjectEncodedAsGroup(ByteArrayInput.java:518)
at io.protostuff.ByteArrayInput.mergeObject(ByteArrayInput.java:490)
at io.protostuff.runtime.RuntimeUnsafeFieldFactory$15$1.mergeFrom(RuntimeUnsafeFieldFactory.java:1217)
at io.protostuff.runtime.RuntimeSchema.mergeFrom(RuntimeSchema.java:466)
at io.protostuff.IOUtil.mergeFrom(IOUtil.java:45)
at io.protostuff.ProtostuffIOUtil.mergeFrom(ProtostuffIOUtil.java:104)
at org.springblade.core.redis.serializer.ProtoStuffSerializer.deserialize(ProtoStuffSerializer.java:59)
at org.springframework.data.redis.core.AbstractOperations.deserializeValue(AbstractOperations.java:335)
at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:61)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:228)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)
at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:53)
at org.springblade.core.redis.cache.BladeRedis.get(BladeRedis.java:101)
TickerDetailsDTO tickerDetailsDTO = bladeRedis.get(cacheKey);
cacheKey是一个String, 存进去的是一个类。貌似是blade-tool里封装的代码有问题(网上查了一下,这个错误是kotlin转java的时候出的错误)
扫一扫访问 Blade技术社区 移动端