Prabitha
Prabitha

Reputation: 113

Unable to get class information for checkstyle

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?

Upvotes: 5

Views: 2520

Answers (2)

Neil
Neil

Reputation: 4049

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>

Upvotes: 1

jdonmoyer
jdonmoyer

Reputation: 1270

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>

Upvotes: 2

Related Questions