hezean / sustc

Template for project 2 of SUSTech Principles of Database Systems (CS307 / CS213), 23 fall semester.
http://172.18.34.154
MIT License
22 stars 10 forks source link

[bootRun] passing negative integers to command options #53

Closed Bulu04bulu closed 10 months ago

Bulu04bulu commented 10 months ago

Related module

Shell

What happened

When I use the 'rec general' command and enter invalid pagenum and pagesize(like -1 -1), it will automatically take the default value(1 10), then how to test my API implementation of corner case. If my input is valid, it will take it as the correct input.

What you expected to happen

No response

How to reproduce

No response

Anything else

No response

Bulu04bulu commented 10 months ago

QQ图片20231219100053 QQ图片20231219100048

like that, I print out the parameter.

hezean commented 10 months ago

that's a bug of spring shell (https://github.com/spring-projects/spring-shell/issues/651), and was fixed in release 3.1.x

however, since our project wants to be compatible with java 8, we cannot upgrade these dependencies. instead, you may use named options to bypass the bug:

rec general --pageSize -1 --pageNum -2