id
int64 0
5.38k
| issuekey
stringlengths 4
16
| created
stringlengths 19
19
| title
stringlengths 5
252
| description
stringlengths 1
1.39M
| storypoint
float64 0
100
|
---|---|---|---|---|---|
90 | CLOV-1236 | 02/19/2013 11:32:44 | Add 'clover.enabled' system property | If set to 'false' it should disable recording of the coverage data at runtime. | 1 |
91 | CLOV-1237 | 02/20/2013 07:18:48 | as a developer I'd like not to deploy clover.jar to app server | *Embed clover-runtime.jar into created JAR/WAR/EAR* *Problem:* Instrumenting code by Clover is not enough, user has to manually add clover.jar to the runtime classpath. Otherwise it gets "ClassNotFoundException com_cenqua_clover/CoverageRecorder" error. There are over 6'000 views on answers.atlassian.com about this problem (it's #1 on the list) *Solution:* Create a possiblity to automatically or manually embed clover-runtime.jar into produced JAR/WAR/EAR artifacts. *Tasks:* 1) (/) Restructure Clover modules and find exact set of runtime classes, create clover-runtime.jar artifact out of it (will be published on Maven Central). Such subset was already found for Clover-for-Android, but it does not have classes for Distributed Coverage feature. See linked issue. 2) Create Ant task like <clover-embed-runtime-jar targetJar="my.jar"/> which will allow to manually put runtime classes into it. 3) Check if it would be possible to intercept all <jar/> calls as well and do it automatically. Add option to disable this automatic integration and/or to specify regular expression pattern which jars shall be enhanced. 4) Create Maven goal like clover2:embed-runtime-jar with <targetJar> property. 5) Check how to automatically embed Clover runtime classes. Possibilities: * extract clover-runtime.jar into target/classes or target/classes-clover * scan build reactor, intercept packaging tasks like maven-ear-plugin, maven-jar-plugin, maven-rar-plugin, maven-war-plugin, maven-assembly-plugin * modify maven project at runtime and add clover:clover-runtime dependency 6) Eclipse integration - we already have -Xbootclasspath for "Run with Clover as..." but it's not enough if user has web application for example. Extract clover-runtime.jar into project's build folder so that other packaging tools could automatically pick these classes. Add pre-build or post-clean event handler to make sure that these classes will be still present after rebuild. Add some option in Window > Preferences or Project > Properties for this. 7) IDEA integration - put these classes into out/production and out/test. Add option in File > Settings > Project Settings or File > Settings > IDE Settings for this. 8) Grails integration - t.b.d. | 40 |
92 | CLOV-1238 | 02/20/2013 07:31:06 | Split clover-core into clover-runtime + clover-core | 1) Use class dependency analyzer. Check for classes loaded via reflections too!!! (/) _class dependency analyzer was also used to strip third party libraries from unused classes_ 2) Move runtime classes to clover-runtime module. (/) 3) -Rename packages to com.atlassian.clover.runtime.* but keep few core classes in com_atlassian_clover. Reason: Clover-for-Ant will still have single clover.jar probably and it will use FileInputStream(clover.jar) to dynamically extract classes form archive so we must be able to distinguish them.- (/) _cancelled; too many changes in referenced classes and runtime still "borrows" few classes from core_ 4) Enhance build script to publish this as com.atlassian.clover:clover-runtime artefact on Atlassian Central and Maven Central. (/) Note: - for backward compatibility clover-core shall still contain runtime classes and it's name will not change (com.atlassian.clover:clover) (/) - -we can add dependency to clover-runtime in pom.xml, however - just to keep programmers informed about this change- (/) _dependency not added as clover-core already bundles the clover-runtime_ 5) Update documentation on CAC and inform that new, small artifact is available since version 4.0.x. (/) _done_ 6) Update UML in clover-maven-module-structure.graphml (/) _done_ 7) Test it with Clover-for-Android (original clover-core exceeds method limit in Dalvik image) (/) _couldn't test as Android Studio uses Gradle now and is based on IDEA not Eclipse_ | 5 |
93 | CLOV-1239 | 02/20/2013 07:35:59 | Create <clover-embed-runtime> task | Create Ant task: {noformat} <clover-embed-runtime targetFile="jar/war/ear file"/> {noformat} which will put all Clover's runtime classes into targetFile. Unzip all com_cenqua_clover.* and com.atlassian.clover.runtime.* classes from clover.jar archive which is currently on a classpath (we've got a trick how to find it - see searching for clover.license) into a temporary directory and next put them into jar (use Ant <jar/> task for this or handle zip directly). | 3 |
94 | CLOV-1240 | 02/20/2013 07:38:16 | Create clover2:embed-runtime-jar goal | Create MOJO for: {noformat} clover2:embed-runtime-jar {noformat} which will read the <targetJar> property and do the same what Ant task does. Difference: we might use maven-assembly-plugin and download clover-runtime artifact for this. | 3 |
95 | CLOV-1241 | 02/20/2013 07:43:16 | Maven extracts clover-runtime into target/classes or target/classes-clover | Automatic integration for unknown plug-ins: extract clover-runtime artifact into current build folder (target/classes for clover2:setup and target/classes-clover for clover2:instrument). Thanks to this these runtime classes might be automatically picked up and packaged. Check if there is any Maven's build property holding list of classes which have to be updated. Add configuration option for this, like: {noformat} extractCloverRuntimeIntoTargetClasses=true {noformat} | 3 |
96 | CLOV-1242 | 02/20/2013 07:46:08 | Maven: intercept maven-jar-plugin and add clover-runtime | Check if it would be possible to define some Maven property for maven-jar-plugin which would allow to define directory or list of files to be added to the archive. If yes, then extract clover-runtime into e.g. target/clover/runtime (note: it shall not interfere with CLOV-1241 somehow) and pass it to maven-jar-plugin. | 5 |
97 | CLOV-1243 | 02/20/2013 07:46:59 | Maven: intercept maven-ear-plugin and add clover-runtime | The same as CLOV-1242 but for maven-ear-plugin | 3 |
98 | CLOV-1244 | 02/20/2013 07:49:26 | Maven: intercept maven-rar-plugin and add clover-runtime | The same as CLOV-1242 but for maven-rar-plugin | 3 |
99 | CLOV-1245 | 02/20/2013 07:51:04 | Maven: intercept maven-war-plugin and add clover-runtime | The same as CLOV-1242 but for maven-war-plugin | 3 |
100 | CLOV-1246 | 02/20/2013 07:53:25 | Maven: intercept maven-cargo-plugin and add clover-runtime dependency | The maven-cargo-plugin is the most popular plugin for running in-container tests. Add <dependency> for clover-runtime there. Add configuration option to have a possibility to disable this. | 5 |
101 | CLOV-1247 | 02/20/2013 07:54:22 | Eclipse: extract clover-runtime classes into build directory | Extract clover-runtime.jar into project's build folder so that other packaging tools could automatically pick these classes. Add pre-build or post-clean event handler to make sure that these classes will be still present after rebuild. Add some option in Window > Preferences or Project > Properties for this. | 5 |
102 | CLOV-1248 | 02/20/2013 07:55:35 | IDEA: extract clover-runtime classes into build directories | IDEA integration - put these classes into: * out/production and * out/test. Add option in File > Settings > Project Settings or File > Settings > IDE Settings for this. | 5 |
103 | CLOV-1249 | 02/20/2013 07:59:07 | Grails: extract clover-runtime into build directory | Usually it's here: <home>\.grails\X.Y.Z\projects\<project_name>\classes | 8 |
104 | CLOV-1250 | 02/21/2013 23:35:08 | Prepare integration tests for GrowableCoverageRecorder | Integration tests like: * GrowableCoverageRecorder on a large code base * GrowableCoverageRecorder with different strategies ** PerTestRecorder.One / Many / None ** ThreadVisibilityStrategy.SingleThreaded / Volatile / Synchronized => especially check if/how per-test code coverage is affected by multithreaded tests of multithreaded application * GrowableCoverageRecorder with DistributedCoverage | 5 |
105 | CLOV-1251 | 02/21/2013 23:35:35 | Prepare integration tests for SharedCoverageRecorder | Integration tests like (all with partial global and per-test coverage): * SharedCoverageRecorder with single InstrumentationSession and many classes * SharedCoverageRecorder with multiple InstrumentationSessions, classes from sessions running together * SharedCoverageRecorder with multiple clover databases (different initstrings) * SharedCoverageRecorder with the same class compiled multiple times, different versions are running with coverage measurement, | 5 |
106 | CLOV-1253 | 03/08/2013 07:53:43 | Some of per-test recording strategies do not work for multi-threaded applications | *Introduction* We've got five per-test recording strategies: * Diffing - clover.pertest.coverage=diff * Null - clover.pertest.coverage=off * SingleThreaded - clover.pertest.coverage=<empty> and clover.pertestcoverage.threading=<empty> - DEFAULT POLICY * Synchronized clover.pertest.coverage=<empty> and clover.pertestcoverage.threading=synchronized * Volatile - clover.pertest.coverage=<empty> and clover.pertestcoverage.threading=volatile *Current status* 1) A SingleThreaded does not work with multi-threaded apps. Of course it's designed for single thread only. But at least it should have a correct value of coverage for a test case from a current thread. Expected number of hit counts is between: {noformat} hits(current test) <= ... <= hits(curent test + all other concurrent tests) {noformat} but currently actualHits can be < than hits(current test) due to fact that CloverBitSet.set\(n\) is not thread-safe. 2) A Volatile strategy has a similar problem. CloverBitSet.set\(n\) is not thread safe. Starting/ending of test slices works fine. 3) A Synchronized is correct because we've got 'CloverBitSet.set\(n\)' wrapped in a synchronized block. Starting/ending of test slices works fine. 4) A Diffing needs more tests. *Possible fix* CloverBitSet could have two variants: * compact - store hits as bit mask in long[] array - set\(n\) is not thread-safe, can be used for report generation as it consumes less memory * exploded - store hits as boolean[] array - set\(n\) \{ arr[n] = true \} would be thread-safe, used for runtime recording; it consumes 8x more memory but on the other hand we usually don't have 10'000 tests running in parallel; number of parallel tests is ~ number of processor cores available | 5 |
107 | CLOV-1255 | 03/11/2013 12:43:24 | Prepare code example for Grails | Prepare sample Grails project with domain classes, controllers and unit tests which will use the 'shared' coverage recorder. | 2 |
108 | CLOV-1256 | 03/13/2013 07:26:53 | as a developer I'd like to instrument tests written in the Spock framework | We use Clover for both Java and Groovy. Unfortunately, Clover does not understand the tests we write in [Spock|http://code.google.com/p/spock/]. So a test like this: {code} class OpsWiseJobQueryTestSpec extends AbstractTestSpec { OpsWiseJobQuery wait static File existingFileMarker = File.createTempFile("opswiseJobQuery", ".txt") void setup() { wait = new OpsWiseJobQuery() wait.manifestDir = existingFileMarker.getParentFile() existingFileMarker.createNewFile() } void cleanup() { existingFileMarker.delete() } def "should work with completed job"() { expect: state == wait.getJobState(manifestFilename) where: state | manifestFilename OpsWiseJobState.WAITING | "non-existing-name.whatever" OpsWiseJobState.DONE | existingFileMarker.getName() } } {code} Ends up with a coverage report like this: {noformat} Class Tests Fail Error Time (secs) % Tests Success OpsWiseJobQueryTestSpec 12 0 0 0,026 100% Tests Started Status Time (secs) Message OpsWiseJobQueryTestSpec. 12 mar 10:32:50 PASS 0 OpsWiseJobQueryTestSpec.$spock_feature_1_0 12 mar 10:32:49 PASS 0,001 OpsWiseJobQueryTestSpec. 12 mar 10:32:49 PASS 0 OpsWiseJobQueryTestSpec.setup 12 mar 10:32:49 PASS 0,009 OpsWiseJobQueryTestSpec. 12 mar 10:32:50 PASS 0,001 OpsWiseJobQueryTestSpec.$spock_feature_1_0 12 mar 10:32:50 PASS 0 OpsWiseJobQueryTestSpec.cleanup 12 mar 10:32:50 PASS 0,01 OpsWiseJobQueryTestSpec.setup 12 mar 10:32:50 PASS 0,001 OpsWiseJobQueryTestSpec.cleanup 12 mar 10:32:50 PASS 0,001 OpsWiseJobQueryTestSpec. 12 mar 10:32:49 PASS 0,002 OpsWiseJobQueryTestSpec. 12 mar 10:32:49 PASS 0,001 OpsWiseJobQueryTestSpec. 12 mar 10:32:49 PASS 0 {noformat} I would expect to see just a single test passed. | 0 |
109 | CLOV-1257 | 03/21/2013 06:26:32 | Add clover.coverageRecorder field for Clover-for-Grails plugin | *A follow-up of CLOV-1189:* Support the coverageRecorder natively in the plugin config. It would be nice to go back to using the simpler configuration instead of the setuptask/reporttask closures. Like: {noformat} clover { coverageRecorder: 'SHARED' } {noformat} *Implementation:* If coverageRecorder field is defined, then create a single profile named "default" with coverageRecorder as specified and undefined distributedCoverage. In case clover.setuptask is specified, then settings from this closure will override clover.coverageRecorder value. | 3 |
110 | CLOV-1258 | 03/25/2013 08:22:34 | Upgrade third party libraries used by Clover | Upgrade third party libraries to their latest versions: * jebrains annotations 13.0 (/) * ASM 5.0 (/) we're using ASM 3.0, 4.1 and 5.0 actually (for different purposes) * commons-codec 1.9 (/) * commons-collections 3.2.1 (/) * commons-lang 2.6 (/) * guava 18.0 (/) * JCommon 1.0.23 (/) * JFreeChart 1.0.19 (/) * Log4J 1.2.17 (/) * Velocity 1.7 (/) | 8 |
111 | CLOV-1259 | 03/25/2013 08:26:14 | Reduce friction in tutorial | Make Clover evaluation easier by simplifying the tutorial. The build.xml shall contain full Clover set-up so that just typing "ant" shall produce all reports. So swap build.xml <-> build_completed.xml, fix "test" target name, add default="clover.all" etc. Futhermore, Ant and Maven configuration in tutorial shall be unified - use 'target' directory for both of them. Get rid of clutter like 'clover', '.clover', 'build' directories. Update tutorial page on CAC. Consider adding groovy-all-1.7.0.jar into /lib directory so that user won't need to define GROOVY_HOME path. | 5 |
112 | CLOV-1260 | 03/25/2013 08:37:48 | Add url for 'utils.js' home page | In Clover-for-Eclipse and Clover-for-IDEA "About" dialogs the Utils.js link does not open the library home page. | 2 |
113 | CLOV-1261 | 03/25/2013 10:11:19 | PDF report with "include failed test coverage" option fails | Eclipse Install Clover-for-Eclipse, open tutorial project, select Run new report > PDF report > select "Include failed test coverage" > click Finish. PDF report generation fails with error log message: "The JVM report process failed with error code 1 - see log for details" !pdf_fail.png! Increasing heap size from 512M to 768M solved the problem. To do: check why such small project requires so much memory. Check also PDFReporter, Clover-for-IDEA. | 2 |
114 | CLOV-1262 | 03/25/2013 10:33:06 | IDEA Darcula theme ignores <table border=0> | Clover's "About" dialog looks ugly when the "Darcula" theme is selected in IDEA 12. Despite having <table border="0"> in JEditorPane("text/html"), it shows table with a border. Example: !clover_about_idea12_themes.png! | 3 |
115 | CLOV-1263 | 03/25/2013 11:17:51 | Race condition in IDEA during full rebuild and test execution | Clover-for-IDEA. Race condition during database cleanup and running unit tests at the same time. Steps to reproduce; 1. Open "Moneybags" tutorial project 2. Prepare 'run all unit tests' configuration 3. Click "Delete Coverage Database" button in the "Cloverage" view 4. Click "Rebuild now" in the prompt dialog 5. Quickly click "Run (Shift+F9)" Problem: Project is being rebuilt and clover.db is recreated, at the same time unit tests are compiled and also clover.db is being modified. There's a warning in console log like this: {noformat} WARN: CLOVER: Clover database: 'C:\Work\release\testing-sandbox\clover-ant-3.1.11\tutorial\.clover\coverage.db' is no longer valid. Min required size for currently loading class: 172, actual size: 96 WARN: CLOVER: Coverage data for some classes will not be gathered. Tests taking too long? Try Clover's test optimization. 2 test classes found in package '' {noformat} | 8 |
116 | CLOV-1264 | 03/26/2013 09:24:52 | Performance problem with SHARED coverage recorder in Grails app | Follow up of CLOV-1189. {noformat} setuptask = { ant, binding, plugin -> ant.'clover-setup'(initstring: ".clover/common.db") { ant.fileset(dir: "grails-app", includes: "**/domain/**, **/controllers/**, **/jobs/**, **/services/**, **/taglib/**, **/utils/**") { } ant.fileset(dir: "src", includes: "**/*.groovy, **/*.java", excludes: "**/script@*.groovy, **/system/generator/**, **/system/database/generators/**, **/castor/**") { } ant.fileset(dir: "test", includes: "**/*.groovy") { } // ant.testsources(dir: "test", enabled: false) { } ant.profiles { ant.profile(name: "default", coverageRecorder: "SHARED") } } } {noformat} If I uncomment the testsources enabled:false line, it runs about as quickly as before. Normally our coverage run takes about 42 minutes. With the above configuration it's been running for about 3 hours and is about half finished. | 5 |
117 | CLOV-1265 | 04/03/2013 14:02:04 | as a developer I'd like to track build events in IDEA12 external build | *Prepare empty plugin for external build.* analyze external build API, prepare a simple plugin which will log compilation progress (module name, file name being compiled) and send notifications about it to IDE; it should also notify about "compilation finished" event. | 5 |
118 | CLOV-1266 | 04/03/2013 14:09:23 | Check how clover.db can be accessed from build server and IDE processes at once | probably there are two possible ways to interact with build server process and the IDEA IDE process: 1) build server performs (parallel) instrumentation in memory and at the end of the whole build writes or updates clover.db (it has write access); next it sends notification to IDE which refreshes views and editors; potential problems: deletion of database during build, locking files 2) build server performs (parallel) instrumentation sending information about code structure back to IDEA IDE, which manages the database and sends back indexes of elements; potential problems: high messaging overhead -> need to send at most one message per file -> need to introduce local offset constant per each file; | 13 |
119 | CLOV-1267 | 04/03/2013 14:17:27 | Check how parallel instrumentation can be handled | External build supports parallel compilation. Modules are built in parallel, while files in a single module are compiled sequentially. Clover expects that at least a single file is instrumented sequentially (the FileInto getCoverageMask which returns bitmask based on index range), so that the clover database contains continuous range of indexes for code elements from a single file. It means that we need to synchronize per file. It should not be a problem that subsequent files in database are from different modules. possible solutions: 1) simple lock per whole file in some synchronized block; drawback: turns parallel build into single-threaded one. 2) batch operations, like first instrument whole file using relative indexes, next lock database and store information about whole file, database would return base offset value; still in sychronized block but locked for shorter amount of time; 3) change clover.db structure so that elements could be registered in any order; change FileInfo getCoverageMask function (and related); check for any data structures which needs to be made thread-safe; | 8 |
120 | CLOV-1268 | 04/03/2013 14:18:46 | Implement clover.db sharing between build server and IDE processes | Based on analysis | 13 |
121 | CLOV-1269 | 04/03/2013 14:19:07 | Implement parallel compilation handling | Based on analysis of CLOV-1267 | 13 |
122 | CLOV-1270 | 04/03/2013 14:19:55 | Write sequential integration tests for build server | Prepare integration tests for external build feature. Test the scenario when 'parallel compilation' for 'external build' is disabled. Check if any helper test classes for it are available in IDEA code based. | 13 |
123 | CLOV-1271 | 04/03/2013 14:20:45 | Test IDEA IDE - build server interaction | Exploratory tests in user interface. | 5 |
124 | CLOV-1273 | 04/09/2013 02:14:08 | Reduce coverage requirements for groovy safe operator | Currently any usage of the groovy safe operator requires that that reference be tested with a null and non-null value. This adds significant overhead in the case where multiple calls are chained together with the safe operator. It would be more useful as a coverage measurement if the chain was treated as one call. Look at the following line as an example. def value = a.getB()?.getC()?.getD()?.getE() This line of code should require a test that sets value to null and a test that sets value to something non-null. It should not however require a test where B is null a test where c is null a test where d is null and a test where e is null to reach 100% conditional coverage. While I hope that lines that look like the above are not written very often, it still could happen, and having to write a bunch of tests to cover one line seems like a heavy burden. | 8 |
125 | CLOV-1279 | 04/17/2013 14:03:30 | Document how to configure Clover + Bamboo with 'mvn deploy' goal on CAC | The problem is that if 'mvn deploy' is used with Clover, it will deploy instrumented JARs into repository. There's no documentation on confluence.atlassian.com in the BAMBOO space how such separation can be achieved. Create a page with a description like: If you use "Automatically integrate Clover into this build" option, then Bamboo will add clover2:setup + clover2:clover goals into every Maven task found in the Job (more details can be found here). It means that you shall not use "mvn deploy" together with automatic Clover integration. There are at least three ways to solve this problem: 1) Create a separate Plan (or Job) in which automatic Clover integration is enabled and the Maven 2.x task does not deploy artifacts ("mvn verify" is used for instance). So this plan would be used only for Clover reporting. Benefits: full Clover separation from the Plan (or Job) performing deployment Drawbacks: doubled Plan (or Job) or 2) Use manual Clover integration ("Clover is already integrated into this build") but run Clover in a parallel build lifecycle. It means that you'd have to configure Clover goals manually in the pom.xml and use the "clover2:instrument" instead of "clover2:setup". You could have then just one Maven task with "mvn clean deploy". Instrumented jars would have -clover.jar suffix. Benefits: build is executed only once Drawbacks: sometimes there might be problems with resolving correct ("cloverized") dependent artifacts for multi-module projects or deploying the instrumented war to test server or 3) Use manual Clover integration, but run Clover in a default build lifecycle. It means that you'd have to configure Maven task manually and use "clover2:setup" goal. Then you have to use two Maven tasks - one with "... clover2:setup test ..." and one with "deploy". This is an approach you have followed (according to screenshots I see in attached pdf). Benefits: no problems with artifact dependencies Drawbacks: two Maven tasks Recommendation: approach #3. Steps for approach #3: clean clover2:setup test clover2:aggregate clover2:clover b) define "Clover Report" artifact On the 'Artifacts' tab, click Create Definition and complete the form as follows: Name This should begin with with "Clover Report". Location This should point to the HTML report directory (e.g. target/site/clover) Copy Pattern Use **/*.* More details on https://confluence.atlassian.com/display/BAMBOO/Enabling+the+Clover+add-on#EnablingtheCloveradd-on-ManualCloverintegration | 1 |
126 | CLOV-1280 | 04/26/2013 19:45:19 | Error when trying to Check for an Update | I just recently upgraded from IntelliJ IDEA 10.5.4 to 12.1.1 and now 12.1.2. I think my last update to Clover was BEFORE I updated IDEA versions. | 5 |
127 | CLOV-1281 | 05/10/2013 10:30:23 | Improve message for NoSuchRegistryException | See https://confluence.atlassian.com/x/AIP3F A message "Clover registry file: <path/to/clover.db> does not exist." is too general and does not help developer to understand what the exact problem is. Find a more meaningful message. | 1 |
128 | CLOV-1283 | 05/10/2013 11:59:42 | as a developer I'd like to build modules sequentially using IDEA12 external build | Support IDEA12 "external build" feature with the "parallel build" option DISABLED. To do: * serialize Clover configuration for the JPS external process * implement code instrumentation using builder API (jps-builders) and new project model (jps-model-api) * implement notifications back to IDE * implement model refreshing etc * write integration tests for build server | 100 |
129 | CLOV-1284 | 05/10/2013 12:03:36 | as a developer I'd like to build modules in parallel using IDEA12 external build | Support IDEA12 "external build" feature with a "parallel build" option ENABLED. To do: * implement parallel compilation handling in clover core ** affects FileInfo BitSet range for instance (will become non-continuous?) ** concurrent addition of data to the model? ** clover-report side-effects? * write integration tests for clover core * write integration tests for build server * test idea ide - build server interaction | 100 |
130 | CLOV-1285 | 05/10/2013 12:10:21 | Write parallel integration tests for build server | Create IT for external build process with a parallel compilation enabled. | 13 |
131 | CLOV-1286 | 05/10/2013 12:14:35 | as a developer I'd like to build projects using 'classic' build in IDEA12 | Make sure that new 'external build' feature support does not break the old build functionality when the compilation is performed in IDEA IDE process. It shall still use JavaSourceTransformingCompiler class, old Project structure, event handling etc. | 13 |
132 | CLOV-1287 | 05/10/2013 12:16:35 | Code instrumentation using jps-builders | scope: * java code instrumentation * statement/method contexts * test detection | 20 |
133 | CLOV-1288 | 05/10/2013 12:18:23 | Implement communication between IDEA IDE and JPS builder | * notifications about build events, progress, error handling * model refreshes | 13 |
134 | CLOV-1289 | 05/22/2013 09:49:53 | Support custom metrics in PDF report | Currently the PDF report does not handle <columns> element so it's not possible to have a custom set of metrics in the summary. | 5 |
135 | CLOV-1291 | 05/23/2013 12:05:51 | PDF report with class-level and method-level summary | The PDF report contains package-level coverage table. Add an option for: * <clover-report> Ant task * clover2:clover mojo * 'generate report' button in Eclipse * 'generate report' button in IDEA which would allow user to select report detail level: * package (default) * class * method for PDF file format. | 8 |
136 | CLOV-1292 | 05/23/2013 23:03:46 | Check how parallel instrumentation sessions can be handled | External build will start/close single instrumentation session in which modules will be compiled in parallel (see CLOV-1267). However, a parallel build in ant/maven might involve starting multiple instrumentation sessions at once (just think about <parallel> + <javac> in Ant for instance). Check how we could deal with this. Possible problems: * clover.db file locking (appending instrumentation session) Areas for prototyping: * clover db shared in memory * clover db structure change - adding top-level index for sessions/files/classes etc, possibility to interleave data from several instrumentation sessions * etc ... | 13 |
137 | CLOV-1293 | 05/23/2013 23:14:01 | as a developer I'd like to build continuously using external build | Under the Project Settings / Compiler / Use external build checkbox there is the option 'Make project automatically'. Enabling this feature runs 'continuous compilation', i.e. all sources are compiled as soon as they're modified (as saved actually, which happens automatically). It means that we'd have Clover instrumenter called thousands of times during single IDEA IDE run. It means it would produce thousands of instrumentation sessions. And the current db structure is quite linear in search. And it would create thousands of coverage recorders - one instance per each class, practically. Database structure and coverage records would have to be optimized for such continuous build approach. Possible solutions: * no instrumentation sessions, when new session starts, remove old data related with a source file being compiled and add the new one; might require extra index for fast search for the latest version * using a SHARED coverage recorder; * file-based hit count array indexes instead of the global one? | 100 |
138 | CLOV-1294 | 05/23/2013 23:24:42 | Implement Clover data serialization from IDE to JPS | The following data must be serialized and passed to JPS builder: * global configuration - other.xml (license key, sid, install date) * project settings - <project>.ipr (flush policy, initstring etc ...) * module settings - <module>.iml (exluding entire module from instrumentation) * idea test detector (default test detector + all test source folders) * state of some buttons in UI (FeatureManager) (e.g. 'toggle build with clover') | 20 |
139 | CLOV-1295 | 05/28/2013 14:28:12 | Prepare documentation on CAC and AAC | On Clover-for-IDEA pages: * screenshot with "Compiler" settings page from IDEA ** external build can be enabled ** incremental build shall be disabled (recommended) ** parallel build must be disabled (refer to future story) On supported platforms page: * info that IDEA12.0-12.1 + Clover 3.1.8-3.1.11 must have 'external build' disabled Release notes about this new nice feature Update quiestion on AAC | 3 |
140 | CLOV-1297 | 06/15/2013 13:21:30 | HTML report shows only one test result per file if external XML JUnit files are used | In the <clover-report> we can define <testresults> element which causes that test results are being read from JUnit-compatible XML files, instead of from Clover's coverage recording files. This works as long as the test name can be mapped to the method name (which is usually the case). However, in case of the Spock framework, test cases are named using a free text like: {noformat} def "check if this test does xyz" {noformat} which is later translated to a method named like: {noformat} $spock_feature_0_0 {noformat} As a consequence Clover is not able to match test name to the method name (in order to link to sources). It uses an empty test id to store the test result (SLICE_ID = -1). If there are more than one non-matched method in the same XML file, all get the same ID=-1, thus overwriting each other in hashmap. As a consequence only one is listed. *Fix:* Generate a unique test id using the test name - a String.hashCode() for instance. | 5 |
141 | CLOV-1298 | 06/17/2013 13:09:02 | Contributed and unique coverage are equal | Possible bug. Investigate why these values are identical for MoneyBags tutorial. !unique_and_contributed_coverage.png! | 3 |
142 | CLOV-1299 | 06/19/2013 12:38:25 | Find workaround or fix for IDEA-108852 | See http://youtrack.jetbrains.com/issue/IDEA-108852 | 8 |
143 | CLOV-1301 | 06/26/2013 08:39:44 | Add more values for a 'threads' drop-down in report dialog | The 'Generate Report' dialog has max 4 threads: !report_generation_threads.png! In age of multi-core multi-threaded processors, we shall have it up to 16 at least. | 2 |
144 | CLOV-1302 | 06/26/2013 08:44:10 | The 'include line info' toggle works in the opposite way | This toggle !include_line_info.png! works exactly opposite: when selected, the XML report does NOT contain <line> tags; and vice versa. | 2 |
145 | CLOV-1303 | 06/27/2013 11:46:01 | Exclusion icon decoration is not visible in IDEA | Affects IDEA versions 10.5.x-12.1.x (works under IDEA 9.0.x). The toggle 'Annotate icons on included/excluded files ...' does not work: !icon_decoration_do_not_work.png! | 5 |
146 | CLOV-1326 | 07/16/2013 14:01:27 | Class loader fails on clover.jar package-info | Occurs in Bamboo, for instance. {noformat} 2013-07-15 12:16:10,250 ERROR [http-9087-Processor12] [[default]] Servlet.service() for servlet default threw exception java.lang.ClassFormatError: Illegal class name "com/google/common/collect/package-info" in class file com/google/common/collect/package-info at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1876) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:889) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1353) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:249) at java.lang.Package.getPackageInfo(Package.java:352) at java.lang.Package.getAnnotation(Package.java:367) at org.codehaus.jackson.xc.JaxbAnnotationIntrospector.findAnnotation(JaxbAnnotationIntrospector.java:885) at org.codehaus.jackson.xc.JaxbAnnotationIntrospector.findAccessType(JaxbAnnotationIntrospector.java:265) at org.codehaus.jackson.xc.JaxbAnnotationIntrospector.findAutoDetectVisibility(JaxbAnnotationIntrospector.java:216) at org.codehaus.jackson.map.AnnotationIntrospector$Pair.findAutoDetectVisibility(AnnotationIntrospector.java:1018) {noformat} | 3 |
147 | CLOV-1328 | 07/22/2013 10:02:15 | as a Clover developer I'd like to use the latest version of ANTLR | Clover uses ANTLR 2.x currently which is few light-years from the latest version, which is ANTLR 4.x. Upgrade to the latest ANTLR library version. * check ANTLR 4.x license (it's different from 2.x) whether we can actually use it; if not - try to use 3.x, if possible * check if there's any Java grammar (the best for Java 8) available for Antlr 4 * estimate whether it's better to use completely new grammar file and embed clover stuff there or to upgrade our existing grammar file from 2.x to 4.x ** watch out for our custom extensions like unicode escape sequence handling, annotations etc | 13 |
148 | CLOV-1333 | 07/22/2013 11:32:32 | as a developer I'd like to instrument Java8 new language features | This is an enhancement of CLOV-1139. Clover should be able not only to parse Java8 syntax without error, but also be able to add it's own code statements in order to measure code coverage for: * lambda expressions * ??? Scope: * instrumentation (java.g file) Out of scope: * database format * reporting | 20 |
149 | CLOV-1335 | 07/22/2013 11:50:47 | as a developer I'd like to generate reports with Java8 sources | New language features might require enhancements of existing reports. Evaluate how to represent lambdas - for instance: - as a separate entity in the report, like a class or a method - as an integral part of enclosing scope - similarly as the inline class is being handled by Clover Scope: * HTML, XML, JSON, PDF reports | 13 |
150 | CLOV-1336 | 07/22/2013 12:01:39 | as a developer I'd like to have information about lambdas in the Clover database | 1) Evaluate how to represent Java8 lambdas - for instance: - as a separate entity in the model, like a class or a method - as an integral part of enclosing scope - similarly as the inline class is being handled by Clover 2) Design the DB format having in mind a future extensibility (like functions, functions-in-functions, global variables etc) for other JVM-based languages (like Scala or Closure) 3) Implement it. Scope: * database format Out of scope: * source code instrumentation | 20 |
151 | CLOV-1337 | 07/22/2013 12:16:35 | as a developer I want be able to select 1.8 language level | The "1.8" language level shall be available for: * <clover-setup> <clover-instr> Ant tasks * clover2:setup clover2:instrument goal * project settings in Clover-for-Eclipse, Clover-for-IDEA Add such option, if necessary, write unit tests. | 3 |
152 | CLOV-1338 | 07/26/2013 13:07:21 | Warn if directory selected on Test Classes tab is disabled on Source Files tab | On the "Project Properties > Clover > Source Files" tab user can select which source folders shall be instrumented by Clover. By de-selecting the checkbox, the whole source root becomes excluded from instrumentation: !source_files.png! On the "Test Classes" files user can select which source roots contain test sources: !test_classes.png! It it possible to have such combination that: * source root is excluded * source root is marked as a test root This can be misleading. Add appropriate warning for it. | 3 |
153 | CLOV-1339 | 08/02/2013 09:51:16 | The <testmethod name=".*> does not match constructors | *Problem:* If you declare custom test detector, for instance: {code:xml} <clover-setup> <testsources dir="src/test/java"> <testclass name=".*"> <testmethod name=".*"/> </testclass> </testsources> </clover-setup> {code} Then the test detector does not match constructors. As a consequence, a class like this: {code:java} public class SomeException extends Exception { public SomeException(String s) { super(s); } } {code} will be treated as APPLICATION not as TEST code. *Background reason:* {code:java} public boolean isMethodMatch(SourceContext sourceContext, MethodContext methodContext) { final MethodSignature signature = methodContext.getSignature(); return methodMatches(signature.getName()) && methodAnnotationMatches(signature.getModifiers()) && methodReturnPatternMatches(signature.getReturnType()) && methodTagMatches(signature.getTags()); } public boolean methodReturnPatternMatches(String methodReturnType) { return methodReturnType != null && (methodReturnTypePattern == null || methodReturnTypePattern.matcher(methodReturnType).matches()); } {code} The methodReturnType==null for constructors, thus constructor do not match the pattern. *Solution:* We could rewrite check like this: {code:java} return methodReturnTypePattern == null || (methodReturnType != null && methodReturnTypePattern.matcher(methodReturnType).matches()); {code} However, this would require entirely new handling of code instrumentation for constructors. The reason is that code would be currently rewritten like: {code:java} public SomeException(String s) { __CLR3_1_12_100hjv4vvu6.R.globalSliceStart(getClass().getName(), 0); int $CLV_p$ = 0; java.lang.Throwable $CLV_t$ = null; try { __CLR3_1_12_162c4pt0(s); // <<< ORIGINAL CONSTRUCTOR $CLV_p$ = 1; } catch (java.lang.Throwable $CLV_t2$) { if ($CLV_p$ == 0 && $CLV_t$ == null) { $CLV_t$ = $CLV_t2$; } __CLR3_1_12_100hjv4vvu6.R.rethrow($CLV_t2$); } finally { __CLR3_1_12_100hjv4vvu6.R.globalSliceEnd(getClass().getName(), "SomeException.SomeException", 0, $CLV_p$, $CLV_t$); } } private __CLR3_1_12_162c4pt0(String s) { // << COMPILATION FAILURE, MISSING RETURN TYPE super(s); __CLR3_1_12_100hjv4vvu6.R.inc(1); __CLR3_1_12_100hjv4vvu6.R.inc(0); } {code} Problems: * call to super() must be first * we should not move constructor body into another method | 20 |
154 | CLOV-1341 | 08/13/2013 10:48:44 | Implicit return in Groovy switch statement is instrumented incorrectly | *Problem:* Consider the following code: {code:java} def create(boolean b) { switch (b) { case true: new Integer(10) break case false: new String("abc") break } } {code} * switch statement is the last statement in function, so it's value is being returned from a function call * new Integer() / new String() are last statements before 'break' which is a function's exit point * thus 10 or "abc" are returned Clover instruments code as follows: {code:java} def create(boolean b) { recorder.inc(0); switch (b) { case true: recorder.inc(1); new Integer(10) recorder.inc(2); break case false: recorder.inc(3); new String("abc") recorder.inc(4); break } } {code} * as a consequence, the last statement before 'break' becomes recorder.inc(), which returns void; as a result the create() function returns null *Workaround:* Use return instead of break in a switch statement, e.g.: {code:java} case true: return new Integer(10) // no break {code} *Fix:* * do not add recorder.inc() before 'break'; drawback of the solution: we loose tracking of empty breaks, see below. {code:java} def foo(int i) { switch (i) { case 1: recorder.inc(1); println("one") /*recorder.inc(2); not added*/ break; case 2: case 3: /*recorder.inc(3); not added*/ break; } } foo(1) foo(2) {code} in the code above it would be nice to have "case2: case 3: recorder.inc(3); break;" colored in green, despite that code makes nothing ... | 5 |
155 | CLOV-1344 | 08/29/2013 10:04:42 | Added LICENSES.html file to Clover artfiacts | Add the LICENSES.html file containing a table with: * name of third party library * link to home page (download sources / binaries) * link to the license file into the following artifacts: * Clover-for-Ant ZIP * Clover-for-Eclipse update site ZIP * Clover-for-IDEA plug-in JAR Note: * there's no need to add such file in the Clover-for-Grails and Clover-for-Maven2&3, because these plug-ins do not contain any third party libraries embedded in it (just references in pom.xml / BuildConfig.groovy) Reason for change: * ensuring that we obey requirements imposed by various open source licences | 3 |
156 | CLOV-1348 | 08/29/2013 13:21:51 | review navigation links on a page summary | frames/no frames - deleted show help - exists on some of pages overview/package/file - moved to breadcrumbs on a page header todo: discuss with UX designer how breadcrumbs shall show the structure, e.g.: - shall we display report name and a project name only? - or some main section? - or the entire path - if so, shall we have: Report > Project > Test/App/Clouds > Package > FIle/Class > (Test) or something else? | 2 |
157 | CLOV-1350 | 08/29/2013 13:24:15 | Add ADG navigation bar in the HTML report | * probably should be optional, because we embed reports in Bamboo -> how to handle this? all links from navigation bar shall be available somewhere else? * what to put in the nav bar? we don't have 'create issue' button for sure ;-) | 1 |
158 | CLOV-1352 | 08/30/2013 12:20:16 | Create code samples with java8 syntax | annontations on java types repeating annotations lambdas virtual extension methods | 13 |
159 | CLOV-1353 | 08/30/2013 12:22:39 | Prepare unit tests compiling and instrumenting code samples | test: compile code samples from CLOV-1352 using JDK1.8 javac instrument these code samples using Clover expected: no instrumentation of lambdas yet, just test if files are parsed correctly | 13 |
160 | CLOV-1354 | 08/30/2013 12:23:36 | Set up a Bamboo build for JDK1.8 | run all clover tests, including tests of java8 syntax on JDK1.8 on Bamboo | 3 |
161 | CLOV-1355 | 08/30/2013 12:27:33 | Add new grammar rules for java8 syntax | just to correctly parse new syntax, do not add clover instrumentation to these new code constructs something like: lambda : ( lambdaNoArgs | lambdaImplicitTypesArgs | lambdaExplicitTypesArgs ) '->' ( lambdaExpressionLikeStatement | lambdaCodeBlock ) plus extend the method definition and add 'default' keyword as optional; probably won't need to distinguish between method declaration in interface and in a class | 3 |
162 | CLOV-1356 | 08/30/2013 12:28:31 | Test if syntax highlighting in html report works fine | check manually or extend existing test case | 0 |
163 | CLOV-1357 | 09/02/2013 07:29:08 | as an administrator I need to monitor Clover usage on machines | As a system administrator I need to have a way to track down usage of Clover licenses within my organization in order to make sure that Clover is not installed or used on more machines than the license allows to. Currently there is no tool for this purpose and the only indirect way is to scan for clover license files. One of possible solutions: * add the environment variable which will enable tracking of clover license usage, such variable could be set on all machines in users' profiles by system administrator * the variable would point to the URL which will collect data about license usage, e.g.: {noformat} -Dclover.license.usage.url=http://path.to.web.server/clover.php?someoptions {noformat} * whenever code instrumentation or report generation is performed and the environment variable is defined, clover will connect to the specified URL using simple HTTP GET request * it would be up to the system administrator to collect data from such HTTP GET requests (e.g. parsing apache logs, using some php script to store data in database ...) * options of HTTP GET {noformat} ?LicenseID=ABCDEF&LicenseExpiryDate=YYYY-MM-DD&MaintenanceExpiryDate=YYYY-MM-DD&Organisation=CompanyName&NumberOfUsers=NN&LicenseTypeName=DESKTOP_OR_SERVER {noformat} Scope: clover core (would work in ant, maven, grails, eclipse, idea ...) | 13 |
164 | CLOV-1358 | 09/02/2013 09:49:27 | Enhance Clover database to keep full instrumentation history | *Problem:* Currently Clover database keeps list of instrumentation sessions plus information about classes which is a sum of all previous instrumentation sessions in such way that for given class only the latest class version is stored. There are two limitations of current design: 1) Test optimization might not work correctly for some test frameworks for Groovy language. This is due to nature of the Groovy language itself, where compiler allows to compile code which does not have all symbols resolved (they're being resolved at runtime). As a consequence if a dependent application class is changed, this does not to have trigger recompilation of the test class. See comment for more details. 2) Syntax highlighting in HTML report is always based on the latest class version, so if someone has older source file, it can be rendered incorrectly. There's a warning for this in HTML report, but we could fetch the actual line/char indexes from the older class version. *Solution:* 1) Enhance UpdateableRegFile and keep all versions of classes. This should be optional and disabled by default. 2) Enhance RegFile API to allow querying for older versions of given file (by default it should always return the latest version). 3) Add new option for <clover-setup> and <clover-instr> to allow to keep full instrumentation history. Either as "true/false" or as a number (maximum number of versions of the single class to store). 4) Add API to calculate index bitset as a logical OR of bitsets from all versions of the given file or class. | 40 |
165 | CLOV-1359 | 09/02/2013 09:51:58 | Fix test optimization and check all class versions | Depends on CLOV-1358 Test optimization should scan for hit count indexes of all versions of given class. This is necessary in order to workaround the problem of the groovyc compiler which resolves some of symbols at runtime and thus it does not always recompile test class if application class is not changed. | 13 |
166 | CLOV-1360 | 09/02/2013 09:56:50 | Analyse how tests are converted by Spock | Analyse how a test named like: {noformat} def "my test name" {noformat} is converted to a method like: {noformat} $spock_feature_1_0 {noformat} It's being done during AST transformation I guess. Check how it's possible to either: * reverse engineer this behaviour i.e. get a back-ward mapping $spock_feature_1_0 -> def "my test name" or * reproduce this behaviour, i.e. instrument methods in such order/way that Clover could 'calculate' the same method name | 13 |
167 | CLOV-1361 | 09/02/2013 10:01:11 | Implement test name to method name mapping in Clover | Based on the investigation results from CLOV-1360 write proper mapping in Clover so that we could keep original names of test cases in Clover database (like "my test name" instead of $spock_feature_1). And these tests should properly "link" to appropriate sections in source code - for instance in order to allow navigation in HTML report from test result to the test class source code. | 13 |
168 | CLOV-1362 | 09/02/2013 10:04:25 | Add Spock test name patterns in default test detector | Clover's default test detector should properly recognize Spock-framework test classes and which methods are test ones and which are helper ones. We shall not see stuff like this in the test summary: {noformat} Tests Started Status Time (secs) Message OpsWiseJobQueryTestSpec. 12 mar 10:32:50 PASS 0 // BAD OpsWiseJobQueryTestSpec.$spock_feature_1_0 12 mar 10:32:49 PASS 0,001 // OK, but use original name OpsWiseJobQueryTestSpec. 12 mar 10:32:49 PASS 0 // BAD OpsWiseJobQueryTestSpec.setup 12 mar 10:32:49 PASS 0,009 // BAD {noformat} | 8 |
169 | CLOV-1363 | 09/02/2013 10:11:55 | Ensure that reports show the test name and not the method name | Make sure that HTML, XML, PDF, JSON reports will display the test name (like "my test name" taken from def) rather than the actual name of test method (like $spock_feature). | 8 |
170 | CLOV-1369 | 09/27/2013 07:00:32 | as a developer I don't need to run Clover on JDK1.5 anymore | *Idea:* Sun Java 1.5 has: * end of public updates - Oct 2009 * end of Premier Support - May 2011 * end of Extended Support - May 2015 * see http://www.oracle.com/technetwork/java/eol-135779.html IBM Java 1.5: * its End Of Servcie (EOS) will expire on September 2015 * see https://www.ibm.com/developerworks/java/jdk/lifecycle/ According to various sources, most popular are Java6 and Java7 with Java8 growing up; Java1.5 has a fraction of market right now: * http://www.statowl.com/java.php although the report above shows Java version in web browser. Production environment may be different (especially regarding IBM Java). *Benefits:* Dropping support for Java 1.5 would improve Clover development, as we could: * use @Override for interfaces * use newer version of Guava (we're on Guava 9 (!) due to required JDK1.5 binary compatibility) * have all Clover modules and plugins on the same JDK level ** Groovy/Grails require JDK6+ to compile and execute ** Clover-for-IDEA (IDEA12 JPS) requires JDK6+ to compile and execute ** rest is on JDK5 *Tasks:* * update Supported-Platforms page * update guava library (and all others which are compiled against jdk6) * update build scripts * affects Clover Core, Clover-for-Ant, Clover-for-Maven2&3, Clover-for-Eclipse, Clover-for-IDEA, Clover-for-Grails *Out of scope:* * adding Override annotations - this will be done gradually during daily development | 1 |
171 | CLOV-1375 | 10/30/2013 21:01:29 | Extend API for loading and manipulate coverage files | Clover 3.2.0 published new interfaces describing a database model (com.atlassian.clover.api.registry). We need to reveal more Clover stuff via API in order to make it more usable by other developers. For example: * loading database and coverage files, handling instrumentation sessions * manipulating coverage files | 8 |
172 | CLOV-1376 | 10/30/2013 21:06:08 | Change signature of getXyz() methods in HasXyz interfaces | Current signatures have <? extends X>, for example: {code:java} List<? extends MethodInfo> getMethods() {code} This works fine for Clover's internal data structures (as there are subclasses), but it's not usable by developers using this API. It should be possible to have an assignment like: {code:java} List<HasMetrics> methodMetrics = classInfo.getMethods() {code} Fix: change to <? super X>. Note: We may need to expose additional methods in interface. They could throw Exception("not implemented") or return nulls. | 3 |
173 | CLOV-1377 | 10/30/2013 21:11:23 | Interfaces and factory methods for loading Clover database | *Problem:* Database entities are already in c.a.c.api.registry package. However, in order to load the database you have to call an inner class, for example: {code:java} import com.atlassian.clover.CloverDatabase; // XXX internal class import com.atlassian.clover.CoverageDataSpec; // XXX internal class import com.atlassian.clover.api.registry.ProjectInfo; // ... CloverDatabase db = CloverDatabase.loadWithCoverage(args[0], new CoverageDataSpec()); ProjectInfo projectInfo = db.getRegistry().getProject(); {code} *Fix:* Create proper interfaces and a factory hiding the CoverageDataSpec and CloverDatabase. | 1 |
174 | CLOV-1378 | 10/30/2013 21:19:34 | Interfaces and a template class for handling instrumentation sessions | *Problem:* * We need some concrete classes in the API to perform the instrumentation. At the moment we have an InstrumentationSession interface but no way to get an instance of this! * We need a way in the API to construct a MethodSignatureInfo (same problem as InstrumentationSession). In order to update content of a database and store new instrumentation session a number of internal classes must be used, e.g.: {code:java} import com.atlassian.clover.context.ContextSet; import com.atlassian.clover.registry.Clover2Registry; import com.atlassian.clover.registry.FixedSourceRegion; import com.atlassian.clover.registry.entities.MethodSignature; import com.atlassian.clover.registry.entities.Modifier; import com.atlassian.clover.registry.entities.Modifiers; import com.atlassian.clover.registry.entities.Parameter; // ... registry = Clover2Registry.createOrLoad(dbFile, projectName); session = registry.startInstr(encoding) // ... session.enterMethod(new ContextSet(), new FixedSourceRegion(12, 1), methodSignature, false, false, 5, LanguageConstruct.Builtin.METHOD); {code} *Fix:* - move MethodSignature, Modifier, Modifiers, Parameter to API - create factory for FixedSourceRegion, ContextSet - enterMethod (and others) shall use ContextSet from API | 3 |
175 | CLOV-1379 | 10/30/2013 21:31:34 | Create API for handling coverage recording files | *Problem:* Currently there's no API which would allow to create a global recording or a per-test recording file. Such API would be useful, e.g. for conversion of coverage data from other tools such as Cobertura or Emma. *Fix:* - publish global and per-test recording file format on CAC (including naming convention for files) - expose class for global coverage file (equivalent of FileBasedGlobalCoverageRecording) - expose class for per-test coverage file (equivalent of FileBasedPerTestRecording) | 8 |
176 | CLOV-1380 | 10/30/2013 21:41:24 | Create API for handling optimization snapshot | *See:* * [Hacking Clover / Updating optimization snapshot file|https://confluence.atlassian.com/display/CLOVER/Updating+optimization+snapshot+file] * [src/it/optmized/snapshot-hacking|https://bitbucket.org/atlassian/maven-clover2-plugin] *Problem:* Internal classes are used to manipulate snapshot. {code:java} import com.atlassian.clover.registry.entities.TestCaseInfo; import com.atlassian.clover.optimization.Snapshot; // ... Snapshot snapshot = Snapshot.loadFrom(snapshotLocation); final Set<TestCaseInfo> allTestCaseInfos = db.getCoverageData().getTests(); for (TestCaseInfo tci : allTestCaseInfos) { ... } snapshot.store(); {code} *Fix:* Create proper interfaces/classes in c.a.c.api.optimization | 8 |
177 | CLOV-1381 | 10/30/2013 21:48:34 | Add showInnerFunctions and showLambdaFunctions to clover2:setup | Command line tools and a <clover-report> Ant task have these options. Add: showInnerFunctions=false showLambdaFunctions=false to CloverReportMojo. Pass these values to a report descriptor. Define such values also in the default descriptor (clover-report.xml). | 1 |
178 | CLOV-1382 | 10/30/2013 21:54:21 | Add lambda toggle to report wizards in Eclipse and IDEA | Add toggles for showInnerFunctions and showLambdaFunctions in report wizards in Eclipse and IDEA plugins. Toggles shall be visible for HTML and XML reports. Consider using a drop down "show lambda functions": - NONE (inner=false, lambda=false) - FIELDS ONLY (inner=false, lambda=true) - FIELDS AND METHODS (inner=true, lambda=true) | 2 |
179 | CLOV-1384 | 11/04/2013 09:26:29 | Fully qualified java.lang is not used for system properties in Clover.getRecorder | Generated code: {code:java} R=com_cenqua_clover.Clover.getNullRecorder();_R=com_cenqua_clover.Clover.getNullRecorder();_R=com_cenqua_clover.Clover.getRecorder( "\u0063....\u0064\u0062", 1382598086449L,8589935092L,49,profiles, new String[]{"clover.distributed.coverage",null}); ^^^^^ java.lang. is missing {code} | 2 |
180 | CLOV-1388 | 11/06/2013 14:11:31 | as a developer I'd like to have Spock @Unroll annotation being recognized by Clover | The {noformat}@Unroll{noformat} annotation causes that a test name will be unrolled for every combination of test data. It means that we can have multiple tests having different name, which in fact are related with exactly the same test method, but ran with different input arguments. Examples (from http://docs.spockframework.org/en/latest/data_driven_testing.html): {code:java} // sequence index at the end @Unroll def "maximum of two numbers"() { ... } maximum of two numbers[0] PASSED maximum of two numbers[1] FAILED // variable substitution @Unroll def "maximum of #a and #b is #c"() { ... } maximum of 3 and 5 is 5 PASSED maximum of 7 and 0 is 7 FAILED {code} Problem for Clover: we don't know neither a number of tests nor their names during compilation. it would have to be deferred to runtime. => add some inner class for a test class which would monitoring the test name and somehow pass to the per-test coverage recorder? | 20 |
181 | CLOV-1389 | 11/14/2013 09:13:10 | Instrumentation of a branch condition with a generic type leads to javac compilation error | *For a declaration like this:* {code:java} public <T> T getFeatureValue(); ... if (client.getFeatureValue()) { {code} the instrumented line gets instrumented like: {code:java} _CLR3_1_113f23f2hnz3nmqe.R.inc(5146);if ((((client.getFeatureValue())&&(CLR3_1_113f23f2hnz3nmqe.R.iget(5147)!=0|true))||(_CLR3_1_113f23f2hnz3nmqe.R.iget(5148)==0&false))) {{ {code} which leads to compilation error: {noformat} error: bad operand types for binary operator '&&' {noformat} *Reason:* Javac performs autoboxing of the if condition. However it cannot deal properly if the same generic value is used with && or || operators. It looks like if javac wraps the entire if condition, not a single element. Look at the example: {code:java} public class BranchCoverageWithAutoboxing { interface Data { public <T> T getValue(); } public boolean testGetValue(Data source) { if (source.getValue()) { // Implicit conversion to Boolean via autoboxing return true; } return false; } public boolean testGetValueWithBoolean(Data source) { if (source.getValue() && true) { // Error: Operator && cannot be applied to java.lang.Object, boolean return true; } return false; } public boolean testGetValueWithWrappedBoolean(Data source) { if (Boolean.valueOf(source.getValue().toString()) && true) { // Explicit conversion, compilation is successful return true; } return false; } } {code} *Workaround:* Don't rely on boolean autoboxing and change a generic type to Boolean. or Extract expression being autoboxed to a local variable and evaluate before "if". Use the variable in "if". {code:java} // original: if (source.getValue) // fixed: Boolean b = source.getValue(); if (b) {code} or surround problematic code block with "///CLOVER:OFF" and "///CLOVER:ON" inline comments (note that three slashes are used) | 13 |
182 | CLOV-1390 | 11/18/2013 15:05:27 | clover intrumented testcode with PersitenceConstructor and parameters fails | If the integration tests running without clover instrumentation the test works fine, but with clover instrumentation the one test will fail. {code} org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:232) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:212) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:176) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:172) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:75) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1841) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1492) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1303) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:475) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:470) at com.test.framework.DatabaseSpec.search User Query(DatabaseSpec.groovy:52) {code} its seem to be a problem with follow declaration {code} @PersistenceConstructor public DataModel(String username, String password) {code} | 1 |
183 | CLOV-1393 | 12/02/2013 14:12:24 | review ADG page layout in the HTML report | review layouting of various components on the page and an interaction between them | 1 |
184 | CLOV-1395 | 12/05/2013 07:52:15 | IDEA13 compatiblity issues | Compatiblity issues of Clover-for-IDEA with the latest IDEA13: 1) Attempt to load a license key from a file (About Clover box > License button > Load) fails with an error: {noformat} com.intellij.openapi.fileChooser.FileChooser.chooseFiles(Ljava/awt/Component;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;)[Lcom/intellij/openapi/vfs/VirtualFile;: com.intellij.openapi.fileChooser.FileChooser.chooseFiles(Ljava/awt/Component;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;)[Lcom/intellij/openapi/vfs/VirtualFile; java.lang.NoSuchMethodError: com.intellij.openapi.fileChooser.FileChooser.chooseFiles(Ljava/awt/Component;Lcom/intellij/openapi/fileChooser/FileChooserDescriptor;)[Lcom/intellij/openapi/vfs/VirtualFile; at com.cenqua.clover.idea.config.LicenseConfigPanel.loadLicenseFile(LicenseConfigPanel.java:321) at com.cenqua.clover.idea.config.LicenseConfigPanel.actionPerformed(LicenseConfigPanel.java:216) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:702) at java.awt.EventQueue$4.run(EventQueue.java:700) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219) at java.awt.Dialog.show(Dialog.java:1082) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:786) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:462) at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1543) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1511) at com.intellij.ide.actions.ShowSettingsUtilImpl.a(ShowSettingsUtilImpl.java:263) at com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:228) at com.intellij.ide.actions.ShowSettingsUtilImpl.editConfigurable(ShowSettingsUtilImpl.java:213) at com.cenqua.clover.idea.AboutDialog$1.actionPerformed(AboutDialog.java:216) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3321) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:702) at java.awt.EventQueue$4.run(EventQueue.java:700) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154) at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182) at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221) at java.security.AccessController.doPrivileged(Native Method) at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219) at java.awt.Dialog.show(Dialog.java:1082) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl$MyDialog.show(DialogWrapperPeerImpl.java:786) at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:462) at com.intellij.openapi.ui.DialogWrapper.showAndGetOk(DialogWrapper.java:1543) at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1511) at com.cenqua.clover.idea.actions.AboutAction.actionPerformed(AboutAction.java:19) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:162) at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:170) at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:133) at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:311) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729) at java.awt.EventQueue.access$200(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:688) at java.awt.EventQueue$3.run(EventQueue.java:686) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:702) at java.awt.EventQueue$4.run(EventQueue.java:700) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:699) at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:696) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:520) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) {noformat} 2) Compilation of the project with Clover enabled fails with compilation error "package com_cenqua_clover" does not exist. The most probably Clover fails to add clover.jar to project's class path. {noformat} java: package com_cenqua_clover does not exist {noformat} 3) There is no option to enable/disable external build feature. It seems that the "classic" build functionality has been removed in IDEA13. | 13 |
185 | CLOV-1396 | 12/05/2013 12:01:54 | "No such property: testTargetPatterns" exception with Grails 2.3 | Unable to use Clover-for-Grails with Grails 2.3. Build fails with an exception: {noformat} |Environment set to test ................................... [mkdir] Created dir: C:\Work\grails-clover-plugin-hg\testcases\petclinic233\target\test-reports\html . [mkdir] Created dir: C:\Work\grails-clover-plugin-hg\testcases\petclinic233\target\test-reports\plain .Error | Error executing script TestApp: No such property: testTargetPatterns for class: _Events groovy.lang.MissingPropertyException: No such property: testTargetPatterns for class: _Events at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50) at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231) at _Events$_run_closure3.doCall(_Events.groovy:75) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086) at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910) {noformat} *Reason:* In the Grails 2.3 the _GrailsTest.groovy has been refactored into GrailsProjectTestRunner and GrailsProjectTestCompiler. The testTargetPatterns property has been removed. *Probable fix:* Replace testTargetPattern by iterator over testNames. | 2 |
186 | CLOV-1397 | 12/16/2013 19:02:43 | Java+Groovy compilation fails with Clover enabled in IntelliJ 12.1.x | When building my project in IntelliJ the build fails with the following exception. I saw a couple other similar comments about how using an external build can cause problems but I thought this was fixed with Clover 3.2? If I turn off the external build then the compilation does succeed. The project is a combined Java/Groovy project if that matters. Let me know if you need any more details. {noformat} Error: java.lang.IllegalArgumentException: org.jetbrains.jps.javac.TransformableJavaFileObject java.lang.RuntimeException: java.lang.IllegalArgumentException: org.jetbrains.jps.javac.TransformableJavaFileObject at com.sun.tools.javac.main.Main.compile(Main.java:475) at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:132) at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:167) at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:364) at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:276) at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:190) at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:162) at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1018) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:742) at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:790) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:705) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:526) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:314) at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:179) at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:129) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:220) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:112) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler$1.run(BuildMain.java:132) at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:41) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.IllegalArgumentException: org.jetbrains.jps.javac.TransformableJavaFileObject at com.sun.tools.javac.file.JavacFileManager.inferBinaryName(JavacFileManager.java:660) at javax.tools.ForwardingJavaFileManager.inferBinaryName(ForwardingJavaFileManager.java:84) at com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager.inferBinaryName(ClientCodeWrapper.java:225) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2524) at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2505) at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2143) at com.sun.tools.javac.code.Symbol.complete(Symbol.java:421) at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:298) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272) at com.sun.tools.javac.comp.Enter.complete(Enter.java:484) at com.sun.tools.javac.comp.Enter.main(Enter.java:469) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:929) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824) at com.sun.tools.javac.main.Main.compile(Main.java:439) ... 23 more {noformat} {panel:title=Problem summary|bgColor=yellow} This bug occurs when all of the following conditions are met: * IDEA 12.1.1 or later is used * Clover 3.1.12 or later is used * an "external build" feature is enabled (Settings > Compiler > Use external build) * project has a mixed Java + Groovy code It's an IDEA bug - http://youtrack.jetbrains.com/issue/IDEA-110835 - and has been fixed in IDEA13. Therefore: * in IDEA 12.x - disable the "external build" feature * in IDEA 13.x - problem does not occur {panel} | 13 |
187 | CLOV-1398 | 12/18/2013 22:18:42 | Java 1.8 Exceptions not being propagated correctly | I have the following test stub (src/main/java) {code:java} public final class TestStub { TestStub() { throw new IllegalArgumentException(); } public static void getHandler() { new HashMap<>().computeIfAbsent(String.class, t -> new TestStub()); } } {code} And the following test (src/test/java) {code:java} public class FooTest { @Test(expected = IllegalArgumentException.class) public void test0() { TestStub.getHandler(); } } {code} Using maven It runs fine using "clean install" however using clover I get the following exception {noformat} java.lang.reflect.UndeclaredThrowableException at com.sun.proxy.$Proxy12.apply(Unknown Source) at java.util.HashMap.computeIfAbsent(HashMap.java:1118) at org.cakeframework.internal.container.TestStub.getHandler(TestStub.java:26) at org.cakeframework.internal.container.FooTest.test0(FooTest.java:29) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.ExpectException.evaluate(ExpectException.java:19) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at org.cakeframework.internal.container.TestStub$__CLR3_2_0wqwqhpd53be5$1.invoke(TestStub.java:20) ... 28 more Caused by: java.lang.IllegalArgumentException at org.cakeframework.internal.container.TestStub.<init>(TestStub.java:22) at org.cakeframework.internal.container.TestStub.lambda$getHandler$6(TestStub.java:26) at org.cakeframework.internal.container.TestStub$$Lambda$13/1227074340.apply(Unknown Source) ... 33 more {noformat} If I replace with a standard anonymous class implementing java.util.function.Function it runs fine | 3 |
188 | CLOV-1399 | 12/19/2013 07:44:55 | Java 1.8 compilation fails when lambda is passed to a generic argument | The following piece of code fails to be instrumented {code:java} public class Fails<N> { public final <S extends N> Iterable<S> depthFirstTraversal(Class<S> type) { return (Iterable<S>) depthFirstTraversal(e -> type.isInstance(e)); } public final Iterable<N> depthFirstTraversal(Predicate<? super N> predicate) { return null; } } {code} Javac gives the following error message: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cake-util: Compilation failure: Compilation failure: [ERROR] /Users/kasperni/workspace/CAKE/cake-util/cake-util/target/clover/src-instrumented/org/cakeframework/internal/util/tree/Fails.java:[27,67] reference to depthFirstTraversal is ambiguous [ERROR] both method <S>depthFirstTraversal(java.lang.Class<S>) in org.cakeframework.internal.util.tree.Fails and method depthFirstTraversal(java.util.function.Predicate<? super N>) in org.cakeframework.internal.util.tree.Fails match [ERROR] /Users/kasperni/workspace/CAKE/cake-util/cake-util/target/clover/src-instrumented/org/cakeframework/internal/util/tree/Fails.java:[27,86] incompatible types: cannot infer type-variable(s) I,T [ERROR] (argument mismatch; java.lang.Class is not a functional interface) [ERROR] -> [Help 1] | 3 |
189 | CLOV-1401 | 01/02/2014 14:21:19 | Clover fails to instrument generic type with a constructor reference | This works fine: {code:java} myLambda = ArrayList::new; // javac error since JDK8 b114 myLambda = ArrayList::<String>new; {code} But the following: {code:java} myLambda = ArrayList<String>::new; myLambda = ArrayList<String>::<String>new; {code} fails with a parser error: {noformat} ERROR: Instrumentation errorInstrumentation error : c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList com.atlassian.clover.api.CloverException: c:\Work\clover-hg\clover-core\src\test\resources\javasyntax1.8\LambdaAndMethodReferences.java:78:28:unexpected token: ArrayList at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:158) at com.atlassian.clover.CloverInstr.execute(CloverInstr.java:73) at com.atlassian.clover.CloverInstr.mainImpl(CloverInstr.java:49) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentSourceFile(JavaSyntaxCompilationTestBase.java:145) at com.atlassian.clover.JavaSyntaxCompilationTestBase.instrumentAndCompileSourceFile(JavaSyntaxCompilationTestBase.java:111) at com.atlassian.clover.JavaSyntax18CompilationTest.testLambdaAndMethodReferences(JavaSyntax18CompilationTest.java:84) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:243) at junit.framework.TestSuite.run(TestSuite.java:238) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: line 78:28: unexpected token: ArrayList at com.atlassian.clover.instr.java.JavaRecognizer.conditionalExpression(JavaRecognizer.java:4407) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4274) at com.atlassian.clover.instr.java.JavaRecognizer.assignmentExpression(JavaRecognizer.java:4319) at com.atlassian.clover.instr.java.JavaRecognizer.expression(JavaRecognizer.java:3366) at com.atlassian.clover.instr.java.JavaRecognizer.statement(JavaRecognizer.java:2909) at com.atlassian.clover.instr.java.JavaRecognizer.outerCompoundStmt(JavaRecognizer.java:2696) at com.atlassian.clover.instr.java.JavaRecognizer.field(JavaRecognizer.java:2265) at com.atlassian.clover.instr.java.JavaRecognizer.classBlock(JavaRecognizer.java:1728) at com.atlassian.clover.instr.java.JavaRecognizer.classDefinition(JavaRecognizer.java:736) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition2(JavaRecognizer.java:666) at com.atlassian.clover.instr.java.JavaRecognizer.typeDefinition(JavaRecognizer.java:524) at com.atlassian.clover.instr.java.JavaRecognizer.compilationUnit(JavaRecognizer.java:445) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:212) at com.atlassian.clover.instr.java.Instrumenter.instrument(Instrumenter.java:121) ... 27 more {noformat} | 8 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.