fangyidong / json-simple

A simple Java toolkit for JSON. You can use json-simple to encode or decode JSON text.
Apache License 2.0
746 stars 340 forks source link

Remove the redundant interface. #126

Open Kui-Liu opened 7 years ago

Kui-Liu commented 7 years ago

This class declares that it implements an interface Map which is also implemented by the superclass HashMap. This is redundant because once a superclass implements an interface, all subclasses by default also implement this interface. It may point out that the inheritance hierarchy has changed since this class was created, and consideration should be given to the ownership of the interface's implementation. http://findbugs.sourceforge.net/bugDescriptions.html#RI_REDUNDANT_INTERFACES

RalleYTN commented 7 years ago

Already fixed in my version of the library: https://github.com/RalleYTN/SimpleJSON Also JSONObject doesn't extend HashMap but LinkedHashMap to ensure that the order of attributes doesn't get mixed.