Unable to retrieve class information for validation

I have java code that works correctly. But when I checked it with checkstyle, it shows some kind of problem like "Unable to get class information when I imported the package" import org.json.JSONException; ". How do I solve this problem?

+5
source share
2 answers

You can fix this problem by setting the "suppressLoadErrors" property in the "RedundantThrows" module of your checkstyle.xml file as follows:

<module name="RedundantThrows"> <property name="suppressLoadErrors" value="true"/> </module> 
+2
source

I think RedundantThrows now deleted, 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> 
+1
source

Source: https://habr.com/ru/post/1211053/


All Articles