Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Trying to run checkstyle against code that does compile can cause an OutOfMemory exception. For projects that happen to have code that doesn't compile, the causes site:generate to fail.
Sure, this is an exceptional condition. Projects shouldn't be running around with code that doesn't compile, but what are issue tracking systems for if not for people to find exceptional conditions and enter them in. In other words, this may not be a bug, but from my perspective anything that causes a Maven user to see an OutOfMemoryException is interesting enough to put into Jira.
The offending code was this:
if (!(pObject instanceof java.lang.String)) { throw new EncoderException("Parameter supplied to " + "Soundex " + "encode is not of type " " "java.lang.String"); }
You'll note that there is a " instead of the final + operator.
I opened a bug on checkstyle's SourceForge site, and oburns replied that checkstyle expects compilable code for input. Should the pluing verify that the code can compile by calling javac or something?
Sorry, that was "oburn" not "oburns"