Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

0 votes

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
TAGS
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

175 views 2 9
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you