Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yml模式提交配置,参数为空null会报空指针异常 #142

Open
yaqian012 opened this issue Nov 23, 2018 · 0 comments
Open

yml模式提交配置,参数为空null会报空指针异常 #142

yaqian012 opened this issue Nov 23, 2018 · 0 comments
Assignees
Labels
缺陷 Something isn't working
Milestone

Comments

@yaqian012
Copy link

yml模式提交配置,参数为空null 会报空指针异常。
com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException)

看代码应该就是这样设计的,同时properties模式不允许value为空。

代码里用的接收参数类型是Properties类型,Properties继承自Hashtable,Hashtable不允许value为null

但是确实有一些场景需要给一些参数设置成空null的。
能不能将Properties替换成hashMap或者其他的支持value为null的类型

样例代码
PropertyController.java
public WebResp<String> saveProperties(@RequestParam("project") String project, @RequestParam("profile") String profile, @RequestParam("label") String label, @RequestBody Properties newProperties)

@dyc87112 dyc87112 added the 缺陷 Something isn't working label Nov 29, 2018
@dyc87112 dyc87112 self-assigned this Nov 29, 2018
@dyc87112 dyc87112 added this to the 1.2.0 milestone Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
缺陷 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants