<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[Heck's  Blog]]></title> 
<link>https://www.heckjj.com/index.php</link> 
<description><![CDATA[一瞬间的决定，往往可以改变很多，事实上，让自己成功的往往不是知识，是精神！ 如果你总是为自己找借口，那只好让成功推迟。执行力，今天！]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[Heck's  Blog]]></copyright>
<item>
<link>https://www.heckjj.com/post//</link>
<title><![CDATA[Could not read JSON: Cannot construct instance of java.util.ArrayList$SubListRedis反序列化异常]]></title> 
<author>Heck &lt;@hecks.tk&gt;</author>
<category><![CDATA[编程杂谈]]></category>
<pubDate>Mon, 04 Sep 2023 04:11:56 +0000</pubDate> 
<guid>https://www.heckjj.com/post//</guid> 
<description>
<![CDATA[ 
	错误信息：<br/>Could not read JSON: Cannot construct instance of java.util.ArrayList$SubList(no Creators, like default construct, exist): no default no-arguments constructor found<br/><br/>原因是读取Redis缓存时，报错异常导致！<br/><br/>原因是缓存中是集合ArrayList中含有SubList，因为SubList不能序列化和反序列化，导致解析失败。<br/><br/>解决办法：<br/><br/>1、若存在使用SubList方法，只需要 重新new 下：<br/><br/>原代码：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultList = regionDistributionVOList.subList(ZERO, FOUR);<br/><br/>改正后：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; resultList = new ArrayList&lt;&gt;(regionDistributionVOList.subList(ZERO, FOUR));<br/>或者:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resultList.addAll(regionDistributionVOList.subList(ZERO, FOUR));<br/><br/>2、若通过 Lists.partition(ZERO, TEN)获取的，则需要将subList转为ArrayList<br/><br/>用： Lists.newArrayList(subList)
]]>
</description>
</item><item>
<link>https://www.heckjj.com/post//#blogcomment</link>
<title><![CDATA[[评论] Could not read JSON: Cannot construct instance of java.util.ArrayList$SubListRedis反序列化异常]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://www.heckjj.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>