Menu

#101 Fix crash in case of escaped double-quote at line beginning

open
nobody
None
5
2011-05-20
2011-05-20
No

Since Cobertura is implemented via instrumenting class files, it is to some degree usable for JVM languages other than Java. When running Cobertura against a project written in Clojure, I had a crash because the code-colorizing parser tried to access a character before the beginning of a line in a multi-line string. This does not happen in syntactically correct Java, but IMHO crashing on unexpected input should be fixed.

The patch adds a test case for the problem and changes the logic to prevent the crash. The copyright to this patch belongs to my employer, ZenRobotics Ltd., and I have received permission to submit the patch to Cobertura.

Discussion

  • Jouni K Seppänen

    Note: the patch is against the Subversion branch v1_9_4, as that is the newest release but the released source archive does not have all files needed for compilation.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.