File tree Expand file tree Collapse file tree
main/java/tech/smartboot/redisun/resp
test/java/tech/smartboot/redisun/bench Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,4 +196,10 @@ Pull requests and suggestions are welcome. Please refer to the project [issue tr
196196
197197## Contact
198198
199- For questions or suggestions, please submit an issue or contact the project maintainer [ 三刀] ( https://github.com/smartdms ) .
199+ For questions or suggestions, please submit an issue or contact the project maintainer [ 三刀] ( https://github.com/smartdms ) .
200+
201+ ## Follow Us
202+
203+ If you are interested in our project, please follow our WeChat official account to get the latest updates and technical sharing.
204+
205+ ![ WeChat] ( https://smartboot.tech/wx_dyh.png )
Original file line number Diff line number Diff line change @@ -196,4 +196,10 @@ mvn test
196196
197197## 联系方式
198198
199- 如有问题或建议,请提交 issue 或联系项目维护者 [ 三刀] ( https://gitee.com/smartdms ) 。
199+ 如有问题或建议,请提交 issue 或联系项目维护者 [ 三刀] ( https://gitee.com/smartdms ) 。
200+
201+ ## 关注我们
202+
203+ 如果您对我们的项目感兴趣,欢迎关注我们的微信公众号,获取最新动态和技术分享。
204+
205+ ![ 微信公众号] ( https://smartboot.tech/wx_dyh.png )
Original file line number Diff line number Diff line change @@ -82,8 +82,7 @@ public boolean decode(ByteBuffer readBuffer) {
8282 value = new ArrayList <>(count );
8383 state = DECODE_STATE_ITEM ;
8484 } else {
85- // 负数键值对个数是非法的
86- throw new RedisunException ("Invalid array size: " + count );
85+ return false ;
8786 }
8887 break ;
8988 case DECODE_STATE_ITEM :
Original file line number Diff line number Diff line change @@ -79,8 +79,7 @@ public boolean decode(ByteBuffer readBuffer) {
7979 out = new ByteArrayOutputStream (length );
8080 state = DECODE_STATE_VALUE ;
8181 } else {
82- // 负数长度是非法的(除了-1,但那是Null的表示方法,应该使用Nulls类)
83- throw new RedisunException ("Invalid array size: " + length );
82+ return false ;
8483 }
8584 break ;
8685 case DECODE_STATE_VALUE :
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public boolean decode(ByteBuffer readBuffer) {
8585 value = isNegative ? -v : v ;
8686 return true ;
8787 }
88- throw new RedisunException ( "Invalid int value: " + value ) ;
88+ return false ;
8989 default :
9090 throw new RedisunException ("数据格式错误" );
9191 }
Original file line number Diff line number Diff line change @@ -89,8 +89,7 @@ public boolean decode(ByteBuffer readBuffer) {
8989 state = DECODE_STATE_KEY ;
9090 break ;
9191 } else {
92- // 负数键值对个数是非法的
93- throw new RedisunException ("Invalid map size: " + count );
92+ return false ;
9493 }
9594 case DECODE_STATE_KEY :
9695 // 解析键
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ public class Bench {
88 // 为了在GitHub Actions环境中更快地运行测试,减少测试数据量
99 protected static final int SET_COUNT = 50000 ;
1010
11- protected static final int CONCURRENT_CLIENT_COUNT = Integer .parseInt (System .getProperty ("client.count" , "1024 " ));
11+ protected static final int CONCURRENT_CLIENT_COUNT = Integer .parseInt (System .getProperty ("client.count" , "1 " ));
1212
1313 protected static final String ADDRESS = "redis://127.0.0.1:6379" ;
1414}
You can’t perform that action at this time.
0 commit comments