On instrumenting with eclipse plugin with clover v 3.1.4 getting an additional .class file for each .class file

Hi,

I am trying to instrument my class files using eclipse and using 3.1.4 version.

On compilation I am getting an additional .class files for each .class file got instrumented having the same .class file name with some junk characters. All the files has same content as follows

Ex:

public class RemoveAttachments$__CLR3_1_4t0gt0gi38uxyzo
{
public static CoverageRecorder R;

static
{
CoverageRecorder _R = null;
try { CloverVersionInfo.An_old_version_of_clover_is_on_your_compilation_classpath___Please_remove___Required_version_is___3_1_4(); if (20120227103243583L != CloverVersionInfo.getBuildStamp()) { Clover.l("[CLOVER] WARNING: The Clover version used in instrumentation does not match the runtime version. You need to run instrumented classes against the same version of Clover that you instrumented with."); Clover.l("[CLOVER] WARNING: Instr=3.1.4#20120227103243583,Runtime=" + CloverVersionInfo.getReleaseNum() + "#" + CloverVersionInfo.getBuildStamp()); } R = Clover.getNullRecorder(); _R = Clover.getNullRecorder(); _R = Clover.getRecorder(new char[] { 'C', ':', '/', 'B', 'a', 'g', 'e', 'e', 's', 'h', '/', 'W', 'o', 'r', 'k', '/', 'P', 'e', 'r', 'f', 'o', 'r', 'c', 'e', '/', 'D', '2', 'D', 'e', 'v', '/', 'D', '2', '/', 'D', '2', 'F', 'S', '/', 'M', 'a', 'i', 'n', '_', 'M', '2', '/', 'D', '2', 'F', 'S', '4', 'D', 'C', 'T', 'M', '-', 'W', 'E', 'B', '/', '.', 'c', 'l', 'o', 'v', 'e', 'r', '/', 'c', 'o', 'v', 'e', 'r', 'a', 'g', 'e', '.', 'd', 'b' }, null, 1417621001508L, 1000L, 37609); } catch (SecurityException e) { System.err.println("[CLOVER] FATAL ERROR: Clover could not be initialised because it has insufficient security privileges. Please consult the Clover documentation on the security policy file changes required. (" + e.getClass() + ":" + e.getMessage() + ")"); } catch (NoClassDefFoundError e) { System.err.println("Your instrumented application could not find the Clover classes necessary to record coverage. Please use the 'Run with Clover' option to correct this. (" + e.getClass() + ":" + e.getMessage() + ")"); } catch (Throwable t) { System.err.println("[CLOVER] FATAL ERROR: Clover could not be initialised because of an unexpected error. (" + t.getClass() + ":" + t.getMessage() + ")"); } R = _R;
}
}

 

please let me know is it an expected behaviour or is there any thing I need to do to avoid this

 

1 answer

This widget could not be displayed.

Yes. This is an expected behaviour. For every top-level class declared in a source file Clover adds one static inner class containing a coverage recorder. Such class is named like "<base class name>$__CLR<clover version><some hash>". This is a reason why you can see about twice as much *.class files in a project compiled with Clover.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 5 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

31 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you