I have Java code that works properly. But when I checked it with checkstyle it shows some Issue like "Unable to get class information when I imported the package "import org.json.JSONException;".How do I solve this Issue?
You can eliminate this issue by setting the 'suppressLoadErrors' property in the 'RedundantThrows' module of your checkstyle.xml file in the following way:
<module name="RedundantThrows">
<property name="suppressLoadErrors" value="true"/>
</module>
I think RedundantThrows
has now been removed, but I saw the same problem with JavadocMethod
. Adding suppressLoadErrors
worked for me too:
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="suppressLoadErrors" value="true"/>
</module>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With