问题描述:
JSONObject.toJSONString()
在Sonarlint检查中发现提示:
“static” base class members should not be accessed via derived types
In the interest of code clarity, static members of a base class should never be accessed using a derived type’s name. Doing so is confusing and could create the illusion that two different static members exist.
意思是如果子类继承了父类的静态成员,不应该通过子类去调用
解决方案:
改成父类的调用:
JSON.toJSONString()