aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-09 06:18:07 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-09 06:18:07 +0000
commitfc13d3340818bcaf203818727a100d3cdb865fd9 (patch)
treee68ce50b1fc964c12a1eb020ca8b2483ff2955d4
parent6fcf0fca26d8ed4c9cc06016219a9778bf3bec4f (diff)
parent18a980206d62b715d1bb9a0b411413b2d0d5ee6f (diff)
downloadjacoco-android13-frc-networking-release.tar.gz
Snap for 8558685 from 18a980206d62b715d1bb9a0b411413b2d0d5ee6f to tm-frc-networking-releaset_frc_net_330443000android13-frc-networking-release
Change-Id: Ic3277f35a16bed5aa5645907574072ea525fa2c5
-rw-r--r--.azure-pipelines/azure-pipelines.yml87
-rw-r--r--.azure-pipelines/maven-settings.xml (renamed from .travis/settings.xml)8
-rw-r--r--.gitattributes8
-rw-r--r--.github/ISSUE_TEMPLATE.md18
-rw-r--r--.github/ISSUE_TEMPLATE/1_question.md14
-rw-r--r--.github/ISSUE_TEMPLATE/2_bug_report.md32
-rw-r--r--.github/ISSUE_TEMPLATE/3_feature_request.md31
-rwxr-xr-x.travis.sh112
-rw-r--r--.travis.yml32
-rw-r--r--.travis/toolchains.xml17
-rw-r--r--.travis/travis-toolchains.xml45
-rw-r--r--.travis/trigger-site-deployment.py17
-rw-r--r--Android.bp12
-rw-r--r--LICENSE.md6
-rw-r--r--README.md2
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties2
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-check-passes/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-check-passes/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-customize-agent/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-dump/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java12
-rw-r--r--jacoco-maven-plugin.test/it/it-dump/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java18
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java18
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java18
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/module-info.java11
-rw-r--r--jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-java9/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-multi-module/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh12
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-prepend-property/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml13
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml13
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml13
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/Example2.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/Example2Test.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh13
-rw-r--r--jacoco-maven-plugin.test/it/it-report-select-formats/pom.xml52
-rw-r--r--jacoco-maven-plugin.test/it/it-report-select-formats/src/main/java/Example.java15
-rw-r--r--jacoco-maven-plugin.test/it/it-report-select-formats/src/test/java/ExampleTest.java22
-rw-r--r--jacoco-maven-plugin.test/it/it-report-select-formats/verify.bsh28
-rw-r--r--jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java23
-rw-r--r--jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/it-site/pom.xml11
-rw-r--r--jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java17
-rw-r--r--jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java19
-rw-r--r--jacoco-maven-plugin.test/it/it-site/verify.bsh11
-rw-r--r--jacoco-maven-plugin.test/it/settings.xml11
-rw-r--r--jacoco-maven-plugin.test/it/setup-parent/pom.xml13
-rw-r--r--jacoco-maven-plugin.test/pom.xml13
-rw-r--r--jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml11
-rw-r--r--jacoco-maven-plugin/pom.xml34
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java28
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java21
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java89
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java13
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java40
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java42
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java25
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java27
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java31
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java38
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java40
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/ReportFormat.java80
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java34
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java33
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java87
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java26
-rw-r--r--jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java21
-rw-r--r--jacoco/assembly.xml11
-rw-r--r--jacoco/pom.xml15
-rw-r--r--org.jacoco.agent.rt.test/about.html27
-rw-r--r--org.jacoco.agent.rt.test/pom.xml13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentTest.java35
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ClassFileDumperTest.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java35
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ExceptionRecorder.java15
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties2
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties2
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/ExecutorTestBase.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/FileOutputTest.java14
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocket.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocketTest.java11
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnection.java11
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnectionTest.java11
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpClientOutputTest.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpConnectionTest.java13
-rw-r--r--org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpServerOutputTest.java16
-rw-r--r--org.jacoco.agent.rt/about.html49
-rw-r--r--org.jacoco.agent.rt/pom.xml13
-rw-r--r--org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java27
-rw-r--r--org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java13
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java21
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java15
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java34
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ClassFileDumper.java21
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ConfigLoader.java13
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java26
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java15
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java13
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java56
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java18
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/FileOutput.java17
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java19
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java14
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpClientOutput.java21
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpConnection.java19
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpServerOutput.java19
-rw-r--r--org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java13
-rw-r--r--org.jacoco.agent.test/about.html27
-rw-r--r--org.jacoco.agent.test/pom.xml13
-rw-r--r--org.jacoco.agent.test/src/org/jacoco/agent/AgentJarTest.java13
-rw-r--r--org.jacoco.agent/about.html49
-rw-r--r--org.jacoco.agent/pom.xml13
-rw-r--r--org.jacoco.agent/src/org/jacoco/agent/AgentJar.java27
-rw-r--r--org.jacoco.agent/src/org/jacoco/agent/package-info.java13
-rw-r--r--org.jacoco.ant.test/pom.xml21
-rw-r--r--org.jacoco.ant.test/src/TestTargetInDefault.java13
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml23
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/AntFilesLocatorTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/AntResourcesLocatorTest.java20
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml45
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java13
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java13
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml25
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml41
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml56
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml31
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/RemoveDebugInfos.java13
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskLocaleTest.java13
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java17
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml116
-rw-r--r--org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java13
-rw-r--r--org.jacoco.ant/about.html50
-rw-r--r--org.jacoco.ant/pom.xml13
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java49
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/AgentTask.java15
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java21
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java17
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java29
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/DumpTask.java27
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java24
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/MergeTask.java17
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/ReportTask.java83
-rw-r--r--org.jacoco.ant/src/org/jacoco/ant/antlib.xml15
-rw-r--r--org.jacoco.build/licenses/args4j-2.0.28.html28
-rw-r--r--org.jacoco.build/licenses/asm-9.1.html36
-rw-r--r--org.jacoco.build/licenses/googlecodeprettify-20100721.html (renamed from org.jacoco.ant.test/about.html)45
-rw-r--r--org.jacoco.build/pom.xml203
-rw-r--r--org.jacoco.cli.test/about.html27
-rw-r--r--org.jacoco.cli.test/pom.xml13
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/CommandTestBase.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/MainTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/XmlDocumentationTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ClassInfoTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/DumpTest.java15
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ExecInfoTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java15
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/MergeTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/VersionTest.java11
-rw-r--r--org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/test-resource.properties1
-rw-r--r--org.jacoco.cli/about.html20
-rw-r--r--org.jacoco.cli/pom.xml13
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/Command.java15
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/CommandHandler.java13
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/CommandParser.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/Main.java13
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/XmlDocumentation.java13
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/AllCommands.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/ClassInfo.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/Dump.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/ExecInfo.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/Instrument.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/Merge.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/Report.java11
-rw-r--r--org.jacoco.cli/src/org/jacoco/cli/internal/commands/Version.java11
-rw-r--r--org.jacoco.core.test.validation.groovy/.classpath20
-rw-r--r--org.jacoco.core.test.validation.groovy/.project30
-rw-r--r--org.jacoco.core.test.validation.groovy/pom.xml17
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoCloneClassTest.java31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoExternalizeClassTest.java32
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBindableClassTest.java32
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBuilderClassTest.java31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyCanonicalClassTest.java31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDataClassTest.java30
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDelegateClassTest.java31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyImmutableClassTest.java31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyIndexPropertyClassTest.java33
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovySortableClassTest.java33
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyVetoableClassTest.java32
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoCloneClassTarget.groovy22
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoExternalizeClassTarget.groovy28
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBindableClassTarget.groovy29
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBuilderClassTarget.groovy26
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyCanonicalClassTarget.groovy25
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDataClassTarget.groovy30
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDelegateClassTarget.groovy37
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyImmutableClassTarget.groovy26
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyIndexPropertyClassTarget.groovy31
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovySortableClassTarget.groovy28
-rw-r--r--org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyVetoableClassTarget.groovy27
-rw-r--r--org.jacoco.core.test.validation.java14/.classpath20
-rw-r--r--org.jacoco.core.test.validation.java14/.project30
-rw-r--r--org.jacoco.core.test.validation.java14/pom.xml59
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/InstanceofTest.java37
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/RecordsTest.java27
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java27
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/InstanceofTarget.java33
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/RecordsTarget.java52
-rw-r--r--org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java110
-rw-r--r--org.jacoco.core.test.validation.java5/pom.xml13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationGeneratedTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationInitializerTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BadCycleClassTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BooleanExpressionsTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ClassInitializerTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ConstructorsTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructureBeforeSuperConstructorTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructuresTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/CyclomaticComplexityTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumConstructorTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumImplicitMethodsTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumSwitchTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExceptionsTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExplicitInitialFrameTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FieldInitializationInTwoConstructorsTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FinallyTest.java14
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FramesTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ImplicitFieldInitializationTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/InterfaceClassInitializerTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/StructuredLockingTest.java15
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SynchronizedTest.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SyntheticTest.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationGeneratedTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationInitializerTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BadCycleClassTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BooleanExpressionsTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ClassInitializerTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ConstructorsTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructureBeforeSuperConstructorTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructuresTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumConstructorTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumImplicitMethodsTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumSwitchTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExceptionsTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExplicitInitialFrameTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FieldInitializationInTwoConstructorsTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FinallyTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ImplicitFieldInitializationTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/InterfaceClassInitializerTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/StructuredLockingTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SynchronizedTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SyntheticTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java7/pom.xml13
-rw-r--r--org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/StringSwitchTest.java11
-rw-r--r--org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/TryWithResourcesTest.java11
-rw-r--r--org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/StringSwitchTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/TryWithResourcesTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java8/pom.xml13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/AnnotationOnLocalVariableTest.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BadCycleInterfaceTest.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BootstrapMethodReferenceTest.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceDefaultMethodsTest.java13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceOnlyDefaultMethodsTest.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaExpressionsTest.java13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaInInterfaceTest.java13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/AnnotationOnLocalVariableTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceDefaultMethodsTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceOnlyDefaultMethodsTarget.java11
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaExpressionsTarget.java13
-rw-r--r--org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaInInterfaceTarget.java13
-rw-r--r--org.jacoco.core.test.validation.kotlin/pom.xml16
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinControlStructuresTest.java27
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCoroutineTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDataClassTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultArgumentsTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultMethodsTest.java33
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDelegatesTest.java27
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinElvisOperatorTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinInlineTest.java16
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLambdaExpressionsTest.java27
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLateinitTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinNotNullOperatorTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCallOperatorTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCastTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinTopLevelFunctionTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinUnsafeCastOperatorTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinWhenExpressionTest.java11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinControlStructuresTarget.kt165
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCoroutineTarget.kt17
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDataClassTarget.kt15
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultArgumentsTarget.kt31
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultMethodsTarget.kt36
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDelegatesTarget.kt27
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinElvisOperatorTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLambdaExpressionsTarget.kt37
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLateinitTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinNotNullOperatorTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCallOperatorTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCastTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinTopLevelFunctionTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinUnsafeCastOperatorTarget.kt11
-rw-r--r--org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinWhenExpressionTarget.kt51
-rw-r--r--org.jacoco.core.test.validation.scala/.classpath20
-rw-r--r--org.jacoco.core.test.validation.scala/.project30
-rw-r--r--org.jacoco.core.test.validation.scala/pom.xml62
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaAnonymousFunctionTest.java27
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java27
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSynchronizedTest.java27
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaAnonymousFunctionTarget.scala34
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala23
-rw-r--r--org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSynchronizedTarget.scala33
-rw-r--r--org.jacoco.core.test.validation/pom.xml177
-rw-r--r--org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs15
-rw-r--r--org.jacoco.core.test/about.html27
-rw-r--r--org.jacoco.core.test/pom.xml13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java99
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/CounterComparatorTest.java19
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageBuilderTest.java51
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageNodeImplTest.java31
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/analysis/NodeComparatorTest.java19
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java40
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataStoreTest.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataTest.java33
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/IncompatibleExecDataVersionExceptionTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoStoreTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoTest.java28
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java36
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java124
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/MethodRecorder.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/instr/ResizeInstructionsTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/ContentTypeDetectorTest.java60
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/Pack200StreamsTest.java153
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/BundleCoverageImplTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassAnalyzerTest.java23
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassCoverageImplTest.java16
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/CounterImplTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/LineImplTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java25
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageImplTest.java38
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/PackageCoverageTest.java25
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceNodeImplTest.java56
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/StringPoolTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AbstractMatcherTest.java15
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/BridgeFilterTest.java49
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilterTest.java14
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterContextMock.java102
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterTestBase.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FinallyFilterTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilterTest.java97
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilterTest.java134
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilterTest.java86
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilterTest.java52
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilterTest.java48
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilterTest.java101
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilterTest.java104
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java175
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilterTest.java (renamed from org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilterTest.java)148
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilterTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilterTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java101
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilterTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11FilterTest.java29
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilterTest.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/data/CRC64Test.java29
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/data/CompactDataInputOutputTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/ClassProbesAdapterTest.java25
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/FrameSnapshotTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelFlowAnalyzerTest.java20
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelInfoTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodProbesAdapterTest.java57
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodSanitizerTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java36
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java29
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java62
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java71
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java19
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/AgentOptionsTest.java42
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/CommandLineSupportTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java22
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGeneratorTest.java33
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/RemoteControlReaderWriterTest.java21
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeDataTest.java23
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeTestBase.java59
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/TestStorage.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java34
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/runtime/WildcardMatcherTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoader.java18
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoaderTest.java35
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/TargetLoader.java16
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/AnalysisTimeScenario.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/ExecuteInstrumentedCodeScenario.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java15
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationSizeSzenario.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationTimeScenario.java16
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/PerfOutputWriter.java19
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/PerformanceSuite.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/TimedScenario.java15
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target01.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target03.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/Compiler.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersion.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersionTest.java11
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/Source.java17
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/SourceTest.java13
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutor.java131
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutorTest.java216
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParser.java265
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParserTest.java292
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java38
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java29
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/tools/ExecDumpClientTest.java28
-rw-r--r--org.jacoco.core.test/src/org/jacoco/core/tools/ExecFileLoaderTest.java17
-rw-r--r--org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs15
-rw-r--r--org.jacoco.core/about.html10
-rw-r--r--org.jacoco.core/pom.xml13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/JaCoCo.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java31
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java29
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java36
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ILine.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java24
-rw-r--r--org.jacoco.core/src/org/jacoco/core/analysis/package-info.java18
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java63
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java35
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/ExecutionDataStore.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java29
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/IncompatibleExecDataVersionException.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/SessionInfoStore.java23
-rw-r--r--org.jacoco.core/src/org/jacoco/core/data/package-info.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java65
-rw-r--r--org.jacoco.core/src/org/jacoco/core/instr/package-info.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java47
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/InputStreams.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/Pack200Streams.java194
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/BundleCoverageImpl.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassAnalyzer.java27
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassCoverageImpl.java28
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/CounterImpl.java26
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/Instruction.java51
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/InstructionsBuilder.java23
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/LineImpl.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodAnalyzer.java20
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java24
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageImpl.java22
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/PackageCoverageImpl.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceFileCoverageImpl.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceNodeImpl.java29
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/StringPool.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/BridgeFilter.java32
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java22
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/FinallyFilter.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterContext.java102
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterOutput.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilter.java53
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java95
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilter.java46
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilter.java14
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilter.java20
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilter.java24
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilter.java14
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilter.java37
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilter.java44
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java89
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilter.java (renamed from org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilter.java)26
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilter.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java32
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilter.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11Filter.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilter.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/data/CRC64.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesAdapter.java22
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesVisitor.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/FrameSnapshot.java18
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java47
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesAdapter.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesVisitor.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/flow/MethodSanitizer.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ClassFieldProbeArrayStrategy.java20
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ClassInstrumenter.java18
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategy.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/DuplicateFrameEliminator.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeArrayStrategy.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java25
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/InterfaceFieldProbeArrayStrategy.java14
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/LocalProbeArrayStrategy.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/MethodInstrumenter.java18
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java16
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java33
-rw-r--r--org.jacoco.core/src/org/jacoco/core/internal/instr/SignatureRemover.java22
-rw-r--r--org.jacoco.core/src/org/jacoco/core/jacoco.properties3
-rw-r--r--org.jacoco.core/src/org/jacoco/core/package-info.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/AbstractRuntime.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java95
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/CommandLineSupport.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/IExecutionDataAccessorGenerator.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java15
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java11
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/LoggerRuntime.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java47
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGenerator.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlWriter.java21
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java45
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/SystemPropertiesRuntime.java19
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/URLStreamHandlerRuntime.java149
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/WildcardMatcher.java17
-rw-r--r--org.jacoco.core/src/org/jacoco/core/runtime/package-info.java13
-rw-r--r--org.jacoco.core/src/org/jacoco/core/tools/ExecDumpClient.java29
-rw-r--r--org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java28
-rw-r--r--org.jacoco.core/src/org/jacoco/core/tools/package-info.java13
-rw-r--r--org.jacoco.doc/about.html27
-rw-r--r--org.jacoco.doc/docroot/doc/agent.html32
-rw-r--r--org.jacoco.doc/docroot/doc/ant.html83
-rw-r--r--org.jacoco.doc/docroot/doc/api.html14
-rw-r--r--org.jacoco.doc/docroot/doc/build.html176
-rw-r--r--org.jacoco.doc/docroot/doc/changes.html173
-rw-r--r--org.jacoco.doc/docroot/doc/classids.html6
-rw-r--r--org.jacoco.doc/docroot/doc/conventions.html20
-rw-r--r--org.jacoco.doc/docroot/doc/counters.html16
-rw-r--r--org.jacoco.doc/docroot/doc/empty.html6
-rw-r--r--org.jacoco.doc/docroot/doc/environment.html12
-rw-r--r--org.jacoco.doc/docroot/doc/epl-2.0.html295
-rw-r--r--org.jacoco.doc/docroot/doc/epl-v10.html262
-rw-r--r--org.jacoco.doc/docroot/doc/faq.html37
-rw-r--r--org.jacoco.doc/docroot/doc/flow.html30
-rw-r--r--org.jacoco.doc/docroot/doc/implementation.html42
-rw-r--r--org.jacoco.doc/docroot/doc/index.html6
-rw-r--r--org.jacoco.doc/docroot/doc/integrations.html36
-rw-r--r--org.jacoco.doc/docroot/doc/license.html253
-rw-r--r--org.jacoco.doc/docroot/doc/maven.html10
-rw-r--r--org.jacoco.doc/docroot/doc/mission.html10
-rw-r--r--org.jacoco.doc/docroot/doc/offline.html12
-rw-r--r--org.jacoco.doc/docroot/doc/repo.html8
-rw-r--r--org.jacoco.doc/docroot/doc/resources/doc.css6
-rw-r--r--org.jacoco.doc/docroot/doc/support.html6
-rw-r--r--org.jacoco.doc/docroot/doc/team.html10
-rw-r--r--org.jacoco.doc/docroot/index.html22
-rw-r--r--org.jacoco.doc/javadoc/overview.html78
-rw-r--r--org.jacoco.doc/javadoc/stylesheet.css144
-rw-r--r--org.jacoco.doc/pom.xml15
-rw-r--r--org.jacoco.doc/xsl/cli.xsl34
-rw-r--r--org.jacoco.doc/xsl/junit-noframes.xsl761
-rw-r--r--org.jacoco.doc/xsl/maven-goal.xsl16
-rw-r--r--org.jacoco.examples.test/about.html27
-rw-r--r--org.jacoco.examples.test/pom.xml13
-rw-r--r--org.jacoco.examples.test/src/org/jacoco/examples/ClassInfoTest.java21
-rw-r--r--org.jacoco.examples.test/src/org/jacoco/examples/ConsoleOutput.java17
-rw-r--r--org.jacoco.examples.test/src/org/jacoco/examples/CoreTutorialTest.java21
-rw-r--r--org.jacoco.examples.test/src/org/jacoco/examples/ExecDumpTest.java21
-rw-r--r--org.jacoco.examples.test/src/org/jacoco/examples/MBeanClientTest.java13
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify-it.bsh19
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify-it.groovy15
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify-offline.bsh24
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify-offline.groovy16
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify.bsh19
-rw-r--r--org.jacoco.examples.test/src/test/resources/verify.groovy15
-rw-r--r--org.jacoco.examples/about.html27
-rw-r--r--org.jacoco.examples/assembly.xml11
-rw-r--r--org.jacoco.examples/build/build-offline.xml21
-rw-r--r--org.jacoco.examples/build/build.xml17
-rw-r--r--org.jacoco.examples/build/pom-it.xml11
-rw-r--r--org.jacoco.examples/build/pom-offline.xml11
-rw-r--r--org.jacoco.examples/build/pom.xml13
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/ExpressionParser.java11
-rw-r--r--org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java11
-rw-r--r--org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java11
-rwxr-xr-xorg.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java11
-rw-r--r--org.jacoco.examples/pom.xml13
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java27
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java21
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/ExecDump.java23
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java15
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/ExecutionDataServer.java19
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java18
-rw-r--r--org.jacoco.examples/src/org/jacoco/examples/ReportGenerator.java29
-rw-r--r--org.jacoco.report.test/about.html87
-rw-r--r--org.jacoco.report.test/pom.xml13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/DirectorySourceFileLocatorTest.java32
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/FileMultiReportOutputTest.java17
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/InputStreamSourceFileLocatorTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/JavaNamesTest.java25
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/MemoryMultiReportOutput.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/MultiReportVisitorTest.java17
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/MultiSourceFileLocatorTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/ReportStructureTestDriver.java15
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/ZipMultiReportOutputTest.java27
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/check/BundleCheckerTest.java28
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/check/LimitTest.java133
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/check/RuleTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/check/RulesCheckerTest.java25
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/csv/CSVFormatterTest.java21
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/csv/CSVGroupHandlerTest.java14
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/csv/ClassRowWriterTest.java17
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/csv/DelimitedWriterTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/html/HTMLFormatterTest.java17
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/NormalizedFileNamesTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/ReportOutputFolderTest.java16
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLElementTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/LinkableStub.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/BundlePageTest.java21
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ClassPageTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/MethodItemTest.java19
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackagePageTest.java21
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackageSourcePageTest.java27
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PageTestBase.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ReportPageTest.java16
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SessionsPageTest.java29
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceFilePageTest.java22
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceHighlighterTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/ResourcesTest.java19
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/StylesTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/BarColumnTest.java20
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/CounterColumnTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/LabelColumnTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/SortIndexTest.java11
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/table/TableTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/html/xhtml1-strict.dtd9
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/xml/LocalEntityResolver.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLElementTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLGroupVisitorTest.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLSupport.java13
-rw-r--r--org.jacoco.report.test/src/org/jacoco/report/xml/XMLFormatterTest.java16
-rw-r--r--org.jacoco.report/about.html195
-rw-r--r--org.jacoco.report/pom.xml13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/DirectorySourceFileLocator.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/ILanguageNames.java23
-rw-r--r--org.jacoco.report/src/org/jacoco/report/IMultiReportOutput.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/IReportGroupVisitor.java30
-rw-r--r--org.jacoco.report/src/org/jacoco/report/IReportVisitor.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/ISourceFileLocator.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/InputStreamSourceFileLocator.java23
-rw-r--r--org.jacoco.report/src/org/jacoco/report/JavaNames.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/MultiReportVisitor.java22
-rw-r--r--org.jacoco.report/src/org/jacoco/report/MultiSourceFileLocator.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/ZipMultiReportOutput.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/BundleChecker.java24
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java20
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/Limit.java71
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/Rule.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/RulesChecker.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/check/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/csv/CSVFormatter.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/csv/CSVGroupHandler.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/csv/ClassRowWriter.java23
-rw-r--r--org.jacoco.report/src/org/jacoco/report/csv/DelimitedWriter.java35
-rw-r--r--org.jacoco.report/src/org/jacoco/report/csv/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/html/HTMLFormatter.java35
-rw-r--r--org.jacoco.report/src/org/jacoco/report/html/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java23
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/NormalizedFileNames.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/ReportOutputFolder.java27
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/HTMLElement.java65
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/IHTMLReportContext.java29
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/ILinkable.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/index/ElementIndex.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/MethodItem.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/PackageSourcePage.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java29
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFileItem.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceHighlighter.java23
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/Resources.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/Styles.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.js6
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.css4
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.js37
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java24
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java38
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/IColumnRenderer.java21
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/LabelColumn.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/PercentageColumn.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/SortIndex.java19
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/Table.java27
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java11
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/xml/ReportElement.java37
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/xml/XMLElement.java29
-rw-r--r--org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java15
-rw-r--r--org.jacoco.report/src/org/jacoco/report/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/xml/XMLFormatter.java17
-rw-r--r--org.jacoco.report/src/org/jacoco/report/xml/package-info.java13
-rw-r--r--org.jacoco.report/src/org/jacoco/report/xml/report.dtd17
-rw-r--r--org.jacoco.tests/pom.xml13
-rw-r--r--pom.xml2
856 files changed, 13296 insertions, 9201 deletions
diff --git a/.azure-pipelines/azure-pipelines.yml b/.azure-pipelines/azure-pipelines.yml
new file mode 100644
index 00000000..ef98550b
--- /dev/null
+++ b/.azure-pipelines/azure-pipelines.yml
@@ -0,0 +1,87 @@
+jobs:
+- job:
+ strategy:
+ matrix:
+ JDK 5:
+ JDK_VERSION: 5
+ JDK 6:
+ JDK_VERSION: 6
+ JDK 7:
+ JDK_VERSION: 7
+ JDK 8:
+ JDK_VERSION: 8
+ JDK 8 with ECJ:
+ JDK_VERSION: 8
+ ECJ: true
+ JDK 9:
+ JDK_VERSION: 9
+ JDK 10:
+ JDK_VERSION: 10
+ JDK 11:
+ JDK_VERSION: 11
+ JDK 12:
+ JDK_VERSION: 12
+ JDK 13:
+ JDK_VERSION: 13
+ JDK 14:
+ JDK_VERSION: 14
+ JDK 15:
+ JDK_VERSION: 15
+ JDK 16:
+ JDK_VERSION: 16
+ JDK 17:
+ JDK_VERSION: 17
+ pool:
+ vmImage: 'ubuntu-18.04'
+ steps:
+ - bash: |
+ set -e
+ url_var=JDK${JDK_VERSION}_URL
+ JDK_URL=${!url_var}
+ mkdir .jdk
+ curl -L $JDK_URL -o .jdk/jdk.tar.gz
+ tar -xzf .jdk/jdk.tar.gz -C .jdk --strip-components 1
+ .jdk/bin/java -version
+ echo "
+ <toolchains>
+ <toolchain>
+ <type>jdk</type>
+ <provides>
+ <id>$JDK_VERSION</id>
+ <version>$JDK_VERSION</version>
+ </provides>
+ <configuration>
+ <jdkHome>$PWD/.jdk</jdkHome>
+ </configuration>
+ </toolchain>
+ </toolchains>
+ " > toolchains.xml
+ displayName: Setup JDK
+ - bash: |
+ if [[ "$JDK_VERSION" -ge "8" ]]; then
+ export JAVA_HOME=$PWD/.jdk
+ fi
+ if [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "5" ]]; then
+ mvn -V -B -e -f org.jacoco.build \
+ verify -Djdk.version=$JDK_VERSION \
+ deploy:deploy -DdeployAtEnd \
+ --toolchains=toolchains.xml --settings=.azure-pipelines/maven-settings.xml
+ elif [[ "$JDK_VERSION" == "5" ]]; then
+ mvn -V -B -e \
+ verify -Djdk.version=$JDK_VERSION \
+ --toolchains=toolchains.xml
+ elif [[ "$BUILD_SOURCEBRANCH" == "refs/heads/master" && "$JDK_VERSION" == "11" ]]; then
+ mvn -V -B -e -f org.jacoco.build \
+ verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION \
+ sonar:sonar \
+ --toolchains=toolchains.xml --settings=.azure-pipelines/maven-settings.xml
+ else
+ mvn -V -B -e \
+ verify -Djdk.version=$JDK_VERSION -Dbytecode.version=$JDK_VERSION -Decj=${ECJ:-} \
+ --toolchains=toolchains.xml
+ fi
+ displayName: Build
+ env:
+ SONARQUBE_TOKEN: $(SONARQUBE_TOKEN)
+ SONATYPE_USERNAME: $(SONATYPE_USERNAME)
+ SONATYPE_PASSWORD: $(SONATYPE_PASSWORD)
diff --git a/.travis/settings.xml b/.azure-pipelines/maven-settings.xml
index 0c27d509..dbce3849 100644
--- a/.travis/settings.xml
+++ b/.azure-pipelines/maven-settings.xml
@@ -9,13 +9,15 @@
</servers>
<profiles>
<profile>
- <id>default</id>
+ <id>SonarCloud</id>
<properties>
- <https.protocols>TLSv1</https.protocols>
+ <sonar.host.url>https://sonarcloud.io/</sonar.host.url>
+ <sonar.organization>default</sonar.organization>
+ <sonar.login>${env.SONARQUBE_TOKEN}</sonar.login>
</properties>
</profile>
</profiles>
<activeProfiles>
- <activeProfile>default</activeProfile>
+ <activeProfile>SonarCloud</activeProfile>
</activeProfiles>
</settings>
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 00000000..c6758fd7
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,8 @@
+*.java text eol=lf
+*.properties text eol=lf
+*.html text eol=lf
+*.css text eol=lf
+*.js text eol=lf
+*.xml text eol=lf
+*.xsl text eol=lf
+*.dtd text eol=lf
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
index 801fe462..ba986637 100644
--- a/.github/ISSUE_TEMPLATE.md
+++ b/.github/ISSUE_TEMPLATE.md
@@ -1,17 +1,3 @@
-This is a issue tracker. Please use our mailing list for general questions:
-https://groups.google.com/forum/?fromgroups=#!forum/jacoco
+PLEASE USE ONE OF THE FOLLOWING TEMPLATES
-Also check FAQ before opening an issue: http://www.jacoco.org/jacoco/trunk/doc/faq.html
-
-
-### Steps to reproduce
-
-JaCoCo version:
-Operating system:
-Tool integration: Maven/Ant/API/Other
-
-
-### Expected behaviour
-
-
-### Actual behaviour
+https://github.com/jacoco/jacoco/issues/new/choose
diff --git a/.github/ISSUE_TEMPLATE/1_question.md b/.github/ISSUE_TEMPLATE/1_question.md
new file mode 100644
index 00000000..a40985c9
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/1_question.md
@@ -0,0 +1,14 @@
+---
+name: 'Question'
+about: 'Questions and requests for support'
+title: 'PLEASE DO NOT USE GITHUB FOR QUESTIONS - CHECK FAQ OR USE FORUM'
+labels: 'declined: question :x:'
+assignes:
+
+---
+
+https://www.jacoco.org/jacoco/trunk/doc/faq.html
+
+https://groups.google.com/forum/?fromgroups=#!forum/jacoco
+
+Thank you!
diff --git a/.github/ISSUE_TEMPLATE/2_bug_report.md b/.github/ISSUE_TEMPLATE/2_bug_report.md
new file mode 100644
index 00000000..dc118fa0
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/2_bug_report.md
@@ -0,0 +1,32 @@
+---
+name: 'Bug report'
+about: 'Report a bug in JaCoCo'
+title:
+labels: 'type: bug :bug:'
+assignes:
+
+---
+
+THIS IS A BUG TRACKER ONLY. FOR QUESTIONS PLEASE CHECK FAQ OR USE FORUM:
+
+http://www.jacoco.org/jacoco/trunk/doc/faq.html
+
+https://groups.google.com/forum/?fromgroups=#!forum/jacoco
+
+Please understand that
+ISSUES WITHOUT FOLLOWING INFORMATION WILL BE CLOSED WITHOUT COMMENTS!
+Thank you for filling bug report!
+
+### Steps to reproduce
+
+* JaCoCo version: (from right bottom corner of JaCoCo report)
+* Operating system:
+* Tool integration: Maven / Ant / CLI / API (for others please report to respective project)
+* Complete executable reproducer: (e.g. GitHub Repo)
+* Steps: (what exactly are you doing with the above reproducer?)
+
+### Expected behaviour
+
+### Actual behaviour
+
+(In case of exceptions provide FULL STACKTRACE)
diff --git a/.github/ISSUE_TEMPLATE/3_feature_request.md b/.github/ISSUE_TEMPLATE/3_feature_request.md
new file mode 100644
index 00000000..05f14f46
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/3_feature_request.md
@@ -0,0 +1,31 @@
+---
+name: 'Feature request'
+about: 'Suggest a feature for JaCoCo'
+title:
+labels: 'type: enhancement'
+assignes:
+
+---
+
+THIS IS A BUG TRACKER ONLY. FOR QUESTIONS PLEASE CHECK FAQ OR USE FORUM:
+
+http://www.jacoco.org/jacoco/trunk/doc/faq.html
+
+https://groups.google.com/forum/?fromgroups=#!forum/jacoco
+
+Please understand that
+ISSUES WITHOUT FOLLOWING INFORMATION WILL BE CLOSED WITHOUT COMMENTS!
+Thank you for filling feature request!
+
+### Scenario
+
+* JaCoCo version: (from right bottom corner of JaCoCo report)
+* Operating system:
+* Tool integration: Maven / Ant / CLI / API (for others please report to respective project)
+* Description of your use case: (detailed description or executable reproducer, e.g. GitHub repo)
+
+### Current Behaviour
+
+### Wanted Behaviour
+
+### Possible Workarounds
diff --git a/.travis.sh b/.travis.sh
deleted file mode 100755
index 58892364..00000000
--- a/.travis.sh
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-# Prevent accidental execution outside of Travis:
-if [ -z "${TRAVIS+false}" ]
-then
- echo "TRAVIS environment variable is not set"
- exit 1
-fi
-
-function jdk_switcher {
- DIR=$1
- if [ ! -d "$DIR" ]; then
- echo "Not found: $DIR"
- exit 1
- fi
- export JAVA_HOME="$DIR"
- export JDK_HOME="${JAVA_HOME}"
- export JAVAC="${JAVA_HOME}/bin/javac"
- export PATH="${JAVA_HOME}/bin:${PATH}"
-}
-
-# Switch to desired JDK, download if required:
-function install_jdk {
- JDK_URL=$1
-
- FILENAME="${JDK_URL##*/}"
-
- rm -rf /tmp/jdk/$JDK
- mkdir -p /tmp/jdk/$JDK
-
- if [ ! -f "/tmp/jdk/$FILENAME" ]
- then
- curl -L $JDK_URL -o /tmp/jdk/$FILENAME
- fi
-
- tar -xzf /tmp/jdk/$FILENAME -C /tmp/jdk/$JDK --strip-components 1
-
- if [ -z "${2+false}" ]
- then
- jdk_switcher "/tmp/jdk/$JDK"
- fi
-}
-
-# Preinstalled JDKs:
-ls -lA /usr/lib/jvm/
-
-
-case "$JDK" in
-5)
- install_jdk $JDK5_URL false
- ;;
-6 | 7 | 8)
- jdk_switcher /usr/lib/jvm/java-8-oracle
- ;;
-9)
- jdk_switcher /usr/lib/jvm/java-9-oracle
- ;;
-10)
- install_jdk $JDK10_URL
- ;;
-11)
- install_jdk $JDK11_URL
- ;;
-12)
- install_jdk $JDK12_URL
- ;;
-13-ea)
- install_jdk $JDK13_EA_URL
- ;;
-esac
-
-# Do not use "~/.mavenrc" set by Travis (https://github.com/travis-ci/travis-ci/issues/3893),
-# because it prevents execution of JaCoCo during integration tests for jacoco-maven-plugin,
-# and "-XMaxPermSize" not supported by JDK 9
-export MAVEN_SKIP_RC=true
-
-# Build:
-case "$JDK" in
-5)
- if [[ ${TRAVIS_PULL_REQUEST} == 'false' && ${TRAVIS_BRANCH} == 'master' ]]
- then
- # Travis does shallow clone, but SonarQube performs "git blame" and so requires full history
- git fetch --unshallow
-
- # goal "deploy:deploy" used directly instead of "deploy" phase to avoid pollution of Maven repository by "install" phase
- mvn -V -B -e -f org.jacoco.build verify sonar:sonar deploy:deploy -DdeployAtEnd -Djdk.version=5 --toolchains=./.travis/toolchains.xml --settings=./.travis/settings.xml -Dsonar.host.url=${SONARQUBE_URL} -Dsonar.login=${SONARQUBE_TOKEN}
- python ./.travis/trigger-site-deployment.py
- else
- mvn -V -B -e verify -Djdk.version=5 --toolchains=./.travis/toolchains.xml \
- --settings=./.travis/settings.xml
- fi
- ;;
-6 | 7 | 8 | 9)
- mvn -V -B -e verify -Djdk.version=${JDK} -Dbytecode.version=${JDK} -Decj=${ECJ:-} --toolchains=./.travis/travis-toolchains.xml \
- --settings=./.travis/settings.xml
- ;;
-10 | 11 | 12)
- mvn -V -B -e verify -Dbytecode.version=${JDK} \
- --settings=./.travis/settings.xml
- ;;
-13-ea)
- mvn -V -B -e verify -Dbytecode.version=13 \
- --projects \!org.jacoco.core.test.validation.groovy \
- --settings=./.travis/settings.xml
- ;;
-*)
- echo "Incorrect JDK [$JDK]"
- exit 1;
- ;;
-esac
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 239d3b2a..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-language: java
-
-# Skip "install" stage:
-install: true
-
-# Use container-based infrastructure:
-sudo: false
-
-addons:
- apt:
- packages:
- - openjdk-6-jdk
-
-# Keep Maven local repository between builds:
-cache:
- directories:
- - '$HOME/.m2/repository'
-
-env:
- - JDK=5
- - JDK=6
- - JDK=7
- - JDK=8
- - JDK=8
- ECJ=true
- - JDK=9
- - JDK=10
- - JDK=11
- - JDK=12
- - JDK=13-ea
-
-script: ./.travis.sh
diff --git a/.travis/toolchains.xml b/.travis/toolchains.xml
deleted file mode 100644
index dcf1b8c7..00000000
--- a/.travis/toolchains.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
-
- <toolchain>
- <type>jdk</type>
- <provides>
- <id>java15</id>
- <version>5</version>
- <vendor>sun</vendor>
- </provides>
- <configuration>
- <jdkHome>/tmp/jdk/5</jdkHome>
- </configuration>
- </toolchain>
-
-</toolchains>
diff --git a/.travis/travis-toolchains.xml b/.travis/travis-toolchains.xml
deleted file mode 100644
index 8079e745..00000000
--- a/.travis/travis-toolchains.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF8"?>
-<toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
-
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>6</version>
- </provides>
- <configuration>
- <jdkHome>/usr/lib/jvm/java-6-openjdk-amd64</jdkHome>
- </configuration>
- </toolchain>
-
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>7</version>
- </provides>
- <configuration>
- <jdkHome>/usr/lib/jvm/java-7-openjdk-amd64</jdkHome>
- </configuration>
- </toolchain>
-
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>8</version>
- </provides>
- <configuration>
- <jdkHome>/usr/lib/jvm/java-8-oracle</jdkHome>
- </configuration>
- </toolchain>
-
- <toolchain>
- <type>jdk</type>
- <provides>
- <version>9</version>
- </provides>
- <configuration>
- <jdkHome>/usr/lib/jvm/java-9-oracle</jdkHome>
- </configuration>
- </toolchain>
-
-</toolchains>
diff --git a/.travis/trigger-site-deployment.py b/.travis/trigger-site-deployment.py
deleted file mode 100644
index 6add3015..00000000
--- a/.travis/trigger-site-deployment.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import os
-import urllib2
-import json
-
-def request(url, data, token = None):
- req = urllib2.Request(url, data)
- req.add_header('User-Agent', 'MyClient/1.0.0')
- req.add_header('Accept', 'application/vnd.travis-ci.2+json')
- req.add_header('Content-Type', 'application/json; charset=UTF-8')
- if token:
- req.add_header('Travis-API-Version', '3')
- req.add_header('Authorization', 'token ' + travis_token)
- p = urllib2.urlopen(req)
- return json.loads(p.read())
-
-travis_token = request('https://api.travis-ci.org/auth/github', '{"github_token":"' + os.environ['GH_TOKEN'] + '"}')['access_token']
-print(request('https://api.travis-ci.org/repo/jacoco%2Fwww.eclemma.org/requests', '{ "request": { "branch": "master", "message": "New JaCoCo snapshot" } }', travis_token))
diff --git a/Android.bp b/Android.bp
index 726af1d3..aad52a34 100644
--- a/Android.bp
+++ b/Android.bp
@@ -95,9 +95,9 @@ java_library {
// TODO(b/69671801): there's no bytecode on the device, so these shouldn't
// be necessary.
static_libs: [
- "asm-7.0",
- "asm-commons-7.0",
- "asm-tree-7.0",
+ "asm-9.2",
+ "asm-commons-9.2",
+ "asm-tree-9.2",
],
}
@@ -138,9 +138,9 @@ java_library_host {
],
static_libs: [
- "asm-7.0",
- "asm-commons-7.0",
- "asm-tree-7.0",
+ "asm-9.2",
+ "asm-commons-9.2",
+ "asm-tree-9.2",
"args4j-2.0.28",
],
diff --git a/LICENSE.md b/LICENSE.md
index 2bb435eb..0b1aef1b 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,13 +1,13 @@
License
=======
-Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
+Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
The JaCoCo Java Code Coverage Library and all included documentation is made
available by Mountainminds GmbH & Co. KG, Munich. Except indicated below, the
Content is provided to you under the terms and conditions of the Eclipse Public
-License Version 1.0 ("EPL"). A copy of the EPL is available at
-[http://www.eclipse.org/legal/epl-v10.html](http://www.eclipse.org/legal/epl-v10.html).
+License Version 2.0 ("EPL"). A copy of the EPL is available at
+[https://www.eclipse.org/legal/epl-2.0/](https://www.eclipse.org/legal/epl-2.0/).
Please visit
[http://www.jacoco.org/jacoco/trunk/doc/license.html](http://www.jacoco.org/jacoco/trunk/doc/license.html)
diff --git a/README.md b/README.md
index dc7b5720..d2886deb 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
JaCoCo Java Code Coverage Library
=================================
-[![Build Status](https://travis-ci.org/jacoco/jacoco.svg?branch=master)](https://travis-ci.org/jacoco/jacoco)
+[![Build Status](https://dev.azure.com/jacoco-org/JaCoCo/_apis/build/status/JaCoCo?branchName=master)](https://dev.azure.com/jacoco-org/JaCoCo/_build/latest?definitionId=1&branchName=master)
[![Build status](https://ci.appveyor.com/api/projects/status/g28egytv4tb898d7/branch/master?svg=true)](https://ci.appveyor.com/project/JaCoCo/jacoco/branch/master)
[![Maven Central](https://img.shields.io/maven-central/v/org.jacoco/jacoco.svg)](http://search.maven.org/#search|ga|1|g%3Aorg.jacoco)
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties b/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties
index 324b5fb9..fdd3d204 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/invoker.properties
@@ -1 +1 @@
-invoker.buildResult=failure \ No newline at end of file
+invoker.buildResult=failure
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
index ad27b9a8..0bf76fbe 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java
index 937070aa..c917290f 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -12,8 +13,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java
index 26321103..c0394beb 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -14,9 +15,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example();
- }
+ @Test
+ public void test() {
+ new Example();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh b/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh
index 987843af..eef423b1 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-check-fails-halt/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
index 49799768..104a09f8 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java
index 937070aa..c917290f 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -12,8 +13,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java
index 26321103..c0394beb 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -14,9 +15,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example();
- }
+ @Test
+ public void test() {
+ new Example();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh
index cad473c5..85f14c77 100644
--- a/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-check-fails-no-halt/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-check-passes/pom.xml b/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
index 233974f6..84e2b594 100644
--- a/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-check-passes/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java
index 937070aa..c917290f 100644
--- a/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-check-passes/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -12,8 +13,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java
index 598c1212..78d58727 100644
--- a/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-check-passes/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -14,9 +15,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-check-passes/verify.bsh b/jacoco-maven-plugin.test/it/it-check-passes/verify.bsh
index e9bae9bd..881e0b51 100644
--- a/jacoco-maven-plugin.test/it/it-check-passes/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-check-passes/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml b/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
index 239ff3d4..4ef2c2e3 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh b/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
index 2962f35b..be81ef8e 100644
--- a/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-customize-agent/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-dump/pom.xml b/jacoco-maven-plugin.test/it/it-dump/pom.xml
index a954f88e..38a2e33b 100644
--- a/jacoco-maven-plugin.test/it/it-dump/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-dump/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Charles Honton
diff --git a/jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java b/jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java
index 2a22ea02..c0c8d3e5 100644
--- a/jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java
+++ b/jacoco-maven-plugin.test/it/it-dump/src/main/java/Server.java
@@ -1,15 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
*
*******************************************************************************/
-
import java.io.File;
/**
diff --git a/jacoco-maven-plugin.test/it/it-dump/verify.bsh b/jacoco-maven-plugin.test/it/it-dump/verify.bsh
index e9bae9bd..881e0b51 100644
--- a/jacoco-maven-plugin.test/it/it-dump/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-dump/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml b/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml
index 3e5739b5..2281d2c8 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java
index 90c30a1a..e98d43cb 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/DatabaseUtil.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,9 +12,8 @@
*******************************************************************************/
package org.project;
-
public class DatabaseUtil {
- public void doStuff() {
- System.out.println("Do DatabaseUtil Stuff");
- }
+ public void doStuff() {
+ System.out.println("Do DatabaseUtil Stuff");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java
index b956f16d..410d554a 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/FileUtil.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,9 +12,8 @@
*******************************************************************************/
package org.project;
-
public class FileUtil {
- public void doStuff() {
- System.out.println("Do FileUtil Stuff");
- }
+ public void doStuff() {
+ System.out.println("Do FileUtil Stuff");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java
index ace8ec7a..56596377 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/src/main/java/org/project/TestUtil.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,9 +12,8 @@
*******************************************************************************/
package org.project;
-
public class TestUtil {
- public void doStuff() {
- System.out.println("Do TestUtil Stuff");
- }
+ public void doStuff() {
+ System.out.println("Do TestUtil Stuff");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java b/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java
index f9a05977..e6409ed2 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/src/test/java/org/project/TestDatabaseUtil.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -14,8 +15,8 @@ package org.project;
import org.junit.Test;
public class TestDatabaseUtil {
- @Test
- public void testDoStuff() {
- new DatabaseUtil().doStuff();
- }
+ @Test
+ public void testDoStuff() {
+ new DatabaseUtil().doStuff();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh b/jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh
index 0dbe84ae..5953f892 100644
--- a/jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-includes-excludes/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml
index edcec3d6..c296bb1d 100644
--- a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/module-info.java b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/module-info.java
index e7f9686e..4f9f3f13 100644
--- a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/module-info.java
+++ b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/module-info.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/Example.java b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/Example.java
index 0873a9f2..424b7404 100644
--- a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/Example.java
+++ b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/main/java/org/example/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,8 +14,8 @@ package org.example;
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/ExampleTest.java b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/ExampleTest.java
index d68f5ee5..8597086d 100644
--- a/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-java9-offline-instrumentation/src/test/java/org/example/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-java9/pom.xml b/jacoco-maven-plugin.test/it/it-java9/pom.xml
index b44bafd5..d728bdb5 100644
--- a/jacoco-maven-plugin.test/it/it-java9/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-java9/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java
index 2666e56a..98786188 100644
--- a/jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-java9/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,9 +12,9 @@
*******************************************************************************/
public class Example {
- public void sayHello(String name) {
- // http://openjdk.java.net/jeps/280
- System.out.println("Hello, " + name);
- }
+ public void sayHello(String name) {
+ // http://openjdk.java.net/jeps/280
+ System.out.println("Hello, " + name);
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java
index e49e78d3..af764a80 100644
--- a/jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-java9/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello("test");
- }
+ @Test
+ public void test() {
+ new Example().sayHello("test");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml
index 74d181d3..82ba3e83 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-merge/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Mads Mohr Christensen - implementation of MergeMojo
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml
index d38548b9..5ab6f3e6 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Mads Mohr Christensen - implementation of MergeMojo
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java
index beaa588b..8e91fcad 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java
index 3c86beeb..52f7c78e 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project1/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml
index fe6b03aa..31f48e28 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Mads Mohr Christensen - implementation of MergeMojo
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java
index beaa588b..8e91fcad 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java
index 3c86beeb..52f7c78e 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/it-merge-passes-project2/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/pom.xml b/jacoco-maven-plugin.test/it/it-merge-passes/pom.xml
index 1cb42066..3c907960 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Mads Mohr Christensen - implementation of MergeMojo
diff --git a/jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh b/jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh
index e2371619..bac900ca 100644
--- a/jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-merge-passes/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml b/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml
index fdd3e250..06990888 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-multi-module/child-jar-without-sources/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Mirko Friedenhagen
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml b/jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml
index e3c316eb..a7d4dbef 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-multi-module/child/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java b/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java
index 056c63eb..308ce111 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java
+++ b/jacoco-maven-plugin.test/it/it-multi-module/child/src/main/java/somepackage/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,8 +14,8 @@ package somepackage;
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-multi-module/child/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/pom.xml b/jacoco-maven-plugin.test/it/it-multi-module/pom.xml
index 673b046e..abf54dc8 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-multi-module/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml b/jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml
index b956b2a7..f5eff4d6 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-multi-module/skip-child/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java b/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java
index 2cfb7c78..53ff5673 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-multi-module/skip-child/src/test/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,8 +14,8 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- }
+ @Test
+ public void test() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multi-module/verify.bsh b/jacoco-maven-plugin.test/it/it-multi-module/verify.bsh
index 15053161..4e872a1d 100644
--- a/jacoco-maven-plugin.test/it/it-multi-module/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-multi-module/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml b/jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml
index b8b2fd5e..a650a51b 100644
--- a/jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-multiple-executions/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-multiple-executions/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-multiple-executions/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh b/jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh
index 122b0bdd..8aebc4ac 100644
--- a/jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-multiple-executions/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -35,4 +36,3 @@ String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
if ( buildLog.indexOf( argLine ) < 0 ) {
throw new RuntimeException( "Original argLine was overwritten" );
}
-
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml
index 34deae5f..402d83d6 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java
index 2cfb7c78..53ff5673 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child-without-main-classes/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,8 +14,8 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- }
+ @Test
+ public void test() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml
index 86c05f15..21452641 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java
index 5d0a189d..20a49aad 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/DoNotInstrument.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class DoNotInstrument {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/child/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml b/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml
index 54a8d1f5..a5dbc166 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh b/jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh
index 3cf3787b..c23e8fd3 100644
--- a/jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-offline-instrumentation/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml b/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml
index e3ec74dd..d850d5e3 100644
--- a/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-prepend-property-skip/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java
index 0349a906..8c2b78ba 100644
--- a/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-prepend-property-skip/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -15,9 +16,9 @@ import static org.junit.Assert.assertNotNull;
public class ExampleTest {
- @Test
- public void test() {
- assertNotNull(System.getProperty("foo"));
- }
+ @Test
+ public void test() {
+ assertNotNull(System.getProperty("foo"));
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-prepend-property/pom.xml b/jacoco-maven-plugin.test/it/it-prepend-property/pom.xml
index 3c2ee5a5..bf11dd1e 100644
--- a/jacoco-maven-plugin.test/it/it-prepend-property/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-prepend-property/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh b/jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh
index 1fac651a..571be657 100644
--- a/jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-prepend-property/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml
index ae63a042..a432f491 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java
index 73ace31a..d7982d87 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/main/java/package1/Example1.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package1;
public class Example1 {
- public void a() {
- }
+ public void a() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java
index 413fe7d3..8d6670d6 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child1/src/test/java/package1/Example1Test.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example1Test {
- @Test
- public void test() {
- new Example1().a();
- }
+ @Test
+ public void test() {
+ new Example1().a();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml
index 163116c9..e4ca10ea 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java
index 25e2f9c7..3dfc421e 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/main/java/package2/Example2.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package2;
public class Example2 {
- public void a() {
- }
+ public void a() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java
index ef0df802..7c4ebcde 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/child2/src/test/java/package2/Example2Test.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example2Test {
- @Test
- public void test() {
- new Example2().a();
- }
+ @Test
+ public void test() {
+ new Example2().a();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml
index 96392d14..67714f6f 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml
index 6e2fa30e..c8d0a8e5 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/report/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh
index b2835dbd..6b2a76f4 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate-customization/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml
index d2e70c34..d11c6c17 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -29,5 +30,5 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
+
</project>
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java
index 12049fee..4487ec1a 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1-test/src/test/java/package1/Example1bTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example1bTest {
- @Test
- public void test() {
- new Example1b().b();
- }
+ @Test
+ public void test() {
+ new Example1b().b();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml
index 9f23871e..a260ec09 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -21,5 +22,5 @@
<artifactId>child1</artifactId>
<packaging>jar</packaging>
-
+
</project>
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java
index 45f08596..b801e568 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1a.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package1;
public class Example1a {
- public void a() {
- }
+ public void a() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java
index f4633bb9..c41f04b7 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/main/java/package1/Example1b.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package1;
public class Example1b {
- public void b() {
- }
+ public void b() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java
index 15895a34..6a830fd8 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child1/src/test/java/package1/Example1aTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example1aTest {
- @Test
- public void test() {
- new Example1a().a();
- }
+ @Test
+ public void test() {
+ new Example1a().a();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml
index a486857a..098b942f 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -21,5 +22,5 @@
<artifactId>child2</artifactId>
<packaging>jar</packaging>
-
+
</project>
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java
index 25e2f9c7..3dfc421e 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/main/java/package2/Example2.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package2;
public class Example2 {
- public void a() {
- }
+ public void a() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java
index ef0df802..7c4ebcde 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2/src/test/java/package2/Example2Test.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example2Test {
- @Test
- public void test() {
- new Example2().a();
- }
+ @Test
+ public void test() {
+ new Example2().a();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml
index 50c70bbc..87745a0a 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/Example2.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/Example2.java
index 25e2f9c7..3dfc421e 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/Example2.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/main/java/package2/Example2.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -13,7 +14,7 @@ package package2;
public class Example2 {
- public void a() {
- }
+ public void a() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/Example2Test.java b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/Example2Test.java
index ef0df802..7c4ebcde 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/Example2Test.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/child2v2/src/test/java/package2/Example2Test.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -15,9 +16,9 @@ import org.junit.Test;
public class Example2Test {
- @Test
- public void test() {
- new Example2().a();
- }
+ @Test
+ public void test() {
+ new Example2().a();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml
index ab67c922..ab18c175 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml b/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml
index 6d217a87..494a4fd8 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/report/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java b/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java
index 065f71da..b09e4559 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/report/src/test/java/packagereport/ReportTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -15,8 +16,8 @@ import org.junit.Test;
public class ReportTest {
- @Test
- public void test() {
- }
+ @Test
+ public void test() {
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh b/jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh
index 72fed737..0c44d492 100644
--- a/jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-aggregate/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, Jan Wloka - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml b/jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml
index 995c510d..35966c88 100644
--- a/jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-nomatch/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java
index 0deaeaf5..b603539c 100644
--- a/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-report-nomatch/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh b/jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh
index f5419b06..73160e35 100644
--- a/jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-nomatch/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,7 +14,7 @@ import java.io.*;
import org.codehaus.plexus.util.*;
String buildLog = FileUtils.fileRead( new File( basedir, "build.log" ) );
-if ( buildLog.indexOf( "Classes in bundle " ) < 0 || buildLog.indexOf(" do no match with execution data." ) < 0 ) {
+if ( buildLog.indexOf( "Classes in bundle " ) < 0 || buildLog.indexOf(" do not match with execution data." ) < 0 ) {
throw new RuntimeException( "Warning 1 was not printed" );
}
if ( buildLog.indexOf( "For report generation the same class files must be used as at runtime." ) < 0 ) {
diff --git a/jacoco-maven-plugin.test/it/it-report-select-formats/pom.xml b/jacoco-maven-plugin.test/it/it-report-select-formats/pom.xml
new file mode 100644
index 00000000..a3520a45
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-report-select-formats/pom.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Marc R. Hoffmann - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>jacoco</groupId>
+ <artifactId>setup-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>it-report-select-formats</artifactId>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>@project.groupId@</groupId>
+ <artifactId>jacoco-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>prepare-agent</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>report</id>
+ <goals>
+ <goal>report</goal>
+ </goals>
+ <configuration>
+ <formats>
+ <format>XML</format>
+ <format>CSV</format>
+ </formats>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/jacoco-maven-plugin.test/it/it-report-select-formats/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-report-select-formats/src/main/java/Example.java
new file mode 100644
index 00000000..b603539c
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-report-select-formats/src/main/java/Example.java
@@ -0,0 +1,15 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+public class Example {
+
+}
diff --git a/jacoco-maven-plugin.test/it/it-report-select-formats/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-report-select-formats/src/test/java/ExampleTest.java
new file mode 100644
index 00000000..deb8fde7
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-report-select-formats/src/test/java/ExampleTest.java
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+import org.junit.Test;
+
+public class ExampleTest {
+
+ @Test
+ public void test() {
+ new Example();
+ }
+
+}
diff --git a/jacoco-maven-plugin.test/it/it-report-select-formats/verify.bsh b/jacoco-maven-plugin.test/it/it-report-select-formats/verify.bsh
new file mode 100644
index 00000000..9b4f559d
--- /dev/null
+++ b/jacoco-maven-plugin.test/it/it-report-select-formats/verify.bsh
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+import java.io.*;
+
+File htmlReportFile = new File( basedir, "target/site/jacoco/index.html" );
+if ( htmlReportFile.isFile() ) {
+ throw new RuntimeException( "Unexpected HTML report was created" );
+}
+
+File xmlReportFile = new File( basedir, "target/site/jacoco/jacoco.xml" );
+if ( !xmlReportFile.isFile() ) {
+ throw new RuntimeException( "XML report was not created" );
+}
+
+File csvReportFile = new File( basedir, "target/site/jacoco/jacoco.csv" );
+if ( !csvReportFile.isFile() ) {
+ throw new RuntimeException( "CSV report was not created" );
+}
diff --git a/jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml b/jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml
index a99c88c6..324ce0e4 100644
--- a/jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-unreadable-dump/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh b/jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh
index bac74014..6996fb5e 100644
--- a/jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-unreadable-dump/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml b/jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml
index d4ba6771..3a756bbd 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-without-debug/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-report-without-debug/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-report-without-debug/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh b/jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh
index 8cb055fa..3c541beb 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-without-debug/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml b/jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml
index 24bfc6d5..894dfc42 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-report-without-dump/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh b/jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh
index b7cc15ef..a1269637 100644
--- a/jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-report-without-dump/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml b/jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml
index 9e4d18c3..f1dcd04e 100644
--- a/jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-site-failsafe/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java
index d3b6728e..081f836a 100644
--- a/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-site-failsafe/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,12 +12,12 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
- public void sayHelloIT() {
- System.out.println("Hello world");
- }
+ public void sayHelloIT() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java b/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java
index a42093e3..a5d18f96 100644
--- a/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java
+++ b/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleIT.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleIT {
- @Test
- public void test() {
- new Example().sayHelloIT();
- }
+ @Test
+ public void test() {
+ new Example().sayHelloIT();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-site-failsafe/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh b/jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh
index c933313b..0086087b 100644
--- a/jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-site-failsafe/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-site/pom.xml b/jacoco-maven-plugin.test/it/it-site/pom.xml
index 3f4035a2..0de5c601 100644
--- a/jacoco-maven-plugin.test/it/it-site/pom.xml
+++ b/jacoco-maven-plugin.test/it/it-site/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java b/jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java
index d2648238..fa9c810b 100644
--- a/jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java
+++ b/jacoco-maven-plugin.test/it/it-site/src/main/java/Example.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,8 +12,8 @@
*******************************************************************************/
public class Example {
- public void sayHello() {
- System.out.println("Hello world");
- }
+ public void sayHello() {
+ System.out.println("Hello world");
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java b/jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java
index db0af659..6e2e787d 100644
--- a/jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java
+++ b/jacoco-maven-plugin.test/it/it-site/src/test/java/ExampleTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,9 +14,9 @@ import org.junit.Test;
public class ExampleTest {
- @Test
- public void test() {
- new Example().sayHello();
- }
+ @Test
+ public void test() {
+ new Example().sayHello();
+ }
}
diff --git a/jacoco-maven-plugin.test/it/it-site/verify.bsh b/jacoco-maven-plugin.test/it/it-site/verify.bsh
index c3d96ce7..5600e5d1 100644
--- a/jacoco-maven-plugin.test/it/it-site/verify.bsh
+++ b/jacoco-maven-plugin.test/it/it-site/verify.bsh
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/settings.xml b/jacoco-maven-plugin.test/it/settings.xml
index 31132fe4..f3d5bd81 100644
--- a/jacoco-maven-plugin.test/it/settings.xml
+++ b/jacoco-maven-plugin.test/it/settings.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin.test/it/setup-parent/pom.xml b/jacoco-maven-plugin.test/it/setup-parent/pom.xml
index 1e736ffb..885384da 100644
--- a/jacoco-maven-plugin.test/it/setup-parent/pom.xml
+++ b/jacoco-maven-plugin.test/it/setup-parent/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -22,7 +23,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.8.2</version>
+ <version>@junit.version@</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/jacoco-maven-plugin.test/pom.xml b/jacoco-maven-plugin.test/pom.xml
index 9325c374..e200fe7c 100644
--- a/jacoco-maven-plugin.test/pom.xml
+++ b/jacoco-maven-plugin.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -16,7 +17,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml b/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml
index e895c90a..01c08b37 100644
--- a/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml
+++ b/jacoco-maven-plugin/META-INF/m2e/lifecycle-mapping-metadata.xml
@@ -1,9 +1,10 @@
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco-maven-plugin/pom.xml b/jacoco-maven-plugin/pom.xml
index c19312cb..5a9314f8 100644
--- a/jacoco-maven-plugin/pom.xml
+++ b/jacoco-maven-plugin/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -16,12 +17,13 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
<artifactId>jacoco-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
+ <url>https://www.jacoco.org/jacoco/trunk/doc/maven.html</url>
<name>JaCoCo :: Maven Plugin</name>
<description>The JaCoCo Maven Plugin provides the JaCoCo runtime agent to your tests and allows basic report creation.</description>
@@ -30,22 +32,6 @@
<maven>3.0</maven>
</prerequisites>
- <dependencyManagement>
- <dependencies>
- <!-- maven-reporting-impl and slight update of version of its transitive dependency on commons-collections -->
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- <version>2.1</version>
- </dependency>
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
@@ -73,10 +59,6 @@
<artifactId>maven-reporting-api</artifactId>
<version>${project.prerequisites.maven}</version>
</dependency>
- <dependency>
- <groupId>org.apache.maven.reporting</groupId>
- <artifactId>maven-reporting-impl</artifactId>
- </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
index d097c530..74f90ace 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractAgentMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -68,7 +69,10 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
/**
* A list of class names to exclude from instrumentation. May use wildcard
- * characters (* and ?). When not specified nothing will be excluded.
+ * characters (* and ?). When not specified nothing will be excluded. Except
+ * for performance optimization or technical corner cases this option is
+ * normally not required. If you want to exclude classes from the report
+ * please configure the <code>report</code> goal accordingly.
*/
@Parameter
private List<String> excludes;
@@ -155,8 +159,8 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
final String name = getEffectivePropertyName();
final Properties projectProperties = getProject().getProperties();
final String oldValue = projectProperties.getProperty(name);
- final String newValue = createAgentOptions().prependVMArguments(
- oldValue, getAgentJarFile());
+ final String newValue = createAgentOptions()
+ .prependVMArguments(oldValue, getAgentJarFile());
getLog().info(name + " set to " + newValue);
projectProperties.setProperty(name, newValue);
}
@@ -196,12 +200,12 @@ public abstract class AbstractAgentMojo extends AbstractJacocoMojo {
agentOptions.setExclClassloader(exclClassLoaders);
}
if (inclBootstrapClasses != null) {
- agentOptions.setInclBootstrapClasses(inclBootstrapClasses
- .booleanValue());
+ agentOptions.setInclBootstrapClasses(
+ inclBootstrapClasses.booleanValue());
}
if (inclNoLocationClasses != null) {
- agentOptions.setInclNoLocationClasses(inclNoLocationClasses
- .booleanValue());
+ agentOptions.setInclNoLocationClasses(
+ inclNoLocationClasses.booleanValue());
}
if (sessionId != null) {
agentOptions.setSessionId(sessionId);
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java
index 8eb55ca3..4ea6b5af 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractJacocoMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -34,8 +35,8 @@ public abstract class AbstractJacocoMojo extends AbstractMojo {
@Parameter(property = "jacoco.skip", defaultValue = "false")
private boolean skip;
- public final void execute() throws MojoExecutionException,
- MojoFailureException {
+ public final void execute()
+ throws MojoExecutionException, MojoFailureException {
if (skip) {
getLog().info(
"Skipping JaCoCo execution because property jacoco.skip is set.");
@@ -47,7 +48,7 @@ public abstract class AbstractJacocoMojo extends AbstractMojo {
/**
* Executes Mojo.
- *
+ *
* @throws MojoExecutionException
* if an unexpected problem occurs. Throwing this exception
* causes a "BUILD ERROR" message to be displayed.
@@ -56,8 +57,8 @@ public abstract class AbstractJacocoMojo extends AbstractMojo {
* occurs. Throwing this exception causes a "BUILD FAILURE"
* message to be displayed.
*/
- protected abstract void executeMojo() throws MojoExecutionException,
- MojoFailureException;
+ protected abstract void executeMojo()
+ throws MojoExecutionException, MojoFailureException;
/**
* Skips Mojo.
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java
index ecd48ab5..097ecb10 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AbstractReportMojo.java
@@ -1,26 +1,29 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
+ * troosan - add support for format selection
*
*******************************************************************************/
package org.jacoco.maven;
+import java.io.File;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
-import org.apache.maven.doxia.siterenderer.Renderer;
+import org.apache.maven.doxia.sink.SinkFactory;
+import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
-import org.apache.maven.reporting.AbstractMavenReport;
+import org.apache.maven.reporting.MavenMultiPageReport;
import org.apache.maven.reporting.MavenReportException;
import org.jacoco.report.IReportGroupVisitor;
import org.jacoco.report.IReportVisitor;
@@ -29,7 +32,8 @@ import org.jacoco.report.IReportVisitor;
* Base class for creating a code coverage report for tests of a single project
* in multiple formats (HTML, XML, and CSV).
*/
-public abstract class AbstractReportMojo extends AbstractMavenReport {
+public abstract class AbstractReportMojo extends AbstractMojo
+ implements MavenMultiPageReport {
/**
* Encoding of the generated reports.
@@ -38,6 +42,15 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
String outputEncoding;
/**
+ * A list of report formats to generate. Supported formats are HTML, XML and
+ * CSV. Defaults to all formats if no values are given.
+ *
+ * @since 0.8.7
+ */
+ @Parameter(defaultValue = "HTML,XML,CSV")
+ List<ReportFormat> formats;
+
+ /**
* Name of the root node HTML report pages.
*
* @since 0.7.7
@@ -85,34 +98,21 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
@Parameter(property = "project", readonly = true)
MavenProject project;
- /**
- * Doxia Site Renderer.
- */
- @Component
- Renderer siteRenderer;
-
public String getDescription(final Locale locale) {
return getName(locale) + " Coverage Report.";
}
- @Override
public boolean isExternalReport() {
return true;
}
- @Override
- protected MavenProject getProject() {
- return project;
- }
-
- @Override
- protected Renderer getSiteRenderer() {
- return siteRenderer;
+ public String getCategoryName() {
+ return CATEGORY_PROJECT_REPORTS;
}
/**
* Returns the list of class files to include in the report.
- *
+ *
* @return class files to include, may contain wildcard characters
*/
List<String> getIncludes() {
@@ -121,14 +121,13 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
/**
* Returns the list of class files to exclude from the report.
- *
+ *
* @return class files to exclude, may contain wildcard characters
*/
List<String> getExcludes() {
return excludes;
}
- @Override
public boolean canGenerateReport() {
if (skip) {
getLog().info(
@@ -152,11 +151,27 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
abstract boolean canGenerateReportRegardingClassesDirectory();
+ abstract File getOutputDirectory();
+
+ public void generate(
+ @SuppressWarnings("deprecation") final org.codehaus.doxia.sink.Sink sink,
+ final Locale locale) throws MavenReportException {
+ generate(sink, null, locale);
+ }
+
+ public void generate(final org.apache.maven.doxia.sink.Sink sink,
+ final SinkFactory sinkFactory, final Locale locale)
+ throws MavenReportException {
+ if (!canGenerateReport()) {
+ return;
+ }
+ executeReport(locale);
+ }
+
/**
* This method is called when the report generation is invoked directly as a
* standalone Mojo.
*/
- @Override
public void execute() throws MojoExecutionException {
if (!canGenerateReport()) {
return;
@@ -169,8 +184,7 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
}
}
- @Override
- protected void executeReport(final Locale locale)
+ private void executeReport(final Locale locale)
throws MavenReportException {
try {
final ReportSupport support = new ReportSupport(getLog());
@@ -180,15 +194,20 @@ public abstract class AbstractReportMojo extends AbstractMavenReport {
createReport(visitor, support);
visitor.visitEnd();
} catch (final IOException e) {
- throw new MavenReportException("Error while creating report: "
- + e.getMessage(), e);
+ throw new MavenReportException(
+ "Error while creating report: " + e.getMessage(), e);
}
}
- abstract void loadExecutionData(final ReportSupport support)
- throws IOException;
+ private void addFormatters(final ReportSupport support, final Locale locale)
+ throws IOException {
+ getOutputDirectory().mkdirs();
+ for (final ReportFormat f : formats) {
+ support.addVisitor(f.createVisitor(this, locale));
+ }
+ }
- abstract void addFormatters(final ReportSupport support, final Locale locale)
+ abstract void loadExecutionData(final ReportSupport support)
throws IOException;
abstract void createReport(final IReportGroupVisitor visitor,
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java
index 03422d60..158b46eb 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AgentITMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -26,7 +27,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
* <li>bound to <code>pre-integration-test</code> phase</li>
* <li>different <code>destFile</code></li>
* </ul>
- *
+ *
* @since 0.6.4
*/
@Mojo(name = "prepare-agent-integration", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java
index f434c981..accc9896 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -24,12 +25,12 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
* as a VM argument to the application under test. Depending on the project
* packaging type by default a property with the following name is set:
* </p>
- *
+ *
* <ul>
* <li>tycho.testArgLine for packaging type eclipse-test-plugin and</li>
* <li>argLine otherwise.</li>
* </ul>
- *
+ *
* <p>
* If your project already defines VM arguments for test execution, be sure that
* they will include property defined by JaCoCo.
@@ -37,9 +38,11 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
*
* <p>
* One of the ways to do this in case of maven-surefire-plugin - is to use
- * syntax for <a href="http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation">late property evaluation</a>:
+ * syntax for <a href=
+ * "http://maven.apache.org/surefire/maven-surefire-plugin/faq.html#late-property-evaluation">late
+ * property evaluation</a>:
* </p>
- *
+ *
* <pre>
* &lt;plugin&gt;
* &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
@@ -49,17 +52,18 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
* &lt;/configuration&gt;
* &lt;/plugin&gt;
* </pre>
- *
+ *
* <p>
- * You can define empty property to avoid JVM startup error <code>Could not find or load main class @{argLine}</code>
- * when using late property evaluation and jacoco-maven-plugin not executed.
+ * You can define empty property to avoid JVM startup error
+ * <code>Could not find or load main class @{argLine}</code> when using late
+ * property evaluation and jacoco-maven-plugin not executed.
* </p>
- *
+ *
* <p>
- * Another way is to define "argLine" as a Maven property rather than
- * as part of the configuration of maven-surefire-plugin:
+ * Another way is to define "argLine" as a Maven property rather than as part of
+ * the configuration of maven-surefire-plugin:
* </p>
- *
+ *
* <pre>
* &lt;properties&gt;
* &lt;argLine&gt;-your -extra -arguments&lt;/argLine&gt;
@@ -73,12 +77,12 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
* &lt;/configuration&gt;
* &lt;/plugin&gt;
* </pre>
- *
+ *
* <p>
* Resulting coverage information is collected during execution and by default
* written to a file when the process terminates.
* </p>
- *
+ *
* @since 0.5.3
*/
@Mojo(name = "prepare-agent", defaultPhase = LifecyclePhase.INITIALIZE, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java
index 68d6aa8d..21b7419b 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/CheckMojo.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
* Marc Hoffmann - redesign using report APIs
- *
+ *
*******************************************************************************/
package org.jacoco.maven;
@@ -30,7 +31,7 @@ import org.jacoco.report.check.Rule;
/**
* Checks that the code coverage metrics are being met.
- *
+ *
* @since 0.6.1
*/
@Mojo(name = "check", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
@@ -47,27 +48,27 @@ public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
* applies to a certain counter (INSTRUCTION, LINE, BRANCH, COMPLEXITY,
* METHOD, CLASS) and defines a minimum or maximum for the corresponding
* value (TOTALCOUNT, COVEREDCOUNT, MISSEDCOUNT, COVEREDRATIO, MISSEDRATIO).
- * If a limit refers to a ratio the range is from 0.0 to 1.0 where the
- * number of decimal places will also determine the precision in error
- * messages. A limit ratio may optionally be declared as a percentage
- * where 0.80 and 80% represent the same value, the value must end with %.
+ * If a limit refers to a ratio it must be in the range from 0.0 to 1.0
+ * where the number of decimal places will also determine the precision in
+ * error messages. A limit ratio may optionally be declared as a percentage
+ * where 0.80 and 80% represent the same value.
* </p>
- *
+ *
* <p>
* If not specified the following defaults are assumed:
* </p>
- *
+ *
* <ul>
* <li>rule element: BUNDLE</li>
* <li>limit counter: INSTRUCTION</li>
* <li>limit value: COVEREDRATIO</li>
* </ul>
- *
+ *
* <p>
* This example requires an overall instruction coverage of 80% and no class
* must be missed:
* </p>
- *
+ *
* <pre>
* {@code
* <rules>
@@ -88,12 +89,12 @@ public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
* </rule>
* </rules>}
* </pre>
- *
+ *
* <p>
* This example requires a line coverage minimum of 50% for every class
* except test classes:
* </p>
- *
+ *
* <pre>
* {@code
* <rules>
@@ -149,8 +150,8 @@ public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
getLog().info(MSG_SKIPPING + dataFile);
return false;
}
- final File classesDirectory = new File(getProject().getBuild()
- .getOutputDirectory());
+ final File classesDirectory = new File(
+ getProject().getBuild().getOutputDirectory());
if (!classesDirectory.exists()) {
getLog().info(
"Skipping JaCoCo execution due to missing classes directory:"
@@ -161,8 +162,7 @@ public class CheckMojo extends AbstractJacocoMojo implements IViolationsOutput {
}
@Override
- public void executeMojo() throws MojoExecutionException,
- MojoExecutionException {
+ public void executeMojo() throws MojoExecutionException {
if (!canCheckCoverage()) {
return;
}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java
index 64836eea..783c4c7d 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Chas Honton, Marc R. Hoffmann - initial implementation
@@ -29,13 +30,13 @@ import org.jacoco.core.tools.ExecFileLoader;
* Request a dump over TCP/IP from a JaCoCo agent running in
* <code>tcpserver</code> mode.
* </p>
- *
+ *
* <p>
* Note concerning parallel builds: While the dump goal as such is thread safe,
* it has to be considered that TCP/IP server ports of the agents are a shared
* resource.
* </p>
- *
+ *
* @since 0.6.4
*/
@Mojo(name = "dump", defaultPhase = LifecyclePhase.POST_INTEGRATION_TEST, threadSafe = true)
@@ -94,9 +95,8 @@ public class DumpMojo extends AbstractJacocoMojo {
@Override
protected void onConnecting(final InetAddress address,
final int port) {
- getLog().info(
- format("Connecting to %s:%s", address,
- Integer.valueOf(port)));
+ getLog().info(format("Connecting to %s:%s", address,
+ Integer.valueOf(port)));
}
@Override
@@ -111,9 +111,8 @@ public class DumpMojo extends AbstractJacocoMojo {
try {
final ExecFileLoader loader = client.dump(address, port);
if (dump) {
- getLog().info(
- format("Dumping execution data to %s",
- destFile.getAbsolutePath()));
+ getLog().info(format("Dumping execution data to %s",
+ destFile.getAbsolutePath()));
loader.save(destFile, append);
}
} catch (final IOException e) {
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java b/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java
index 09029c8a..377cbb65 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/FileFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -16,7 +17,6 @@ import java.io.File;
import java.io.IOException;
import java.util.List;
-import org.apache.commons.collections.CollectionUtils;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.StringUtils;
@@ -33,20 +33,21 @@ public class FileFilter {
/**
* Construct a new FileFilter
- *
+ *
* @param includes
* list of includes patterns
* @param excludes
* list of excludes patterns
*/
- public FileFilter(final List<String> includes, final List<String> excludes) {
+ public FileFilter(final List<String> includes,
+ final List<String> excludes) {
this.includes = includes;
this.excludes = excludes;
}
/**
* Returns a list of file names.
- *
+ *
* @param directory
* the directory to scan
* @return a list of files
@@ -60,7 +61,7 @@ public class FileFilter {
/**
* Returns a list of files.
- *
+ *
* @param directory
* the directory to scan
* @return a list of files
@@ -73,7 +74,7 @@ public class FileFilter {
/**
* Get the includes pattern
- *
+ *
* @return the pattern
*/
public String getIncludes() {
@@ -82,7 +83,7 @@ public class FileFilter {
/**
* Get the excludes pattern
- *
+ *
* @return the pattern
*/
public String getExcludes() {
@@ -92,7 +93,7 @@ public class FileFilter {
private String buildPattern(final List<String> patterns,
final String defaultPattern) {
String pattern = defaultPattern;
- if (CollectionUtils.isNotEmpty(patterns)) {
+ if (patterns != null && !patterns.isEmpty()) {
pattern = StringUtils.join(patterns.iterator(), ",");
}
return pattern;
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java
index d99ada74..ac31a10c 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/InstrumentMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -39,7 +40,7 @@ import org.jacoco.core.runtime.OfflineInstrumentationAccessGenerator;
* this mode. Please consult <a href="offline.html">documentation</a> about
* offline instrumentation before using this mode.
* </p>
- *
+ *
* @since 0.6.2
*/
@Mojo(name = "instrument", defaultPhase = LifecyclePhase.PROCESS_CLASSES, threadSafe = true)
@@ -54,23 +55,27 @@ public class InstrumentMojo extends AbstractJacocoMojo {
/**
* A list of class files to exclude from instrumentation. May use wildcard
- * characters (* and ?). When not specified nothing will be excluded.
+ * characters (* and ?). When not specified nothing will be excluded. Except
+ * for performance optimization or technical corner cases this option is
+ * normally not required. If you want to exclude classes from the report
+ * please configure the <code>report</code> goal accordingly.
*/
@Parameter
private List<String> excludes;
@Override
- public void executeMojo() throws MojoExecutionException,
- MojoFailureException {
- final File originalClassesDir = new File(getProject().getBuild()
- .getDirectory(), "generated-classes/jacoco");
+ public void executeMojo()
+ throws MojoExecutionException, MojoFailureException {
+ final File originalClassesDir = new File(
+ getProject().getBuild().getDirectory(),
+ "generated-classes/jacoco");
originalClassesDir.mkdirs();
final File classesDir = new File(
getProject().getBuild().getOutputDirectory());
if (!classesDir.exists()) {
getLog().info(
- "Skipping JaCoCo execution due to missing classes directory:" +
- classesDir);
+ "Skipping JaCoCo execution due to missing classes directory:"
+ + classesDir);
return;
}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
index 11f95775..f1bb8103 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/MergeMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mads Mohr Christensen - implementation of MergeMojo
@@ -26,7 +27,7 @@ import org.jacoco.core.tools.ExecFileLoader;
/**
* Mojo for merging a set of execution data files (*.exec) into a single file
- *
+ *
* @since 0.6.4
*/
@Mojo(name = "merge", defaultPhase = LifecyclePhase.GENERATE_RESOURCES, threadSafe = true)
@@ -42,7 +43,7 @@ public class MergeMojo extends AbstractJacocoMojo {
/**
* This mojo accepts any number of execution data file sets.
- *
+ *
* <pre>
* <code>
* &lt;fileSets&gt;
@@ -60,8 +61,8 @@ public class MergeMojo extends AbstractJacocoMojo {
private List<FileSet> fileSets;
@Override
- protected void executeMojo() throws MojoExecutionException,
- MojoFailureException {
+ protected void executeMojo()
+ throws MojoExecutionException, MojoFailureException {
if (!canMergeReports()) {
return;
}
@@ -95,13 +96,12 @@ public class MergeMojo extends AbstractJacocoMojo {
continue;
}
try {
- getLog().info(
- "Loading execution data file "
- + inputFile.getAbsolutePath());
+ getLog().info("Loading execution data file "
+ + inputFile.getAbsolutePath());
loader.load(inputFile);
} catch (final IOException e) {
- throw new MojoExecutionException("Unable to read "
- + inputFile.getAbsolutePath(), e);
+ throw new MojoExecutionException(
+ "Unable to read " + inputFile.getAbsolutePath(), e);
}
}
}
@@ -113,14 +113,14 @@ public class MergeMojo extends AbstractJacocoMojo {
getLog().info(MSG_SKIPPING);
return;
}
- getLog().info(
- "Writing merged execution data to "
- + destFile.getAbsolutePath());
+ getLog().info("Writing merged execution data to "
+ + destFile.getAbsolutePath());
try {
loader.save(destFile, false);
} catch (final IOException e) {
- throw new MojoExecutionException("Unable to write merged file "
- + destFile.getAbsolutePath(), e);
+ throw new MojoExecutionException(
+ "Unable to write merged file " + destFile.getAbsolutePath(),
+ e);
}
}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java
index 5b1f12f4..c63569f1 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportAggregateMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* John Oliver, Marc R. Hoffmann, Jan Wloka - initial API and implementation
@@ -38,18 +39,18 @@ import org.jacoco.report.IReportGroupVisitor;
* reports when tests are in separate projects than the code under test, for
* example in case of integration tests.
* </p>
- *
+ *
* <p>
* Using the dependency scope allows to distinguish projects which contribute
* execution data but should not become part of the report:
* </p>
- *
+ *
* <ul>
* <li><code>compile</code>, <code>runtime</code>, <code>provided</code>:
* Project source and execution data is included in the report.</li>
* <li><code>test</code>: Only execution data is considered for the report.</li>
* </ul>
- *
+ *
* @since 0.7.7
*/
@Mojo(name = "report-aggregate", threadSafe = true)
@@ -106,7 +107,7 @@ public class ReportAggregateMojo extends AbstractReportMojo {
final FileFilter filter = new FileFilter(dataFileIncludes,
dataFileExcludes);
- loadExecutionData(support, filter, getProject().getBasedir());
+ loadExecutionData(support, filter, project.getBasedir());
for (final MavenProject dependency : findDependencies(
Artifact.SCOPE_COMPILE, Artifact.SCOPE_RUNTIME,
Artifact.SCOPE_PROVIDED, Artifact.SCOPE_TEST)) {
@@ -122,10 +123,8 @@ public class ReportAggregateMojo extends AbstractReportMojo {
}
@Override
- void addFormatters(final ReportSupport support, final Locale locale)
- throws IOException {
- support.addAllFormatters(outputDirectory, outputEncoding, footer,
- locale);
+ File getOutputDirectory() {
+ return outputDirectory;
}
@Override
@@ -140,16 +139,13 @@ public class ReportAggregateMojo extends AbstractReportMojo {
}
}
- @Override
- protected String getOutputDirectory() {
- return outputDirectory.getAbsolutePath();
+ public File getReportOutputDirectory() {
+ return outputDirectory;
}
- @Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
- if (reportOutputDirectory != null
- && !reportOutputDirectory.getAbsolutePath().endsWith(
- "jacoco-aggregate")) {
+ if (reportOutputDirectory != null && !reportOutputDirectory
+ .getAbsolutePath().endsWith("jacoco-aggregate")) {
outputDirectory = new File(reportOutputDirectory,
"jacoco-aggregate");
} else {
@@ -168,7 +164,7 @@ public class ReportAggregateMojo extends AbstractReportMojo {
private List<MavenProject> findDependencies(final String... scopes) {
final List<MavenProject> result = new ArrayList<MavenProject>();
final List<String> scopeList = Arrays.asList(scopes);
- for (final Object dependencyObject : getProject().getDependencies()) {
+ for (final Object dependencyObject : project.getDependencies()) {
final Dependency dependency = (Dependency) dependencyObject;
if (scopeList.contains(dependency.getScope())) {
final MavenProject project = findProjectFromReactor(dependency);
@@ -192,7 +188,7 @@ public class ReportAggregateMojo extends AbstractReportMojo {
try {
depVersionAsRange = VersionRange
.createFromVersionSpec(d.getVersion());
- } catch (InvalidVersionSpecificationException e) {
+ } catch (final InvalidVersionSpecificationException e) {
throw new AssertionError(e);
}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportFormat.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportFormat.java
new file mode 100644
index 00000000..9406996f
--- /dev/null
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportFormat.java
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.maven;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Locale;
+
+import org.jacoco.report.FileMultiReportOutput;
+import org.jacoco.report.IReportVisitor;
+import org.jacoco.report.csv.CSVFormatter;
+import org.jacoco.report.html.HTMLFormatter;
+import org.jacoco.report.xml.XMLFormatter;
+
+/**
+ * Configurable output formats for the report goals.
+ */
+public enum ReportFormat {
+
+ /**
+ * Multi-page html report.
+ */
+ HTML() {
+ @Override
+ IReportVisitor createVisitor(final AbstractReportMojo mojo,
+ final Locale locale) throws IOException {
+ final HTMLFormatter htmlFormatter = new HTMLFormatter();
+ htmlFormatter.setOutputEncoding(mojo.outputEncoding);
+ htmlFormatter.setLocale(locale);
+ if (mojo.footer != null) {
+ htmlFormatter.setFooterText(mojo.footer);
+ }
+ return htmlFormatter.createVisitor(
+ new FileMultiReportOutput(mojo.getOutputDirectory()));
+ }
+ },
+
+ /**
+ * Single-file XML report.
+ */
+ XML() {
+ @Override
+ IReportVisitor createVisitor(final AbstractReportMojo mojo,
+ final Locale locale) throws IOException {
+ final XMLFormatter xml = new XMLFormatter();
+ xml.setOutputEncoding(mojo.outputEncoding);
+ return xml.createVisitor(new FileOutputStream(
+ new File(mojo.getOutputDirectory(), "jacoco.xml")));
+ }
+ },
+
+ /**
+ * Single-file CSV report.
+ */
+ CSV() {
+ @Override
+ IReportVisitor createVisitor(final AbstractReportMojo mojo,
+ final Locale locale) throws IOException {
+ final CSVFormatter csv = new CSVFormatter();
+ csv.setOutputEncoding(mojo.outputEncoding);
+ return csv.createVisitor(new FileOutputStream(
+ new File(mojo.getOutputDirectory(), "jacoco.csv")));
+ }
+ };
+
+ abstract IReportVisitor createVisitor(AbstractReportMojo mojo,
+ final Locale locale) throws IOException;
+
+}
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java
index ba4dde2e..0ca4970b 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportITMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -28,7 +29,7 @@ import org.jacoco.report.IReportGroupVisitor;
* <li>bound to <code>report-integration</code> phase</li>
* <li>different <code>dataFile</code></li>
* </ul>
- *
+ *
* @since 0.6.4
*/
@Mojo(name = "report-integration", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
@@ -57,7 +58,7 @@ public class ReportITMojo extends AbstractReportMojo {
@Override
boolean canGenerateReportRegardingClassesDirectory() {
- return new File(getProject().getBuild().getOutputDirectory()).exists();
+ return new File(project.getBuild().getOutputDirectory()).exists();
}
@Override
@@ -66,29 +67,24 @@ public class ReportITMojo extends AbstractReportMojo {
}
@Override
- void addFormatters(final ReportSupport support, final Locale locale)
- throws IOException {
- support.addAllFormatters(outputDirectory, outputEncoding, footer,
- locale);
+ File getOutputDirectory() {
+ return outputDirectory;
}
@Override
void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException {
- support.processProject(visitor, title, getProject(), getIncludes(),
+ support.processProject(visitor, title, project, getIncludes(),
getExcludes(), sourceEncoding);
}
- @Override
- protected String getOutputDirectory() {
- return outputDirectory.getAbsolutePath();
+ public File getReportOutputDirectory() {
+ return outputDirectory;
}
- @Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
- if (reportOutputDirectory != null
- && !reportOutputDirectory.getAbsolutePath().endsWith(
- "jacoco-it")) {
+ if (reportOutputDirectory != null && !reportOutputDirectory
+ .getAbsolutePath().endsWith("jacoco-it")) {
outputDirectory = new File(reportOutputDirectory, "jacoco-it");
} else {
outputDirectory = reportOutputDirectory;
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
index 002e5404..522fec3f 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -23,7 +24,7 @@ import org.jacoco.report.IReportGroupVisitor;
/**
* Creates a code coverage report for tests of a single project in multiple
* formats (HTML, XML, and CSV).
- *
+ *
* @since 0.5.3
*/
@Mojo(name = "report", defaultPhase = LifecyclePhase.VERIFY, threadSafe = true)
@@ -52,7 +53,7 @@ public class ReportMojo extends AbstractReportMojo {
@Override
boolean canGenerateReportRegardingClassesDirectory() {
- return new File(getProject().getBuild().getOutputDirectory()).exists();
+ return new File(project.getBuild().getOutputDirectory()).exists();
}
@Override
@@ -61,28 +62,24 @@ public class ReportMojo extends AbstractReportMojo {
}
@Override
- void addFormatters(final ReportSupport support, final Locale locale)
- throws IOException {
- support.addAllFormatters(outputDirectory, outputEncoding, footer,
- locale);
+ File getOutputDirectory() {
+ return outputDirectory;
}
@Override
void createReport(final IReportGroupVisitor visitor,
final ReportSupport support) throws IOException {
- support.processProject(visitor, title, getProject(), getIncludes(),
+ support.processProject(visitor, title, project, getIncludes(),
getExcludes(), sourceEncoding);
}
- @Override
- protected String getOutputDirectory() {
- return outputDirectory.getAbsolutePath();
+ public File getReportOutputDirectory() {
+ return outputDirectory;
}
- @Override
public void setReportOutputDirectory(final File reportOutputDirectory) {
- if (reportOutputDirectory != null
- && !reportOutputDirectory.getAbsolutePath().endsWith("jacoco")) {
+ if (reportOutputDirectory != null && !reportOutputDirectory
+ .getAbsolutePath().endsWith("jacoco")) {
outputDirectory = new File(reportOutputDirectory, "jacoco");
} else {
outputDirectory = reportOutputDirectory;
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java b/jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java
index 1cdf847c..c484309e 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/ReportSupport.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -16,14 +17,12 @@ import static java.lang.String.format;
import java.io.File;
import java.io.FileInputStream;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.Locale;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.project.MavenProject;
@@ -32,7 +31,6 @@ import org.jacoco.core.analysis.CoverageBuilder;
import org.jacoco.core.analysis.IBundleCoverage;
import org.jacoco.core.analysis.IClassCoverage;
import org.jacoco.core.tools.ExecFileLoader;
-import org.jacoco.report.FileMultiReportOutput;
import org.jacoco.report.IReportGroupVisitor;
import org.jacoco.report.IReportVisitor;
import org.jacoco.report.ISourceFileLocator;
@@ -40,17 +38,15 @@ import org.jacoco.report.MultiReportVisitor;
import org.jacoco.report.check.IViolationsOutput;
import org.jacoco.report.check.Rule;
import org.jacoco.report.check.RulesChecker;
-import org.jacoco.report.csv.CSVFormatter;
-import org.jacoco.report.html.HTMLFormatter;
-import org.jacoco.report.xml.XMLFormatter;
/**
* Encapsulates the tasks to create reports for Maven projects. Instances are
* supposed to be used in the following sequence:
- *
+ *
* <ol>
* <li>Create an instance</li>
- * <li>Load one or multiple exec files with <code>loadExecutionData()</code></li>
+ * <li>Load one or multiple exec files with
+ * <code>loadExecutionData()</code></li>
* <li>Add one or multiple formatters with <code>addXXX()</code> methods</li>
* <li>Create the root visitor with <code>initRootVisitor()</code></li>
* <li>Process one or multiple projects with <code>processProject()</code></li>
@@ -64,7 +60,7 @@ final class ReportSupport {
/**
* Construct a new instance with the given log output.
- *
+ *
* @param log
* for log output
*/
@@ -76,7 +72,7 @@ final class ReportSupport {
/**
* Loads the given execution data file.
- *
+ *
* @param execFile
* execution data file to load
* @throws IOException
@@ -87,38 +83,8 @@ final class ReportSupport {
loader.load(execFile);
}
- public void addXmlFormatter(final File targetfile, final String encoding)
- throws IOException {
- final XMLFormatter xml = new XMLFormatter();
- xml.setOutputEncoding(encoding);
- formatters.add(xml.createVisitor(new FileOutputStream(targetfile)));
- }
-
- public void addCsvFormatter(final File targetfile, final String encoding)
- throws IOException {
- final CSVFormatter csv = new CSVFormatter();
- csv.setOutputEncoding(encoding);
- formatters.add(csv.createVisitor(new FileOutputStream(targetfile)));
- }
-
- public void addHtmlFormatter(final File targetdir, final String encoding,
- final String footer, final Locale locale) throws IOException {
- final HTMLFormatter htmlFormatter = new HTMLFormatter();
- htmlFormatter.setOutputEncoding(encoding);
- htmlFormatter.setLocale(locale);
- if (footer != null) {
- htmlFormatter.setFooterText(footer);
- }
- formatters.add(htmlFormatter.createVisitor(new FileMultiReportOutput(
- targetdir)));
- }
-
- public void addAllFormatters(final File targetdir, final String encoding,
- final String footer, final Locale locale) throws IOException {
- targetdir.mkdirs();
- addXmlFormatter(new File(targetdir, "jacoco.xml"), encoding);
- addCsvFormatter(new File(targetdir, "jacoco.csv"), encoding);
- addHtmlFormatter(targetdir, encoding, footer, locale);
+ public void addVisitor(final IReportVisitor visitor) {
+ formatters.add(visitor);
}
public void addRulesChecker(final List<Rule> rules,
@@ -130,15 +96,15 @@ final class ReportSupport {
public IReportVisitor initRootVisitor() throws IOException {
final IReportVisitor visitor = new MultiReportVisitor(formatters);
- visitor.visitInfo(loader.getSessionInfoStore().getInfos(), loader
- .getExecutionDataStore().getContents());
+ visitor.visitInfo(loader.getSessionInfoStore().getInfos(),
+ loader.getExecutionDataStore().getContents());
return visitor;
}
/**
* Calculates coverage for the given project and emits it to the report
* group without source references
- *
+ *
* @param visitor
* group visitor to emit the project's coverage to
* @param project
@@ -160,10 +126,10 @@ final class ReportSupport {
/**
* Calculates coverage for the given project and emits it to the report
* group including source references
- *
+ *
* @param visitor
* group visitor to emit the project's coverage to
- * @param bundeName
+ * @param bundleName
* name for this project in the report
* @param project
* the MavenProject
@@ -177,20 +143,20 @@ final class ReportSupport {
* if class files can't be read
*/
public void processProject(final IReportGroupVisitor visitor,
- final String bundeName, final MavenProject project,
+ final String bundleName, final MavenProject project,
final List<String> includes, final List<String> excludes,
final String srcEncoding) throws IOException {
- processProject(visitor, bundeName, project, includes, excludes,
+ processProject(visitor, bundleName, project, includes, excludes,
new SourceFileCollection(project, srcEncoding));
}
private void processProject(final IReportGroupVisitor visitor,
- final String bundeName, final MavenProject project,
+ final String bundleName, final MavenProject project,
final List<String> includes, final List<String> excludes,
final ISourceFileLocator locator) throws IOException {
final CoverageBuilder builder = new CoverageBuilder();
- final File classesDir = new File(project.getBuild()
- .getOutputDirectory());
+ final File classesDir = new File(
+ project.getBuild().getOutputDirectory());
if (classesDir.isDirectory()) {
final Analyzer analyzer = new Analyzer(
@@ -201,7 +167,7 @@ final class ReportSupport {
}
}
- final IBundleCoverage bundle = builder.getBundle(bundeName);
+ final IBundleCoverage bundle = builder.getBundle(bundleName);
logBundleInfo(bundle, builder.getNoMatchClasses());
visitor.visitBundle(bundle, locator);
@@ -214,7 +180,7 @@ final class ReportSupport {
Integer.valueOf(bundle.getClassCounter().getTotalCount())));
if (!nomatch.isEmpty()) {
log.warn(format(
- "Classes in bundle '%s' do no match with execution data. "
+ "Classes in bundle '%s' do not match with execution data. "
+ "For report generation the same class files must be used as at runtime.",
bundle.getName()));
for (final IClassCoverage c : nomatch) {
@@ -275,7 +241,8 @@ final class ReportSupport {
}
}
- private static List<File> getCompileSourceRoots(final MavenProject project) {
+ private static List<File> getCompileSourceRoots(
+ final MavenProject project) {
final List<File> result = new ArrayList<File>();
for (final Object path : project.getCompileSourceRoots()) {
result.add(resolvePath(project, (String) path));
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java b/jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java
index 0e238d69..13e86901 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/RestoreMojo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -22,19 +23,20 @@ import org.codehaus.plexus.util.FileUtils;
/**
* Restores original classes as they were before offline instrumentation.
- *
+ *
* @since 0.6.2
*/
@Mojo(name = "restore-instrumented-classes", defaultPhase = LifecyclePhase.PREPARE_PACKAGE, threadSafe = true)
public class RestoreMojo extends AbstractJacocoMojo {
@Override
- protected void executeMojo() throws MojoExecutionException,
- MojoFailureException {
- final File originalClassesDir = new File(getProject().getBuild()
- .getDirectory(), "generated-classes/jacoco");
- final File classesDir = new File(getProject().getBuild()
- .getOutputDirectory());
+ protected void executeMojo()
+ throws MojoExecutionException, MojoFailureException {
+ final File originalClassesDir = new File(
+ getProject().getBuild().getDirectory(),
+ "generated-classes/jacoco");
+ final File classesDir = new File(
+ getProject().getBuild().getOutputDirectory());
try {
FileUtils.copyDirectoryStructure(originalClassesDir, classesDir);
} catch (final IOException e) {
diff --git a/jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java b/jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java
index be4e5a1a..f9d711c0 100644
--- a/jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java
+++ b/jacoco-maven-plugin/src/org/jacoco/maven/RuleConfiguration.java
@@ -1,15 +1,16 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
* Kyle Lieber - implementation of CheckMojo
* Marc Hoffmann - redesign using report APIs
- *
+ *
*******************************************************************************/
package org.jacoco.maven;
@@ -22,7 +23,7 @@ import org.jacoco.report.check.Rule;
/**
* Wrapper for {@link Rule} objects to allow Maven style includes/excludes lists
- *
+ *
*/
public class RuleConfiguration {
@@ -37,8 +38,8 @@ public class RuleConfiguration {
/**
* @param element
- * element type this rule applies to
- * TODO: use ElementType directly once Maven 3 is required.
+ * element type this rule applies to TODO: use ElementType
+ * directly once Maven 3 is required.
*/
public void setElement(final String element) {
rule.setElement(ElementType.valueOf(element));
@@ -53,7 +54,7 @@ public class RuleConfiguration {
}
/**
- *
+ *
* @param excludes
* excludes patterns
*/
diff --git a/jacoco/assembly.xml b/jacoco/assembly.xml
index 056ede42..47e7bd9e 100644
--- a/jacoco/assembly.xml
+++ b/jacoco/assembly.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/jacoco/pom.xml b/jacoco/pom.xml
index 9afefc04..62ecad10 100644
--- a/jacoco/pom.xml
+++ b/jacoco/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
@@ -110,7 +111,7 @@
<configuration>
<rules>
<requireFilesSize>
- <maxsize>4400000</maxsize>
+ <maxsize>4500000</maxsize>
<minsize>3400000</minsize>
<files>
<file>${project.build.directory}/jacoco-${qualified.bundle.version}.zip</file>
diff --git a/org.jacoco.agent.rt.test/about.html b/org.jacoco.agent.rt.test/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.agent.rt.test/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.agent.rt.test/pom.xml b/org.jacoco.agent.rt.test/pom.xml
index 5394ee73..a76aacb1 100644
--- a/org.jacoco.agent.rt.test/pom.xml
+++ b/org.jacoco.agent.rt.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentTest.java
index f21968cc..95f2f138 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/AgentTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -19,7 +20,6 @@ import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.lang.management.ManagementFactory;
import javax.management.InstanceNotFoundException;
@@ -107,8 +107,9 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
}
@Test
- public void startup_should_log_exception() throws Exception {
+ public void startup_should_log_and_rethrow_exception() throws Exception {
final Exception expected = new Exception();
+
Agent agent = new Agent(options, this) {
@Override
IAgentOutput createAgentOutput() {
@@ -127,9 +128,13 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
}
};
- agent.startup();
-
- assertSame(expected, loggedException);
+ try {
+ agent.startup();
+ fail("Exception expected");
+ } catch (Exception actual) {
+ assertSame(expected, actual);
+ assertSame(expected, loggedException);
+ }
}
@Test
@@ -244,7 +249,7 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
}
@Test
- public void getSessionId_should_return_session_id() throws IOException {
+ public void getSessionId_should_return_session_id() throws Exception {
Agent agent = createAgent();
agent.startup();
@@ -253,7 +258,7 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
}
@Test
- public void setSessionId_should_modify_session_id() throws IOException {
+ public void setSessionId_should_modify_session_id() throws Exception {
Agent agent = createAgent();
agent.startup();
@@ -277,7 +282,7 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
@Test
public void getExecutionData_should_return_probes_and_session_id()
- throws IOException {
+ throws Exception {
Agent agent = createAgent();
agent.startup();
agent.getData().getExecutionData(Long.valueOf(0x12345678), "Foo", 1)
@@ -295,7 +300,7 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
@Test
public void getExecutionData_should_reset_probes_when_enabled()
- throws IOException {
+ throws Exception {
Agent agent = createAgent();
agent.startup();
final boolean[] probes = agent.getData()
@@ -310,7 +315,7 @@ public class AgentTest implements IExceptionLogger, IAgentOutput {
@Test
public void getExecutionData_should_not_reset_probes_when_disabled()
- throws IOException {
+ throws Exception {
Agent agent = createAgent();
agent.startup();
final boolean[] probes = agent.getData()
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ClassFileDumperTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ClassFileDumperTest.java
index 4d63684e..814c80b0 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ClassFileDumperTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ClassFileDumperTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java
index f99c1857..2dc23208 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ConfigLoaderTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java
index 5429570e..2faae3b1 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -103,31 +104,33 @@ public class CoverageTransformerTest {
@Test
public void testFilterClassLoaderNegative1() {
options.setInclBootstrapClasses(false);
- options.setExclClassloader("org.jacoco.agent.rt.internal.CoverageTransformerTest$*");
+ options.setExclClassloader(
+ "org.jacoco.agent.rt.internal.CoverageTransformerTest$*");
CoverageTransformer t = createTransformer();
ClassLoader myClassLoader = new ClassLoader(null) {
};
- assertFalse(t
- .filter(myClassLoader, "org/example/Foo", protectionDomain));
+ assertFalse(
+ t.filter(myClassLoader, "org/example/Foo", protectionDomain));
}
@Test
public void testFilterClassLoaderNegative2() {
options.setInclBootstrapClasses(true);
- options.setExclClassloader("org.jacoco.agent.rt.internal.CoverageTransformerTest$*");
+ options.setExclClassloader(
+ "org.jacoco.agent.rt.internal.CoverageTransformerTest$*");
CoverageTransformer t = createTransformer();
ClassLoader myClassLoader = new ClassLoader(null) {
};
- assertFalse(t
- .filter(myClassLoader, "org/example/Foo", protectionDomain));
+ assertFalse(
+ t.filter(myClassLoader, "org/example/Foo", protectionDomain));
}
@Test
public void testFilterIncludedClassPositive() {
options.setIncludes("org.jacoco.core.*:org.jacoco.agent.rt.*");
CoverageTransformer t = createTransformer();
- assertTrue(t.filter(classLoader, "org/jacoco/core/Foo",
- protectionDomain));
+ assertTrue(
+ t.filter(classLoader, "org/jacoco/core/Foo", protectionDomain));
}
@Test
@@ -158,8 +161,8 @@ public class CoverageTransformerTest {
public void testFilterExcludedClassNegative() {
options.setExcludes("*Test");
CoverageTransformer t = createTransformer();
- assertTrue(t.filter(classLoader, "org/jacoco/core/Foo",
- protectionDomain));
+ assertTrue(
+ t.filter(classLoader, "org/jacoco/core/Foo", protectionDomain));
}
@Test
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ExceptionRecorder.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ExceptionRecorder.java
index 7e8f5d2b..cd706f8e 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ExceptionRecorder.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/ExceptionRecorder.java
@@ -1,21 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
-import org.jacoco.agent.rt.internal.IExceptionLogger;
-
/**
* {@link IExceptionLogger} implementation for testing purposes.
*/
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties
index 62588a1f..0d4ff20a 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-subst-test.properties
@@ -2,4 +2,4 @@ key0=no$replace}
key1=${user.home}/coverage/jacoco-${java.version}.exec
key2=$${user.home}
key3=${user.home}}}
-key4=${does.not.exist} \ No newline at end of file
+key4=${does.not.exist}
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties
index 62cb680e..ba3207b5 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/agent-test.properties
@@ -1,2 +1,2 @@
output=tcpclient
-port=3333 \ No newline at end of file
+port=3333
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/ExecutorTestBase.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/ExecutorTestBase.java
index b276eef9..8e38dff9 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/ExecutorTestBase.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/ExecutorTestBase.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -43,7 +44,7 @@ public abstract class ExecutorTestBase {
/**
* Asserts that the given future blocks.
- *
+ *
* @param future
* future to test
* @throws Exception
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/FileOutputTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/FileOutputTest.java
index 7e29dde6..fbb5a8cd 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/FileOutputTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/FileOutputTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -17,7 +18,6 @@ import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
-import org.jacoco.agent.rt.internal.output.FileOutput;
import org.jacoco.core.runtime.AgentOptions;
import org.jacoco.core.runtime.RuntimeData;
import org.junit.Rule;
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocket.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocket.java
index 18e58cba..9257f24a 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocket.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocket.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -43,7 +44,7 @@ public class MockServerSocket extends ServerSocket {
/**
* Establishes a new mock connection. This method blocks until the other end
* of the connection has been accepted.
- *
+ *
* @return remote end of the mock connection
*/
public Socket connect() throws Exception {
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocketTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocketTest.java
index 942ce1a9..2915063e 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocketTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockServerSocketTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnection.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnection.java
index a06d07fd..e1588162 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnection.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnection.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnectionTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnectionTest.java
index 3f781785..b272730f 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnectionTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/MockSocketConnectionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpClientOutputTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpClientOutputTest.java
index 849e7a89..435129e5 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpClientOutputTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpClientOutputTest.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
* Marc R. Hoffmann - migration to mock socket
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpConnectionTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpConnectionTest.java
index 514675e0..2b40ee4f 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpConnectionTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpConnectionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -102,7 +103,7 @@ public class TcpConnectionTest extends ExecutorTestBase {
/**
* Local socket is closed while waiting for commands.
- *
+ *
* @throws Exception
*/
@Test
diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpServerOutputTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpServerOutputTest.java
index 6efeb67a..fb47b513 100644
--- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpServerOutputTest.java
+++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/output/TcpServerOutputTest.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
* Marc R. Hoffmann - migration to mock socket
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -84,7 +85,8 @@ public class TcpServerOutputTest {
@Test
public void testWriteExecutionData() throws Exception {
- data.getExecutionData(Long.valueOf(0x12345678), "Foo", 42).getProbes()[0] = true;
+ data.getExecutionData(Long.valueOf(0x12345678), "Foo", 42)
+ .getProbes()[0] = true;
data.setSessionId("stubid");
final Socket socket = serverSocket.connect();
diff --git a/org.jacoco.agent.rt/about.html b/org.jacoco.agent.rt/about.html
index 801516be..858277f3 100644
--- a/org.jacoco.agent.rt/about.html
+++ b/org.jacoco.agent.rt/about.html
@@ -9,17 +9,17 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
@@ -30,44 +30,7 @@
out below.
</p>
-<h4>ASM 3.x</h4>
-
-<p>
- This plug-in contains the <a href="http://asm.objectweb.org/">ASM</a> library
- which is subject to the terms and conditions of the following license:
-</p>
-
-<pre>
-Copyright (c) 2000-2005 INRIA, France Telecom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-</pre>
+${asm.license}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.agent.rt/pom.xml b/org.jacoco.agent.rt/pom.xml
index 605f4491..7fab4ce1 100644
--- a/org.jacoco.agent.rt/pom.xml
+++ b/org.jacoco.agent.rt/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java b/org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java
index f2f86a13..34ed71b4 100644
--- a/org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java
+++ b/org.jacoco.agent.rt/src/com/vladium/emma/rt/RT.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package com.vladium.emma.rt;
@@ -20,7 +21,7 @@ import java.io.OutputStream;
* Compatibility layer for the EMMA runtime which allows to trigger dumps
* through EMMA APIs. Note that even this class emulates an EMMA API the files
* written are in JaCoCo execution data format.
- *
+ *
* @deprecated Use {@link org.jacoco.agent.rt.IAgent} instead.
*/
@Deprecated
@@ -32,7 +33,7 @@ public final class RT {
/**
* Writes the current execution data to the given file in JaCoCo execution
* data format.
- *
+ *
* @param outFile
* file to write execution data to
* @param merge
@@ -44,12 +45,12 @@ public final class RT {
* in case of problems with the file output
*/
@SuppressWarnings("unused")
- public static void dumpCoverageData(final File outFile,
- final boolean merge, final boolean stopDataCollection)
- throws IOException {
+ public static void dumpCoverageData(final File outFile, final boolean merge,
+ final boolean stopDataCollection) throws IOException {
final OutputStream out = new FileOutputStream(outFile, merge);
try {
- out.write(org.jacoco.agent.rt.RT.getAgent().getExecutionData(false));
+ out.write(
+ org.jacoco.agent.rt.RT.getAgent().getExecutionData(false));
} finally {
out.close();
}
@@ -58,7 +59,7 @@ public final class RT {
/**
* Writes the current execution data to the given file in JaCoCo execution
* data format. If the file already exists new data is appended.
- *
+ *
* @param outFile
* file to write execution data to
* @param stopDataCollection
diff --git a/org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java b/org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java
index 0da2e7cc..454e9d08 100644
--- a/org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java
+++ b/org.jacoco.agent.rt/src/com/vladium/emma/rt/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java
index 4320ae3a..6f2087e9 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/IAgent.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -20,21 +21,21 @@ public interface IAgent {
/**
* Returns version of JaCoCo.
- *
+ *
* @return version of JaCoCo
*/
String getVersion();
/**
* Returns current a session identifier.
- *
+ *
* @return current session identifier
*/
String getSessionId();
/**
* Sets a session identifier.
- *
+ *
* @param id
* new session identifier
*/
@@ -47,7 +48,7 @@ public interface IAgent {
/**
* Returns current execution data.
- *
+ *
* @param reset
* if <code>true</code> the current execution data is cleared
* afterwards
@@ -58,7 +59,7 @@ public interface IAgent {
/**
* Triggers a dump of the current execution data through the configured
* output.
- *
+ *
* @param reset
* if <code>true</code> the current execution data is cleared
* afterwards
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java
index c99b8077..9474dc0c 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/RT.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt;
@@ -23,7 +24,7 @@ public final class RT {
/**
* Returns the agent instance of the JaCoCo runtime in this JVM.
- *
+ *
* @return agent instance
* @throws IllegalStateException
* if no Agent has been started yet
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
index c4bf874a..3d8e5f66 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Agent.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -37,12 +38,13 @@ public class Agent implements IAgent {
/**
* Returns a global instance which is already started. If the method is
* called the first time the instance is created with the given options.
- *
+ *
* @param options
* options to configure the instance
* @return global instance
*/
- public static synchronized Agent getInstance(final AgentOptions options) {
+ public static synchronized Agent getInstance(final AgentOptions options)
+ throws Exception {
// BEGIN android-change
return getInstance(options, new RuntimeData());
// END android-change
@@ -60,7 +62,8 @@ public class Agent implements IAgent {
* the runtime data to reuse
* @return global instance
*/
- public static synchronized Agent getInstance(final AgentOptions options, RuntimeData data) {
+ public static synchronized Agent getInstance(final AgentOptions options, RuntimeData data)
+ throws Exception {
final Agent agent = new Agent(options, IExceptionLogger.SYSTEM_ERR, data);
agent.startup();
Runtime.getRuntime().addShutdownHook(new Thread() {
@@ -104,7 +107,7 @@ public class Agent implements IAgent {
/**
* Creates a new agent with the given agent options.
- *
+ *
* @param options
* agent options
* @param logger
@@ -136,7 +139,7 @@ public class Agent implements IAgent {
/**
* Returns the runtime data object created by this agent
- *
+ *
* @return runtime data for this agent instance
*/
public RuntimeData getData() {
@@ -145,9 +148,11 @@ public class Agent implements IAgent {
/**
* Initializes this agent.
- *
+ *
+ * @throws Exception
+ * in case something cannot be initialized
*/
- public void startup() {
+ public void startup() throws Exception {
try {
String sessionId = options.getSessionId();
if (sessionId == null) {
@@ -163,6 +168,7 @@ public class Agent implements IAgent {
}
} catch (final Exception e) {
logger.logExeption(e);
+ throw e;
}
}
@@ -185,7 +191,7 @@ public class Agent implements IAgent {
/**
* Create output implementation as given by the agent options.
- *
+ *
* @return configured controller implementation
*/
IAgentOutput createAgentOutput() {
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ClassFileDumper.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ClassFileDumper.java
index 56f74c29..1336fc2b 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ClassFileDumper.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ClassFileDumper.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -27,7 +28,7 @@ class ClassFileDumper {
/**
* Create a new dumper for the given location.
- *
+ *
* @param location
* relative path to dump directory. <code>null</code> if no dumps
* should be written
@@ -43,7 +44,7 @@ class ClassFileDumper {
/**
* Dumps the given binary content under the given name if a non-
* <code>null</code> location has been specified.
- *
+ *
* @param name
* qualified class name in VM notation
* @param contents
@@ -65,8 +66,8 @@ class ClassFileDumper {
}
outputdir.mkdirs();
final Long id = Long.valueOf(CRC64.classId(contents));
- final File file = new File(outputdir, String.format(
- "%s.%016x.class", localname, id));
+ final File file = new File(outputdir,
+ String.format("%s.%016x.class", localname, id));
final OutputStream out = new FileOutputStream(file);
out.write(contents);
out.close();
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ConfigLoader.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ConfigLoader.java
index 9020c2fc..3925d035 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ConfigLoader.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/ConfigLoader.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java
index ef3300cd..0fa6c3fb 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/CoverageTransformer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -51,7 +52,7 @@ public class CoverageTransformer implements ClassFileTransformer {
/**
* New transformer with the given delegates.
- *
+ *
* @param runtime
* coverage runtime
* @param options
@@ -101,7 +102,7 @@ public class CoverageTransformer implements ClassFileTransformer {
/**
* Checks whether this class should be instrumented.
- *
+ *
* @param loader
* loader for the class
* @param classname
@@ -117,7 +118,8 @@ public class CoverageTransformer implements ClassFileTransformer {
return false;
}
} else {
- if (!inclNoLocationClasses && !hasSourceLocation(protectionDomain)) {
+ if (!inclNoLocationClasses
+ && !hasSourceLocation(protectionDomain)) {
return false;
}
if (exclClassloader.matches(loader.getClass().getName())) {
@@ -127,15 +129,15 @@ public class CoverageTransformer implements ClassFileTransformer {
return !classname.startsWith(AGENT_PREFIX) &&
- includes.matches(classname) &&
+ includes.matches(classname) &&
- !excludes.matches(classname);
+ !excludes.matches(classname);
}
/**
* Checks whether this protection domain is associated with a source
* location.
- *
+ *
* @param protectionDomain
* protection domain to check (or <code>null</code>)
* @return <code>true</code> if a source location is defined
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java
index 82cd19bd..8733f0fa 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/IExceptionLogger.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -28,7 +29,7 @@ public interface IExceptionLogger {
/**
* Logs the given exception.
- *
+ *
* @param ex
* exception to log
*/
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java
index 6c49c0c1..f9adf570 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/JmxRegistration.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
index 99a054e7..b2bfab4b 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/Offline.java
@@ -1,16 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
+// BEGIN android-change
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
@@ -18,14 +20,17 @@ import java.nio.channels.FileChannel;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.Map;
+// END android-change
import java.util.Properties;
+// BEGIN android-change
import org.jacoco.core.data.ExecutionData;
import org.jacoco.core.data.ExecutionDataWriter;
import org.jacoco.core.data.ExecutionDataDelegate;
import org.jacoco.core.data.IExecutionData;
import org.jacoco.core.data.ExecutionDataStore;
import org.jacoco.core.data.MappedExecutionData;
+// END android-change
import org.jacoco.core.runtime.AgentOptions;
import org.jacoco.core.runtime.RuntimeData;
@@ -36,28 +41,35 @@ import org.jacoco.core.runtime.RuntimeData;
public final class Offline {
// BEGIN android-change
- // private static final RuntimeData DATA;
private static final Map<Long, ExecutionDataDelegate> DATA = new HashMap<Long, ExecutionDataDelegate>();
private static FileChannel CHANNEL;
// END android-change
private static final String CONFIG_RESOURCE = "/jacoco-agent.properties";
- // BEGIN android-change
- // static {
- // final Properties config = ConfigLoader.load(CONFIG_RESOURCE,
- // System.getProperties());
- // DATA = Agent.getInstance(new AgentOptions(config)).getData();
- // }
- // END android-change
-
private Offline() {
// no instances
}
// BEGIN android-change
+ //private static RuntimeData data;
+ /*
+ private static synchronized RuntimeData getRuntimeData() {
+ if (data == null) {
+ final Properties config = ConfigLoader.load(CONFIG_RESOURCE,
+ System.getProperties());
+ try {
+ data = Agent.getInstance(new AgentOptions(config)).getData();
+ } catch (final Exception e) {
+ throw new RuntimeException("Failed to initialize JaCoCo.", e);
+ }
+ }
+ return data;
+ }
+ */
+
/**
* API for offline instrumented classes.
- *
+ *
* @param classid
* class identifier
* @param classname
@@ -68,8 +80,9 @@ public final class Offline {
*/
public static IExecutionData getExecutionData(final long classid,
final String classname, final int probecount) {
- // return DATA.getExecutionData(Long.valueOf(classid), classname,
- // probecount).getProbes();
+ //return getRuntimeData()
+ // .getExecutionData(Long.valueOf(classid), classname, probecount)
+ // .getProbes();
synchronized (DATA) {
ExecutionDataDelegate entry = DATA.get(classid);
if (entry == null) {
@@ -125,7 +138,6 @@ public final class Offline {
// Read /proc/self and resolve it to obtain its pid.
return Integer.parseInt(new File("/proc/self").getCanonicalFile().getName());
}
- // END android-change
/**
* Creates a default agent, using config loaded from the classpath resource and the system
@@ -143,7 +155,11 @@ public final class Offline {
for (IExecutionData data : DATA.values()) {
store.put(data);
}
- return Agent.getInstance(new AgentOptions(config), new RuntimeData(store));
+ try {
+ return Agent.getInstance(new AgentOptions(config), new RuntimeData(store));
+ } catch (final Exception e) {
+ throw new RuntimeException("Failed to initialize JaCoCo.", e);
+ }
}
}
// END android-change
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
index 205fa5b6..31da3add 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/PreMain.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal;
@@ -33,7 +34,7 @@ public final class PreMain {
/**
* This method is called by the JVM to initialize Java agents.
- *
+ *
* @param options
* agent options
* @param inst
@@ -61,7 +62,8 @@ public final class PreMain {
return new InjectedClassRuntime(Object.class, "$JaCoCo");
}
- return ModifiedSystemClassRuntime.createFor(inst, "java/lang/UnknownError");
+ return ModifiedSystemClassRuntime.createFor(inst,
+ "java/lang/UnknownError");
}
/**
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/FileOutput.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/FileOutput.java
index dde78609..21b994fe 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/FileOutput.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/FileOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -36,8 +37,8 @@ public class FileOutput implements IAgentOutput {
private boolean append;
- public final void startup(final AgentOptions options, final RuntimeData data)
- throws IOException {
+ public final void startup(final AgentOptions options,
+ final RuntimeData data) throws IOException {
this.data = data;
this.destFile = new File(options.getDestfile()).getAbsoluteFile();
this.append = options.getAppend();
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java
index b3d0e17d..5f482171 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/IAgentOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -25,7 +26,7 @@ public interface IAgentOutput {
/**
* Configure the agent controller with the supplied options and connect it
* to the coverage runtime
- *
+ *
* @param options
* Options used to configure the agent controller
* @param data
@@ -37,7 +38,7 @@ public interface IAgentOutput {
/**
* Shutdown the agent controller and clean up any resources it has created.
- *
+ *
* @throws Exception
* in case shutdown fails
*/
@@ -46,7 +47,7 @@ public interface IAgentOutput {
/**
* Write all execution data in the runtime to a location determined by the
* agent controller. This method should only be called by the Agent
- *
+ *
* @param reset
* if <code>true</code> execution data is cleared afterwards
* @throws IOException
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java
index 85a00556..27066e54 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/NoneOutput.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mandrikov Evgeny - initial API and implementation
@@ -19,7 +20,8 @@ import org.jacoco.core.runtime.RuntimeData;
*/
public class NoneOutput implements IAgentOutput {
- public final void startup(final AgentOptions options, final RuntimeData data) {
+ public final void startup(final AgentOptions options,
+ final RuntimeData data) {
// Nothing to do
}
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpClientOutput.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpClientOutput.java
index a3b027fd..f88a279e 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpClientOutput.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpClientOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -19,8 +20,8 @@ import org.jacoco.core.runtime.AgentOptions;
import org.jacoco.core.runtime.RuntimeData;
/**
- * Output that connects to a TCP port. This controller uses the following
- * agent options:
+ * Output that connects to a TCP port. This controller uses the following agent
+ * options:
* <ul>
* <li>address</li>
* <li>port</li>
@@ -36,7 +37,7 @@ public class TcpClientOutput implements IAgentOutput {
/**
* New controller instance.
- *
+ *
* @param logger
* logger to use in case of exceptions is spawned threads
*/
@@ -74,7 +75,7 @@ public class TcpClientOutput implements IAgentOutput {
/**
* Open a socket based on the given configuration.
- *
+ *
* @param options
* address and port configuration
* @return opened socket
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpConnection.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpConnection.java
index ccba1f22..bc0de09f 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpConnection.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpConnection.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -50,7 +51,7 @@ class TcpConnection implements IRemoteCommandVisitor {
/**
* Processes all requests for this session until the socket is closed.
- *
+ *
* @throws IOException
* in case of problems whith the connection
*/
@@ -72,7 +73,7 @@ class TcpConnection implements IRemoteCommandVisitor {
/**
* Dumps the current execution data if the connection is already initialized
* and the underlying socket is still open.
- *
+ *
* @param reset
* if <code>true</code> execution data is cleared afterwards
* @throws IOException
@@ -85,7 +86,7 @@ class TcpConnection implements IRemoteCommandVisitor {
/**
* Closes the underlying socket if not closed yet.
- *
+ *
* @throws IOException
*/
public void close() throws IOException {
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpServerOutput.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpServerOutput.java
index eeaf4a34..a2be3c59 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpServerOutput.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/internal/output/TcpServerOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent.rt.internal.output;
@@ -40,7 +41,7 @@ public class TcpServerOutput implements IAgentOutput {
/**
* New controller instance.
- *
+ *
* @param logger
* logger to use in case of exceptions is spawned threads
*/
@@ -94,7 +95,7 @@ public class TcpServerOutput implements IAgentOutput {
/**
* Open a server socket based on the given configuration.
- *
+ *
* @param options
* address and port configuration
* @return opened server socket
@@ -108,7 +109,7 @@ public class TcpServerOutput implements IAgentOutput {
/**
* Returns the {@link InetAddress} object to open the server socket on.
- *
+ *
* @param address
* address specified as a string
* @return address to open the server socket
diff --git a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java
index 08a182c6..fb51418b 100644
--- a/org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java
+++ b/org.jacoco.agent.rt/src/org/jacoco/agent/rt/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.agent.test/about.html b/org.jacoco.agent.test/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.agent.test/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.agent.test/pom.xml b/org.jacoco.agent.test/pom.xml
index da758be0..3eafa813 100644
--- a/org.jacoco.agent.test/pom.xml
+++ b/org.jacoco.agent.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.agent.test/src/org/jacoco/agent/AgentJarTest.java b/org.jacoco.agent.test/src/org/jacoco/agent/AgentJarTest.java
index c1274893..dd385d41 100644
--- a/org.jacoco.agent.test/src/org/jacoco/agent/AgentJarTest.java
+++ b/org.jacoco.agent.test/src/org/jacoco/agent/AgentJarTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent;
diff --git a/org.jacoco.agent/about.html b/org.jacoco.agent/about.html
index ebd81479..858277f3 100644
--- a/org.jacoco.agent/about.html
+++ b/org.jacoco.agent/about.html
@@ -9,17 +9,17 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
@@ -30,44 +30,7 @@
out below.
</p>
-<h4>ASM</h4>
-
-<p>
- This plug-in contains the <a href="http://asm.objectweb.org/">ASM</a> library
- which is subject to the terms and conditions of the following license:
-</p>
-
-<pre>
-Copyright (c) 2012 France Télécom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-</pre>
+${asm.license}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.agent/pom.xml b/org.jacoco.agent/pom.xml
index ac18ecad..3ebc5f7b 100644
--- a/org.jacoco.agent/pom.xml
+++ b/org.jacoco.agent/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.agent/src/org/jacoco/agent/AgentJar.java b/org.jacoco.agent/src/org/jacoco/agent/AgentJar.java
index 9e34dd90..93c41f26 100644
--- a/org.jacoco.agent/src/org/jacoco/agent/AgentJar.java
+++ b/org.jacoco.agent/src/org/jacoco/agent/AgentJar.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.agent;
@@ -37,7 +38,7 @@ public final class AgentJar {
/**
* Returns a URL pointing to the JAR file.
- *
+ *
* @return URL of the JAR file
*/
public static URL getResource() {
@@ -50,7 +51,7 @@ public final class AgentJar {
/**
* Returns the content of the JAR file as a stream.
- *
+ *
* @return content of the JAR file
*/
public static InputStream getResourceAsStream() {
@@ -64,7 +65,7 @@ public final class AgentJar {
/**
* Extract the JaCoCo agent JAR and put it into a temporary location. This
* file should be deleted on exit, but may not if the VM is terminated
- *
+ *
* @return Location of the Agent Jar file in the local file system. The file
* should exist and be readable.
* @throws IOException
@@ -81,7 +82,7 @@ public final class AgentJar {
/**
* Extract the JaCoCo agent JAR and put it into the specified location.
- *
+ *
* @param destination
* Location to write JaCoCo Agent Jar to. Must be writeable
* @throws IOException
@@ -109,7 +110,7 @@ public final class AgentJar {
/**
* Close a stream ignoring any error
- *
+ *
* @param closeable
* stream to be closed
*/
@@ -122,8 +123,8 @@ public final class AgentJar {
}
}
- private static final String ERRORMSG = String.format(
- "The resource %s has not been found. Please see "
+ private static final String ERRORMSG = String
+ .format("The resource %s has not been found. Please see "
+ "/org.jacoco.agent/README.TXT for details.", RESOURCE);
}
diff --git a/org.jacoco.agent/src/org/jacoco/agent/package-info.java b/org.jacoco.agent/src/org/jacoco/agent/package-info.java
index 15254a2b..350948e8 100644
--- a/org.jacoco.agent/src/org/jacoco/agent/package-info.java
+++ b/org.jacoco.agent/src/org/jacoco/agent/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.ant.test/pom.xml b/org.jacoco.ant.test/pom.xml
index 6686ae23..27bcb736 100644
--- a/org.jacoco.ant.test/pom.xml
+++ b/org.jacoco.ant.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
@@ -42,8 +43,16 @@
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit4</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/org.jacoco.ant.test/src/TestTargetInDefault.java b/org.jacoco.ant.test/src/TestTargetInDefault.java
index a3ef958a..75bdd9d8 100644
--- a/org.jacoco.ant.test/src/TestTargetInDefault.java
+++ b/org.jacoco.ant.test/src/TestTargetInDefault.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java
index 820be37b..692b03a5 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class AgentTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml
index 4049b764..516c4ca6 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/AgentTaskTest.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
<project name="JaCoCo Agent Task Tests" xmlns:au="antlib:org.apache.ant.antunit" xmlns:jacoco="antlib:org.jacoco.ant">
-
+
<target name="testCoverageAgent">
<jacoco:agent property="jacocoagent" append="false" destfile="test.exec"
exclClassLoader="EvilClassLoader" includes="org.example.*" excludes="*Test"
@@ -39,12 +40,12 @@
<property name="dump.dir" location="target/dump"/>
<au:assertPropertyContains name="jacocoagent" value="classdumpdir=${dump.dir}"/>
</target>
-
+
<target name="testCoverageAgentDisabled">
<jacoco:agent enabled="false" property="jacocoagent" append="false" destfile="${basedir}/test.exec" exclClassLoader="sun.reflect.DelegatingClassLoader"/>
<au:assertPropertyEquals name="jacocoagent" value=""/>
</target>
-
+
<target name="testCoverageAgentWithNoProperty">
<au:expectfailure expectedMessage="Property is mandatory">
<jacoco:agent/>
@@ -62,5 +63,5 @@
<jacoco:agent property="agent2"/>
<au:assertEquals expected="${agent1}" actual="${agent2}"/>
</target>
-
+
</project>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/AntFilesLocatorTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/AntFilesLocatorTest.java
index cba5f1ad..7fb047aa 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/AntFilesLocatorTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/AntFilesLocatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -62,8 +63,8 @@ public class AntFilesLocatorTest {
private Resource createFile(String path) throws IOException {
final File file = new File(folder.getRoot(), path);
file.getParentFile().mkdirs();
- final Writer writer = new OutputStreamWriter(
- new FileOutputStream(file), "UTF-8");
+ final Writer writer = new OutputStreamWriter(new FileOutputStream(file),
+ "UTF-8");
writer.write("Source");
writer.close();
return new FileResource(folder.getRoot(), path);
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/AntResourcesLocatorTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/AntResourcesLocatorTest.java
index 50e31189..f6b8dcb7 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/AntResourcesLocatorTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/AntResourcesLocatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -120,11 +121,12 @@ public class AntResourcesLocatorTest {
assertContent("BBB", source);
}
- private Resource createFile(String path, String content) throws IOException {
+ private Resource createFile(String path, String content)
+ throws IOException {
final File file = new File(folder.getRoot(), path);
file.getParentFile().mkdirs();
- final Writer writer = new OutputStreamWriter(
- new FileOutputStream(file), "UTF-8");
+ final Writer writer = new OutputStreamWriter(new FileOutputStream(file),
+ "UTF-8");
writer.write(content);
writer.close();
return new FileResource(folder.getRoot(), path);
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java
index 3ee4454e..7002431e 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class CoverageTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
index 4e34e899..de7cb099 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/CoverageTaskTest.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
<project name="JaCoCo Coverage Task Tests" xmlns:au="antlib:org.apache.ant.antunit" xmlns:jacoco="antlib:org.jacoco.ant">
-
+
<target name="setUp">
<tempfile property="temp.dir" prefix="jacocoTest" destdir="${java.io.tmpdir}" />
<mkdir dir="${temp.dir}"/>
@@ -22,7 +23,7 @@
<target name="tearDown">
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
</target>
-
+
<target name="testNoSubTasks">
<au:expectfailure expectedMessage="A child task must be supplied for the coverage task">
<jacoco:coverage/>
@@ -40,10 +41,10 @@
</java>
</jacoco:coverage>
</au:expectfailure>
-
+
<au:assertLogDoesntContain text="Target executed"/>
</target>
-
+
<target name="testInvalidSubTask">
<au:expectfailure expectedMessage="jar is not a valid child of the coverage task">
<jacoco:coverage>
@@ -58,7 +59,7 @@
<classpath path="${org.jacoco.ant.coverageTaskTest.classes.dir}"/>
</java>
</jacoco:coverage>
-
+
<au:assertLogContains text="Enhancing java with coverage"/>
<au:assertFileExists file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
@@ -71,19 +72,19 @@
<classpath path="${org.jacoco.ant.coverageTaskTest.classes.dir}"/>
</java>
</jacoco:coverage>
-
+
<au:assertLogContains text="Enhancing java with coverage"/>
<au:assertFileExists file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
</target>
-
+
<target name="testCoverageOfForkedJavaDisabled">
<jacoco:coverage enabled="false" destfile="${exec.file}">
<java classname="org.jacoco.ant.TestTarget" fork="true" failonerror="true">
<classpath path="${org.jacoco.ant.coverageTaskTest.classes.dir}"/>
</java>
</jacoco:coverage>
-
+
<au:assertLogDoesntContain text="Enhancing java with coverage"/>
<au:assertFileDoesntExist file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
@@ -97,7 +98,7 @@
</java>
</jacoco:coverage>
</au:expectfailure>
-
+
<au:assertLogDoesntContain text="Target executed"/>
</target>
@@ -108,12 +109,12 @@
<test name="org.jacoco.ant.TestTarget" />
</junit>
</jacoco:coverage>
-
+
<au:assertLogContains text="Enhancing junit with coverage"/>
<au:assertFileExists file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
</target>
-
+
<target name="testCoverageOfForkedJUnitDisabled">
<jacoco:coverage enabled="false" destfile="${exec.file}">
<junit fork="true" haltonfailure="true" showoutput="true">
@@ -121,7 +122,7 @@
<test name="org.jacoco.ant.TestTarget" />
</junit>
</jacoco:coverage>
-
+
<au:assertLogDoesntContain text="Enhancing junit with coverage"/>
<au:assertFileDoesntExist file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
@@ -136,7 +137,7 @@
</junit>
</jacoco:coverage>
</au:expectfailure>
-
+
<au:assertLogDoesntContain text="Target executed"/>
</target>
@@ -146,11 +147,11 @@
<classpath path="${org.jacoco.ant.coverageTaskTest.classes.dir}"/>
</java>
</jacoco:coverage>
-
+
<au:assertLogContains text="Enhancing java with coverage"/>
<au:assertFileExists file="${exec.file}"/>
<au:assertLogContains text="Target executed"/>
-
+
<java classname="org.jacoco.ant.DumpExecClassNames" classpath="${java.class.path}" failonerror="true">
<arg value="${exec.file}" />
</java>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java b/org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java
index d7787eb5..ad308e95 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/CreateExecFiles.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java b/org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java
index de45b2b1..f1dbc452 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/DumpExecClassNames.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java
index a145f889..5d504457 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class DumpTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml
index 419ba23e..d3b23b3d 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskTest.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
@@ -22,15 +23,15 @@
<target name="tearDown">
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
</target>
-
-
+
+
<target name="testNoServer">
<au:expectfailure expectedMessage="Unable to dump coverage data">
<jacoco:dump dump="true" destfile="${exec.file}" retryCount="0"/>
</au:expectfailure>
<au:assertFileDoesntExist file="${exec.file}"/>
</target>
-
+
<target name="testUnknownHost">
<au:expectfailure expectedMessage="Unable to dump coverage data">
<!--
@@ -49,12 +50,12 @@
</au:expectfailure>
<au:assertFileDoesntExist file="${exec.file}"/>
</target>
-
+
<target name="testNoDestFile">
<au:expectfailure expectedMessage="Destination file is required when dumping execution data">
<jacoco:dump dump="true"/>
</au:expectfailure>
<au:assertFileDoesntExist file="${exec.file}"/>
</target>
-
+
</project>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java
index 1e4277d0..e6a37287 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class DumpTaskWithServerTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml
index 6a3b9ddf..89924e3f 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/DumpTaskWithServerTest.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
@@ -18,7 +19,7 @@
<mkdir dir="${temp.dir}"/>
<property name="exec.file" location="${temp.dir}/exec.file" />
<property name="term.file" location="${temp.dir}/term.file" />
-
+
<jacoco:coverage output="tcpserver" port="6300">
<java classname="org.jacoco.ant.TestTarget" spawn="true" fork="true" maxmemory="16m">
<classpath path="${org.jacoco.ant.dumpTaskWithServerTest.classes.dir}"/>
@@ -26,30 +27,32 @@
<arg value="${term.file}"/>
</java>
</jacoco:coverage>
-
- <waitfor maxwait="1" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond">
+
+ <waitfor maxwait="60" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond" timeoutproperty="timeout">
<socket server="localhost" port="6300"/>
</waitfor>
+ <fail message="Server startup timeout." if="timeout"/>
</target>
<target name="tearDown">
<touch file="${term.file}"/>
- <waitfor maxwait="5" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond">
+ <waitfor maxwait="60" maxwaitunit="second" checkevery="10" checkeveryunit="millisecond" timeoutproperty="timeout">
<not>
<socket server="localhost" port="6300"/>
</not>
</waitfor>
+ <fail message="Server shutdown timeout." if="timeout"/>
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
</target>
-
-
+
+
<target name="testDump">
<jacoco:dump dump="true" destfile="${exec.file}"/>
-
+
<au:assertFileExists file="${exec.file}"/>
<au:assertLogContains text="Dumping execution data to ${exec.file}"/>
</target>
-
+
<target name="testNoDumpOrReset">
<jacoco:dump dump="false" reset="false"/>
@@ -58,15 +61,15 @@
<target name="testResetOnly">
<jacoco:dump dump="false" reset="true"/>
-
+
<au:assertLogDoesntContain text="Dumping execution data to"/>
</target>
-
+
<target name="testNoDumpWithFileSet">
<jacoco:dump dump="false" destfile="${exec.file}"/>
-
+
<au:assertLogDoesntContain text="Dumping execution data to"/>
<au:assertFileDoesntExist file="${exec.file}"/>
</target>
-
+
</project>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.java
index 14ca20b3..073b9d29 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.java
@@ -1,26 +1,27 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
import java.io.IOException;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.jacoco.agent.AgentJar;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class InstrumentTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
index dbe2306c..110d3753 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/InstrumentTaskTest.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Marc R. Hoffmann - initial API and implementation
-->
@@ -22,7 +23,7 @@
<target name="tearDown">
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
</target>
-
+
<target name="testInstrumentNoDestination">
<au:expectfailure expectedMessage="Destination directory must be supplied">
<jacoco:instrument/>
@@ -47,18 +48,18 @@
<dirset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**"/>
</jacoco:instrument>
</target>
-
+
<target name="testInstrumentRemoveSignatures">
<property name="lib.dir" location="${temp.dir}/lib"/>
<property name="instr.dir" location="${temp.dir}/instr"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${instr.dir}"/>
-
+
<jar destfile="${lib.dir}/test.jar">
<fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/>
</jar>
<signjar jar="${lib.dir}/test.jar" keystore="${basedir}/data/keystore.jks" alias="test" storepass="password"/>
-
+
<jacoco:instrument destdir="${instr.dir}">
<fileset dir="${lib.dir}" includes="*.jar"/>
</jacoco:instrument>
@@ -67,19 +68,19 @@
<unzip src="${instr.dir}/test.jar" dest="${instr.dir}"/>
<au:assertFileDoesntExist file="${instr.dir}/META-INF/TEST.RSA" />
<au:assertFileDoesntExist file="${instr.dir}/META-INF/TEST.SF" />
- </target>
+ </target>
<target name="testInstrumentKeepSignatures">
<property name="lib.dir" location="${temp.dir}/lib"/>
<property name="instr.dir" location="${temp.dir}/instr"/>
<mkdir dir="${lib.dir}"/>
<mkdir dir="${instr.dir}"/>
-
+
<jar destfile="${lib.dir}/test.jar">
<fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/>
</jar>
<signjar jar="${lib.dir}/test.jar" keystore="${basedir}/data/keystore.jks" alias="test" storepass="password"/>
-
+
<jacoco:instrument destdir="${instr.dir}" removesignatures="false">
<fileset dir="${lib.dir}" includes="*.jar"/>
</jacoco:instrument>
@@ -88,8 +89,8 @@
<unzip src="${instr.dir}/test.jar" dest="${instr.dir}"/>
<au:assertFileExists file="${instr.dir}/META-INF/TEST.RSA" />
<au:assertFileExists file="${instr.dir}/META-INF/TEST.SF" />
- </target>
-
+ </target>
+
<target name="testInstrumentAndRunWithConfigFile">
<jacoco:instrument destdir="${temp.dir}">
<fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/>
@@ -106,7 +107,7 @@
</java>
<au:assertFileExists file="${temp.dir}/test.exec" />
</target>
-
+
<target name="testInstrumentAndRunWithSystemProperties">
<jacoco:instrument destdir="${temp.dir}">
<fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/>
@@ -123,5 +124,24 @@
</java>
<au:assertFileExists file="${temp.dir}/test.exec" />
</target>
-
+
+ <target name="testInstrumentWithRuntimeStartupFailure">
+ <jacoco:instrument destdir="${temp.dir}">
+ <fileset dir="${org.jacoco.ant.instrumentTaskTest.classes.dir}" includes="**/*.class"/>
+ </jacoco:instrument>
+ <au:assertLogContains text="Instrumented 15 classes to ${temp.dir}"/>
+ <au:assertFileExists file="${temp.dir}/org/jacoco/ant/InstrumentTaskTest.class" />
+
+ <java classname="org.jacoco.ant.TestTarget" failonerror="false" fork="true">
+ <sysproperty key="jacoco-agent.output" value="tcpserver"/>
+ <sysproperty key="jacoco-agent.port" value="foo"/>
+ <classpath>
+ <pathelement path="${org.jacoco.ant.instrumentTaskTest.agent.file}"/>
+ <pathelement path="${temp.dir}"/>
+ </classpath>
+ </java>
+ <au:assertLogContains text="java.lang.RuntimeException: Failed to initialize JaCoCo."/>
+ <au:assertLogContains text="java.lang.NumberFormatException: For input string: &quot;foo&quot;"/>
+ </target>
+
</project>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java
index 43615bbd..c5732ec9 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class MergeTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml
index d61f9225..8ad47eb9 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/MergeTaskTest.xml
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
@@ -22,30 +23,30 @@
<target name="tearDown">
<delete dir="${temp.dir}" quiet="false" failonerror="true"/>
</target>
-
+
<target name="testMergeNoDestination">
<au:expectfailure expectedMessage="Destination file must be supplied">
<jacoco:merge/>
</au:expectfailure>
</target>
-
+
<target name="testMergeToDirectory">
<au:expectfailure expectedMessage="Unable to write merged file ${temp.dir}">
<jacoco:merge destfile="${temp.dir}"/>
</au:expectfailure>
</target>
-
+
<target name="testMergeEmptySet">
<jacoco:merge destfile="${exec.file}"/>
-
+
<au:assertFileExists file="${exec.file}"/>
</target>
-
+
<target name="testMergeMultipleFiles">
<jacoco:merge destfile="${exec.file}">
<fileset dir="${basedir}/data" includes="*.exec"/>
</jacoco:merge>
-
+
<property name="sample1.file" location="${basedir}/data/sample1.exec"/>
<property name="sample2.file" location="${basedir}/data/sample2.exec"/>
<au:assertLogContains text="Loading execution data file ${sample1.file}"/>
@@ -53,7 +54,7 @@
<au:assertLogContains text="Writing merged execution data to ${exec.file}"/>
<au:assertFileExists file="${exec.file}"/>
</target>
-
+
<target name="testMergeBadFiles">
<property name="bad.file" location="${basedir}/data/sample.bad"/>
<au:expectfailure expectedMessage="Unable to read ${bad.file}">
@@ -62,7 +63,7 @@
</jacoco:merge>
</au:expectfailure>
</target>
-
+
<target name="testMergeDirectory">
<jacoco:merge destfile="${exec.file}">
<dirset dir="${basedir}/data"/>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/RemoveDebugInfos.java b/org.jacoco.ant.test/src/org/jacoco/ant/RemoveDebugInfos.java
index 7f9eb8d7..20f9d5a0 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/RemoveDebugInfos.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/RemoveDebugInfos.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskLocaleTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskLocaleTest.java
index 782675e9..fbb96c7d 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskLocaleTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskLocaleTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java
index 6f164422..c3059ec0 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.java
@@ -1,24 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
import java.io.File;
-import junit.framework.TestSuite;
-
import org.apache.ant.antunit.junit3.AntUnitSuite;
import org.apache.ant.antunit.junit4.AntUnitSuiteRunner;
import org.junit.runner.RunWith;
+import junit.framework.TestSuite;
+
@RunWith(AntUnitSuiteRunner.class)
public class ReportTaskTest {
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml
index 055fa0d1..0481c218 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/ReportTaskTest.xml
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
Dominik Stadler - source folder support
-->
<project name="JaCoCo Report Task Tests" xmlns:au="antlib:org.apache.ant.antunit" xmlns:jacoco="antlib:org.jacoco.ant">
-
+
<target name="setUp">
<tempfile property="temp.dir" prefix="jacocoTest" destdir="${java.io.tmpdir}" />
<mkdir dir="${temp.dir}"/>
@@ -22,8 +23,8 @@
<target name="tearDown">
<delete dir="${temp.dir}" quiet="false" failonerror="true" />
</target>
-
-
+
+
<target name="testReportNoStructureElement">
<au:expectfailure expectedMessage="Group name must be supplied">
<jacoco:report/>
@@ -56,7 +57,7 @@
<structure name="root"/>
</jacoco:report>
</target>
-
+
<target name="testReportInvalidExecutionDataFile">
<property name="doesnotexist.file" location="doesnotexist.exec"/>
<au:expectfailure expectedMessage="Unable to read execution data file ${doesnotexist.file}">
@@ -68,7 +69,7 @@
</jacoco:report>
</au:expectfailure>
</target>
-
+
<target name="testReportWithSourceButNoDebug">
<java classname="org.jacoco.ant.RemoveDebugInfos" classpath="${java.class.path}" failonerror="true">
<arg value="${org.jacoco.ant.reportTaskTest.classes.dir}/org/jacoco/ant/TestTarget.class" />
@@ -86,7 +87,7 @@
</jacoco:report>
<au:assertLogContains level="warn" text="To enable source code annotation class files for bundle 'root' have to be compiled with debug information"/>
</target>
-
+
<target name="testReportWithSourceDirButNoDebug">
<java classname="org.jacoco.ant.RemoveDebugInfos" classpath="${java.class.path}" failonerror="true">
<arg value="${org.jacoco.ant.reportTaskTest.classes.dir}/org/jacoco/ant/TestTarget.class" />
@@ -128,14 +129,14 @@
</classfiles>
</structure>
</jacoco:report>
- <au:assertLogContains level="warn" text="Classes in bundle 'root' do no match with execution data."/>
+ <au:assertLogContains level="warn" text="Classes in bundle 'root' do not match with execution data."/>
<au:assertLogContains level="warn" text="For report generation the same class files must be used as at runtime."/>
<au:assertLogContains level="warn" text="Execution data for class org/jacoco/ant/TestTarget does not match."/>
</target>
-
+
<!-- HTML Output -->
-
+
<target name="testReportHtmlNoDestdirOrDestfile">
<au:expectfailure expectedMessage="Destination directory or file must be supplied for html report">
<jacoco:report>
@@ -153,7 +154,7 @@
</jacoco:report>
</au:expectfailure>
</target>
-
+
<target name="testReportHtmlWithClassFileSet">
<jacoco:report>
<structure name="Test">
@@ -165,10 +166,10 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/Group/org.jacoco.ant/TestTarget.html"/>
</target>
-
+
<target name="testReportHtmlWithPath">
<jacoco:report>
<structure name="Test">
@@ -180,10 +181,10 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/Group/org.jacoco.ant/TestTarget.html"/>
</target>
-
+
<target name="testReportHtmlWithJAR">
<property name="testReportHtmlWithJAR.jarfile" location="${temp.dir}/testclasses.jar"/>
<jar destfile="${testReportHtmlWithJAR.jarfile}">
@@ -199,16 +200,16 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/Group/org.jacoco.ant/TestTarget.html"/>
</target>
-
+
<target name="testReportHtmlFooter">
<jacoco:report>
<structure name="Test"/>
<html footer="ExampleFooter" destdir="${temp.dir}"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlFooter.content" srcfile="${temp.dir}/index.html" encoding="UTF-8"/>
<au:assertTrue message="Footer not included in ${testReportHtmlFooter.content}">
<contains string="${testReportHtmlFooter.content}" substring="ExampleFooter"/>
@@ -220,7 +221,7 @@
<structure name="Test"/>
<html encoding="UTF-16" destdir="${temp.dir}"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlEncoding.content" srcfile="${temp.dir}/index.html" encoding="UTF-16"/>
<au:assertTrue message="Encoding not set in ${testReportHtmlEncoding.content}">
<contains string="${testReportHtmlEncoding.content}" substring="encoding=&quot;UTF-16&quot;"/>
@@ -239,7 +240,7 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlTabWidth.content" srcfile="${temp.dir}/org.jacoco.ant/TestTarget.java.html"/>
<au:assertTrue message="Tab width not set in ${testReportHtmlTabWidth.content}">
<contains string="${testReportHtmlTabWidth.content}" substring="window['PR_TAB_WIDTH']=4"/>
@@ -258,7 +259,7 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlTabWidth.content" srcfile="${temp.dir}/org.jacoco.ant/TestTarget.java.html"/>
<au:assertTrue message="Tab width not set in ${testReportHtmlTabWidth.content}">
<contains string="${testReportHtmlTabWidth.content}" substring="window['PR_TAB_WIDTH']=13"/>
@@ -280,7 +281,7 @@
</jacoco:report>
</au:expectfailure>
</target>
-
+
<target name="testReportHtmlZipFile">
<jacoco:report>
<structure name="Test">
@@ -290,7 +291,7 @@
</structure>
<html destfile="${temp.dir}/report.zip"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/report.zip"/>
</target>
@@ -306,11 +307,11 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/org.jacoco.ant/TestTarget.java.html"/>
<au:assertFileExists file="${temp.dir}/default/TestTargetInDefault.java.html"/>
</target>
-
+
<target name="testReportHtmlWithSourcesDir">
<jacoco:report>
<structure name="Test">
@@ -323,11 +324,11 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${temp.dir}/org.jacoco.ant/TestTarget.java.html"/>
<au:assertFileExists file="${temp.dir}/default/TestTargetInDefault.java.html"/>
</target>
-
+
<target name="testReportHtmlWithSourceEncoding">
<mkdir dir="${temp.dir}/org/jacoco/ant"/>
<echo file="${temp.dir}/org/jacoco/ant/TestTarget.java" encoding="UTF-16">Source Code</echo>
@@ -342,7 +343,7 @@
</structure>
<html destdir="${temp.dir}"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlWithSourceEncoding.content" srcfile="${temp.dir}/org.jacoco.ant/TestTarget.java.html" encoding="UTF-8"/>
<au:assertTrue message="Report does not contain expected text.">
<contains string="${testReportHtmlWithSourceEncoding.content}" substring="Source Code"/>
@@ -361,13 +362,13 @@
</structure>
<html destdir="${temp.dir}" locale="gr"/>
</jacoco:report>
-
+
<loadfile property="testReportHtmlLocale.content" srcfile="${temp.dir}/org.jacoco.ant/TestTarget.java.html" encoding="UTF-8"/>
<au:assertTrue message="Report does not contain expected language tag.">
<contains string="${testReportHtmlLocale.content}" substring="lang=&quot;gr&quot;"/>
</au:assertTrue>
</target>
-
+
<!-- CSV Output -->
<target name="testReportCsvNoDestfile">
@@ -378,14 +379,14 @@
</jacoco:report>
</au:expectfailure>
</target>
-
+
<target name="testReportCsvEncoding">
<property name="testReportCsvEncoding.destfile" location="${temp.dir}/report.csv"/>
<jacoco:report>
<structure name="Test"/>
<csv encoding="UTF-16" destfile="${testReportCsvEncoding.destfile}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${testReportCsvEncoding.destfile}"/>
<loadfile property="testReportCsvEncoding.content" srcfile="${testReportCsvEncoding.destfile}" encoding="UTF-16"/>
<au:assertTrue message="Encoding not set in ${testReportCsvEncoding.content}">
@@ -393,9 +394,9 @@
</au:assertTrue>
</target>
-
+
<!-- XML Output -->
-
+
<target name="testReportXmlNoDestfile">
<au:expectfailure expectedMessage="Destination file must be supplied for xml report">
<jacoco:report>
@@ -413,21 +414,21 @@
</jacoco:report>
</au:expectfailure>
</target>
-
+
<target name="testReportXmlEncoding">
<property name="testReportXmlEncoding.destfile" location="${temp.dir}/report.xml"/>
<jacoco:report>
<structure name="Test"/>
<xml encoding="UTF-16" destfile="${testReportXmlEncoding.destfile}"/>
</jacoco:report>
-
+
<au:assertFileExists file="${testReportXmlEncoding.destfile}"/>
<loadfile property="testReportXmlEncoding.content" srcfile="${testReportXmlEncoding.destfile}" encoding="UTF-16"/>
<au:assertTrue message="Encoding not set in ${testReportXmlEncoding.content}">
<contains string="${testReportXmlEncoding.content}" substring="encoding=&quot;UTF-16&quot;"/>
</au:assertTrue>
</target>
-
+
<!-- Coverage Check -->
<target name="testReportCheckOk">
@@ -436,9 +437,6 @@
<classfiles>
<fileset dir="${org.jacoco.ant.reportTaskTest.classes.dir}" includes="**/*.class"/>
</classfiles>
- <sourcefiles encoding="UTF-8">
- <fileset dir="${org.jacoco.ant.reportTaskTest.sources.dir}" />
- </sourcefiles>
</structure>
<check>
<rule element="CLASS">
@@ -455,9 +453,6 @@
<classfiles>
<fileset dir="${org.jacoco.ant.reportTaskTest.classes.dir}" includes="**/*.class"/>
</classfiles>
- <sourcefiles encoding="UTF-8">
- <fileset dir="${org.jacoco.ant.reportTaskTest.sources.dir}" />
- </sourcefiles>
</structure>
<check>
<rule element="BUNDLE">
@@ -469,15 +464,30 @@
<au:assertLogContains level="error" text="instructions covered ratio is 0.00, but expected minimum is 0.90"/>
</target>
+ <target name="testReportInvalidConfiguration">
+ <au:expectfailure expectedMessage="Coverage check failed due to violated rules.">
+ <jacoco:report>
+ <structure name="Test">
+ <classfiles>
+ <fileset dir="${org.jacoco.ant.reportTaskTest.classes.dir}" includes="**/*.class"/>
+ </classfiles>
+ </structure>
+ <check>
+ <rule element="BUNDLE">
+ <limit counter="INSTRUCTION" value="COVEREDRATIO" minimum="80"/>
+ </rule>
+ </check>
+ </jacoco:report>
+ </au:expectfailure>
+ <au:assertLogContains level="error" text="given minimum ratio is 80, but must be between 0.0 and 1.0"/>
+ </target>
+
<target name="testReportCheckSetPropertyOnly">
<jacoco:report>
<structure name="Test">
<classfiles>
<fileset dir="${org.jacoco.ant.reportTaskTest.classes.dir}" includes="**/*.class"/>
</classfiles>
- <sourcefiles encoding="UTF-8">
- <fileset dir="${org.jacoco.ant.reportTaskTest.sources.dir}" />
- </sourcefiles>
</structure>
<check failonviolation="false" violationsproperty="violation">
<rule element="BUNDLE">
@@ -496,5 +506,5 @@
</au:assertTrue>
</target>
-
+
</project>
diff --git a/org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java b/org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java
index a78218f7..970b2e2c 100644
--- a/org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java
+++ b/org.jacoco.ant.test/src/org/jacoco/ant/TestTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
diff --git a/org.jacoco.ant/about.html b/org.jacoco.ant/about.html
index ebd81479..4b9ecb3c 100644
--- a/org.jacoco.ant/about.html
+++ b/org.jacoco.ant/about.html
@@ -9,17 +9,17 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
@@ -30,44 +30,8 @@
out below.
</p>
-<h4>ASM</h4>
-
-<p>
- This plug-in contains the <a href="http://asm.objectweb.org/">ASM</a> library
- which is subject to the terms and conditions of the following license:
-</p>
-
-<pre>
-Copyright (c) 2012 France Télécom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-</pre>
+${asm.license}
+${googlecodeprettify.license}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.ant/pom.xml b/org.jacoco.ant/pom.xml
index cba37bd6..201960e8 100644
--- a/org.jacoco.ant/pom.xml
+++ b/org.jacoco.ant/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java b/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java
index 709358f5..28770c15 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/AbstractCoverageTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -50,7 +51,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets whether or not the current task is enabled
- *
+ *
* @param enabled
* Enablement state of the task
*/
@@ -61,7 +62,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets the location to write coverage execution data to. Default is
* <code>jacoco.exec</code>.
- *
+ *
* @param file
* Location to write coverage execution data to
*/
@@ -72,7 +73,7 @@ public class AbstractCoverageTask extends Task {
/**
* Append execution coverage data if a coverage file is already present.
* Default is <code>true</code>
- *
+ *
* @param append
* <code>true</code> to append execution data to an existing file
*/
@@ -83,7 +84,7 @@ public class AbstractCoverageTask extends Task {
/**
* List of wildcard patterns classes to include for instrumentation. Default
* is <code>*</code>
- *
+ *
* @param includes
* Wildcard pattern of included classes
*/
@@ -94,7 +95,7 @@ public class AbstractCoverageTask extends Task {
/**
* List of wildcard patterns classes to exclude from instrumentation.
* Default is the empty string, no classes excluded
- *
+ *
* @param excludes
* Wildcard pattern of excluded classes
*/
@@ -106,7 +107,7 @@ public class AbstractCoverageTask extends Task {
* List of wildcard patterns for classloaders that JaCoCo will not
* instrument classes from. Default is
* <code>sun.reflect.DelegatingClassLoader</code>
- *
+ *
* @param exclClassLoader
* Wildcard pattern of class loaders to exclude
*/
@@ -117,7 +118,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets whether classes from the bootstrap classloader should be
* instrumented.
- *
+ *
* @param include
* <code>true</code> if bootstrap classes should be instrumented
*/
@@ -127,7 +128,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets whether classes without source location should be instrumented.
- *
+ *
* @param include
* <code>true</code> if classes without source location should be
* instrumented
@@ -138,7 +139,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets the session identifier. Default is a auto-generated id
- *
+ *
* @param id
* session identifier
*/
@@ -148,7 +149,7 @@ public class AbstractCoverageTask extends Task {
/**
* Dump coverage data on VM termination. Default is <code>true</code>
- *
+ *
* @param dumpOnExit
* <code>true</code> to write coverage data on VM termination
*/
@@ -158,7 +159,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets the output method. Default is <code>file</code>
- *
+ *
* @param output
* Output method
*/
@@ -170,7 +171,7 @@ public class AbstractCoverageTask extends Task {
* Sets the IP address or hostname to bind to when output method is tcp
* server or connect to when the output method is tcp client. Default is
* <code>localhost</code>
- *
+ *
* @param address
* Address to bind or connect to
*/
@@ -181,7 +182,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets the Port to bind to when the output method is tcp server or connect
* to when the output method is tcp client. Default is <code>6300</code>
- *
+ *
* @param port
* port to bind to or connect to
*/
@@ -192,7 +193,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets the directory where all class files seen by the agent should be
* dumped to.
- *
+ *
* @param dir
* dump output location
*/
@@ -202,7 +203,7 @@ public class AbstractCoverageTask extends Task {
/**
* Sets whether the agent should expose functionality via JMX.
- *
+ *
* @param jmx
* <code>true</code> if JMX should be enabled
*/
@@ -213,7 +214,7 @@ public class AbstractCoverageTask extends Task {
/**
* Creates JVM argument to launch with the specified JaCoCo agent jar and
* the current options
- *
+ *
* @return JVM Argument to pass to new VM
*/
protected String getLaunchingArgument() {
@@ -230,8 +231,8 @@ public class AbstractCoverageTask extends Task {
private File getAgentFile() {
try {
File agentFile = null;
- final String agentFileLocation = getProject().getProperty(
- "_jacoco.agentFile");
+ final String agentFileLocation = getProject()
+ .getProperty("_jacoco.agentFile");
if (agentFileLocation != null) {
agentFile = new File(agentFileLocation);
} else {
diff --git a/org.jacoco.ant/src/org/jacoco/ant/AgentTask.java b/org.jacoco.ant/src/org/jacoco/ant/AgentTask.java
index a02b809d..9c1eb9ca 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/AgentTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/AgentTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -23,7 +24,7 @@ public class AgentTask extends AbstractCoverageTask {
/**
* Sets the name of the property to hold the agent JVM options
- *
+ *
* @param property
* Name of the property to be populated
*/
diff --git a/org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java b/org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java
index 6e771f6e..e757af90 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/AntFilesLocator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -27,15 +28,14 @@ class AntFilesLocator extends InputStreamSourceFileLocator {
private final Map<String, Resource> resources;
- public AntFilesLocator(final String encoding,
- final int tabWidth) {
+ public AntFilesLocator(final String encoding, final int tabWidth) {
super(encoding, tabWidth);
this.resources = new HashMap<String, Resource>();
}
/**
* Adds the given file resource as a potential source file.
- *
+ *
* @param file
* file resource to add
*/
@@ -44,7 +44,8 @@ class AntFilesLocator extends InputStreamSourceFileLocator {
}
@Override
- protected InputStream getSourceStream(final String path) throws IOException {
+ protected InputStream getSourceStream(final String path)
+ throws IOException {
final Resource file = resources.get(path);
if (file == null) {
return null;
diff --git a/org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java b/org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java
index 41c8352d..88c34b91 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/AntResourcesLocator.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
* Dominik Stadler - source folder support
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -44,7 +45,7 @@ class AntResourcesLocator extends MultiSourceFileLocator {
/**
* Adds the given file or directory resource to the locator.
- *
+ *
* @param resource
* resource to add
*/
@@ -67,7 +68,7 @@ class AntResourcesLocator extends MultiSourceFileLocator {
/**
* Checks, whether resources have been added.
- *
+ *
* @return <code>true</code>, if no resources have been added
*/
boolean isEmpty() {
diff --git a/org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java b/org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java
index c5b10922..6115b11d 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/CoverageTask.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - TestNG support
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -33,7 +34,8 @@ import org.apache.tools.ant.UnknownElement;
* <li>Task must be using a forked VM (so vm args can be passed)</li>
* </ul>
*/
-public class CoverageTask extends AbstractCoverageTask implements TaskContainer {
+public class CoverageTask extends AbstractCoverageTask
+ implements TaskContainer {
private final Collection<TaskEnhancer> taskEnhancers = new ArrayList<TaskEnhancer>();
private Task childTask;
@@ -65,9 +67,10 @@ public class CoverageTask extends AbstractCoverageTask implements TaskContainer
final TaskEnhancer enhancer = findEnhancerForTask(subTaskTypeName);
if (enhancer == null) {
- throw new BuildException(format(
- "%s is not a valid child of the coverage task",
- subTaskTypeName), getLocation());
+ throw new BuildException(
+ format("%s is not a valid child of the coverage task",
+ subTaskTypeName),
+ getLocation());
}
if (isEnabled()) {
@@ -161,8 +164,8 @@ public class CoverageTask extends AbstractCoverageTask implements TaskContainer
runtimeConfigurableWrapper.setAttribute("value",
getLaunchingArgument());
- task.getRuntimeConfigurableWrapper().addChild(
- runtimeConfigurableWrapper);
+ task.getRuntimeConfigurableWrapper()
+ .addChild(runtimeConfigurableWrapper);
((UnknownElement) task).addChild(el);
}
@@ -184,7 +187,7 @@ public class CoverageTask extends AbstractCoverageTask implements TaskContainer
/**
* Attempt to enhance the supplied task with coverage information. This
* operation may fail if the task is being executed in the current VM
- *
+ *
* @param task
* Task instance to enhance (usually an
* {@link UnknownElement})
diff --git a/org.jacoco.ant/src/org/jacoco/ant/DumpTask.java b/org.jacoco.ant/src/org/jacoco/ant/DumpTask.java
index 5aa20fd9..3782fd98 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/DumpTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/DumpTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -41,7 +42,7 @@ public class DumpTask extends Task {
* Sets the location of the execution data file to write. This parameter is
* required when dump is <code>true</code>. Default is
* <code>jacoco.exec</code>
- *
+ *
* @param destfile
* Location to write execution data to
*/
@@ -51,7 +52,7 @@ public class DumpTask extends Task {
/**
* IP Address or hostname to connect to. Defaults to <code>localhost</code>
- *
+ *
* @param address
* IP Address or hostname to connect to
*/
@@ -61,7 +62,7 @@ public class DumpTask extends Task {
/**
* Port number to connect to. Default is <code>6300</code>
- *
+ *
* @param port
* Port to connect to
*/
@@ -72,7 +73,7 @@ public class DumpTask extends Task {
/**
* Number of retries which the goal will attempt to establish a connection.
* This can be used to wait until the target JVM is successfully launched.
- *
+ *
* @param retryCount
* number of retries
*/
@@ -83,7 +84,7 @@ public class DumpTask extends Task {
/**
* <code>true</code> if the destination file it to be appended to.
* <code>false</code> if the file is to be overwritten
- *
+ *
* @param append
* <code>true</code> if the destination file should be appended
* to
@@ -95,7 +96,7 @@ public class DumpTask extends Task {
/**
* Sets whether execution data should be downloaded from the remote host.
* Defaults to <code>true</code>
- *
+ *
* @param dump
* <code>true</code> to download execution data
*/
@@ -106,7 +107,7 @@ public class DumpTask extends Task {
/**
* Sets whether a reset command should be sent after the execution data has
* been dumped. Defaults to <code>false</code>
- *
+ *
* @param reset
* <code>true</code> to reset execution data
*/
diff --git a/org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java b/org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java
index 6ba16ec8..df143a0e 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/InstrumentTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -41,7 +42,7 @@ public class InstrumentTask extends Task {
/**
* Sets the location of the instrumented classes.
- *
+ *
* @param destdir
* destination folder for instrumented classes
*/
@@ -51,7 +52,7 @@ public class InstrumentTask extends Task {
/**
* Sets whether signatures should be removed from JAR files.
- *
+ *
* @param removesignatures
* <code>true</code> if signatures should be removed
*/
@@ -61,7 +62,7 @@ public class InstrumentTask extends Task {
/**
* This task accepts any number of class file resources.
- *
+ *
* @param resources
* Execution data resources
*/
@@ -109,8 +110,9 @@ public class InstrumentTask extends Task {
}
} catch (final Exception e) {
file.delete();
- throw new BuildException(format("Error while instrumenting %s",
- resource), e, getLocation());
+ throw new BuildException(
+ format("Error while instrumenting %s", resource), e,
+ getLocation());
}
}
}
diff --git a/org.jacoco.ant/src/org/jacoco/ant/MergeTask.java b/org.jacoco.ant/src/org/jacoco/ant/MergeTask.java
index de6897e4..373e96aa 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/MergeTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/MergeTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -37,7 +38,7 @@ public class MergeTask extends Task {
/**
* Sets the location of the merged data store
- *
+ *
* @param destfile
* Destination data store location
*/
@@ -47,7 +48,7 @@ public class MergeTask extends Task {
/**
* This task accepts any number of execution data resources.
- *
+ *
* @param resources
* Execution data resources
*/
diff --git a/org.jacoco.ant/src/org/jacoco/ant/ReportTask.java b/org.jacoco.ant/src/org/jacoco/ant/ReportTask.java
index bbcb3487..1416a5e1 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/ReportTask.java
+++ b/org.jacoco.ant/src/org/jacoco/ant/ReportTask.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.ant;
@@ -71,7 +72,7 @@ public class ReportTask extends Task {
/**
* Defines the optional source file encoding. If not set the platform
* default is used.
- *
+ *
* @param encoding
* source file encoding
*/
@@ -81,7 +82,7 @@ public class ReportTask extends Task {
/**
* Sets the tab stop width for the source pages. Default value is 4.
- *
+ *
* @param tabWidth
* number of characters per tab stop
*/
@@ -109,7 +110,7 @@ public class ReportTask extends Task {
/**
* Sets the name of the group.
- *
+ *
* @param name
* name of the group
*/
@@ -119,7 +120,7 @@ public class ReportTask extends Task {
/**
* Creates a new child group.
- *
+ *
* @return new child group
*/
public GroupElement createGroup() {
@@ -130,7 +131,7 @@ public class ReportTask extends Task {
/**
* Returns the nested resource collection for class files.
- *
+ *
* @return resource collection for class files
*/
public Union createClassfiles() {
@@ -139,7 +140,7 @@ public class ReportTask extends Task {
/**
* Returns the nested resource collection for source files.
- *
+ *
* @return resource collection for source files
*/
public SourceFilesElement createSourcefiles() {
@@ -176,7 +177,7 @@ public class ReportTask extends Task {
/**
* Sets the output directory for the report.
- *
+ *
* @param destdir
* output directory
*/
@@ -186,7 +187,7 @@ public class ReportTask extends Task {
/**
* Sets the Zip output file for the report.
- *
+ *
* @param destfile
* Zip output file
*/
@@ -197,7 +198,7 @@ public class ReportTask extends Task {
/**
* Sets an optional footer text that will be displayed on every report
* page.
- *
+ *
* @param text
* footer text
*/
@@ -207,7 +208,7 @@ public class ReportTask extends Task {
/**
* Sets the output encoding for generated HTML files. Default is UTF-8.
- *
+ *
* @param encoding
* output encoding
*/
@@ -218,7 +219,7 @@ public class ReportTask extends Task {
/**
* Sets the locale for generated text output. By default the platform
* locale is used.
- *
+ *
* @param locale
* text locale
*/
@@ -266,7 +267,7 @@ public class ReportTask extends Task {
/**
* Sets the output file for the report.
- *
+ *
* @param destfile
* output file
*/
@@ -288,7 +289,7 @@ public class ReportTask extends Task {
/**
* Sets the output encoding for generated XML file. Default is UTF-8.
- *
+ *
* @param encoding
* output encoding
*/
@@ -309,7 +310,7 @@ public class ReportTask extends Task {
/**
* Sets the output file for the report.
- *
+ *
* @param destfile
* output file
*/
@@ -319,7 +320,7 @@ public class ReportTask extends Task {
/**
* Sets the output encoding for generated XML file. Default is UTF-8.
- *
+ *
* @param encoding
* output encoding
*/
@@ -344,8 +345,8 @@ public class ReportTask extends Task {
/**
* Formatter element for coverage checks.
*/
- public class CheckFormatterElement extends FormatterElement implements
- IViolationsOutput {
+ public class CheckFormatterElement extends FormatterElement
+ implements IViolationsOutput {
private final List<Rule> rules = new ArrayList<Rule>();
private boolean violations = false;
@@ -354,7 +355,7 @@ public class ReportTask extends Task {
/**
* Creates and adds a new rule.
- *
+ *
* @return new rule
*/
public Rule createRule() {
@@ -366,7 +367,7 @@ public class ReportTask extends Task {
/**
* Sets whether the build should fail in case of a violation. Default is
* <code>true</code>.
- *
+ *
* @param flag
* if <code>true</code> the build fails on violation
*/
@@ -376,7 +377,7 @@ public class ReportTask extends Task {
/**
* Sets the name of a property to append the violation messages to.
- *
+ *
* @param property
* name of a property
*/
@@ -397,8 +398,8 @@ public class ReportTask extends Task {
violations = true;
if (violationsPropery != null) {
final String old = getProject().getProperty(violationsPropery);
- final String value = old == null ? message : String.format(
- "%s\n%s", old, message);
+ final String value = old == null ? message
+ : String.format("%s\n%s", old, message);
getProject().setProperty(violationsPropery, value);
}
}
@@ -425,7 +426,7 @@ public class ReportTask extends Task {
/**
* Returns the nested resource collection for execution data files.
- *
+ *
* @return resource collection for execution files
*/
public Union createExecutiondata() {
@@ -434,7 +435,7 @@ public class ReportTask extends Task {
/**
* Returns the root group element that defines the report structure.
- *
+ *
* @return root group element
*/
public GroupElement createStructure() {
@@ -443,7 +444,7 @@ public class ReportTask extends Task {
/**
* Creates a new HTML report element.
- *
+ *
* @return HTML report element
*/
public HTMLFormatterElement createHtml() {
@@ -454,7 +455,7 @@ public class ReportTask extends Task {
/**
* Creates a new CSV report element.
- *
+ *
* @return CSV report element
*/
public CSVFormatterElement createCsv() {
@@ -465,7 +466,7 @@ public class ReportTask extends Task {
/**
* Creates a new coverage check element.
- *
+ *
* @return coverage check element
*/
public CheckFormatterElement createCheck() {
@@ -476,7 +477,7 @@ public class ReportTask extends Task {
/**
* Creates a new XML report element.
- *
+ *
* @return CSV report element
*/
public XMLFormatterElement createXml() {
@@ -505,7 +506,8 @@ public class ReportTask extends Task {
private void loadExecutionData() {
final ExecFileLoader loader = new ExecFileLoader();
- for (final Iterator<?> i = executiondataElement.iterator(); i.hasNext();) {
+ for (final Iterator<?> i = executiondataElement.iterator(); i
+ .hasNext();) {
final Resource resource = (Resource) i.next();
log(format("Loading execution data file %s", resource));
InputStream in = null;
@@ -513,9 +515,10 @@ public class ReportTask extends Task {
in = resource.getInputStream();
loader.load(in);
} catch (final IOException e) {
- throw new BuildException(format(
- "Unable to read execution data file %s", resource), e,
- getLocation());
+ throw new BuildException(
+ format("Unable to read execution data file %s",
+ resource),
+ e, getLocation());
} finally {
FileUtils.close(in);
}
@@ -582,7 +585,7 @@ public class ReportTask extends Task {
Integer.valueOf(bundle.getClassCounter().getTotalCount())));
if (!nomatch.isEmpty()) {
log(format(
- "Classes in bundle '%s' do no match with execution data. "
+ "Classes in bundle '%s' do not match with execution data. "
+ "For report generation the same class files must be used as at runtime.",
bundle.getName()), Project.MSG_WARN);
for (final IClassCoverage c : nomatch) {
@@ -604,7 +607,7 @@ public class ReportTask extends Task {
* Splits a given underscore "_" separated string and creates a Locale. This
* method is implemented as the method Locale.forLanguageTag() was not
* available in Java 5.
- *
+ *
* @param locale
* String representation of a Locate
* @return Locale instance
diff --git a/org.jacoco.ant/src/org/jacoco/ant/antlib.xml b/org.jacoco.ant/src/org/jacoco/ant/antlib.xml
index bcedf360..757874d8 100644
--- a/org.jacoco.ant/src/org/jacoco/ant/antlib.xml
+++ b/org.jacoco.ant/src/org/jacoco/ant/antlib.xml
@@ -1,12 +1,13 @@
<?xml version="1.0"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
-->
diff --git a/org.jacoco.build/licenses/args4j-2.0.28.html b/org.jacoco.build/licenses/args4j-2.0.28.html
new file mode 100644
index 00000000..ede3adbe
--- /dev/null
+++ b/org.jacoco.build/licenses/args4j-2.0.28.html
@@ -0,0 +1,28 @@
+<h3>args4j</h3>
+
+<p>
+ <a href="http://args4j.kohsuke.org/">args4j 2.0.28</a> is subject to the
+ terms and conditions of the following license:
+</p>
+
+<pre>
+Copyright (c) 2013 Kohsuke Kawaguchi and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+</pre>
diff --git a/org.jacoco.build/licenses/asm-9.1.html b/org.jacoco.build/licenses/asm-9.1.html
new file mode 100644
index 00000000..849f693c
--- /dev/null
+++ b/org.jacoco.build/licenses/asm-9.1.html
@@ -0,0 +1,36 @@
+<h4>ASM</h4>
+
+<p>
+ <a href="http://asm.objectweb.org/">ASM 9.1</a> is subject to the terms and
+ conditions of the following license:
+</p>
+
+<pre>
+ASM: a very small and fast Java bytecode manipulation framework
+Copyright (c) 2000-2011 INRIA, France Telecom
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the copyright holders nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.
+</pre>
diff --git a/org.jacoco.ant.test/about.html b/org.jacoco.build/licenses/googlecodeprettify-20100721.html
index d684ed00..11a8a1d3 100644
--- a/org.jacoco.ant.test/about.html
+++ b/org.jacoco.build/licenses/googlecodeprettify-20100721.html
@@ -1,45 +1,13 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
+<h3>Google Code Prettify</h3>
<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-<h3>Third Party Content</h3>
-
-<p>
- The Content includes items that have been sourced from third parties as set
- out below.
-</p>
-
-<h4>Apache AntUnit 1.1</h4>
-
-<p>
- This plug-in contains the <a href="http://ant.apache.org/antlibs/antunit/">AntUnit</a>
- library developed by The Apache Software Foundation
- (<a href="http://www.apache.org/">http://www.apache.org/</a>) which is subject
- to the terms and conditions of the following license:
+ <a href="https://github.com/google/code-prettify">Google Code Prettify 2010/07/21</a>
+ is subject to the terms and conditions of the following license:
</p>
<pre>
+Copyright 2011 Mike Samuel et al
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -215,6 +183,3 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
</pre>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.build/pom.xml b/org.jacoco.build/pom.xml
index 18ac6a5b..32f29695 100644
--- a/org.jacoco.build/pom.xml
+++ b/org.jacoco.build/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -14,7 +15,7 @@
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<packaging>pom</packaging>
<name>JaCoCo</name>
@@ -26,8 +27,8 @@
</organization>
<licenses>
<license>
- <name>Eclipse Public License v1.0</name>
- <url>http://www.eclipse.org/legal/epl-v10.html</url>
+ <name>Eclipse Public License 2.0</name>
+ <url>https://www.eclipse.org/legal/epl-2.0/</url>
<distribution>repo</distribution>
</license>
</licenses>
@@ -128,7 +129,7 @@
<maven.build.timestamp.format>yyyyMMddhhmm</maven.build.timestamp.format>
<jacoco.home.url>http://www.jacoco.org/jacoco</jacoco.home.url>
- <copyright.years>${project.inceptionYear}, 2019</copyright.years>
+ <copyright.years>${project.inceptionYear}, 2021</copyright.years>
<bytecode.version>1.5</bytecode.version>
<maven.compiler.source>${bytecode.version}</maven.compiler.source>
@@ -138,15 +139,16 @@
<argLine>${jvm.args}</argLine>
<!-- Dependencies versions -->
- <asm.version>7.1</asm.version>
- <ant.version>1.7.1</ant.version>
+ <asm.version>9.1</asm.version>
+ <ant.version>1.9.15</ant.version>
<args4j.version>2.0.28</args4j.version>
- <junit.version>4.8.2</junit.version>
+ <junit.version>4.13.1</junit.version>
+ <googlecodeprettify.version>20100721</googlecodeprettify.version>
<!-- ================== -->
<!-- For SonarQube analysis -->
<!-- ================== -->
- <sonar.jacoco.reportPath>../${project.artifactId}.test/target/jacoco.exec</sonar.jacoco.reportPath>
+ <sonar.coverage.jacoco.xmlReportPaths>../org.jacoco.doc/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.surefire.reportsPath>../${project.artifactId}.test/target/surefire-reports/</sonar.surefire.reportsPath>
<!-- See http://jira.codehaus.org/browse/SONAR-2096 -->
@@ -242,8 +244,18 @@
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit4</artifactId>
+ <version>${ant.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-launcher</artifactId>
+ <version>${ant.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
<artifactId>ant-antunit</artifactId>
- <version>1.2</version>
+ <version>1.4</version>
</dependency>
<dependency>
<groupId>args4j</groupId>
@@ -267,6 +279,7 @@
<exclude>**/*.java</exclude>
<exclude>**/*.kt</exclude>
<exclude>**/*.groovy</exclude>
+ <exclude>**/*.scala</exclude>
<exclude>**/*.properties</exclude>
</excludes>
</resource>
@@ -276,6 +289,16 @@
<includes>
<include>**/*.properties</include>
</includes>
+ <excludes>
+ <exclude>**/*-test.properties</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**/*-test.properties</include>
+ </includes>
</resource>
<resource>
<directory>.</directory>
@@ -376,7 +399,7 @@
<version>2.1</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
- <mavenExecutorId>forked-path</mavenExecutorId>
+ <mavenExecutorId>forked-path</mavenExecutorId>
<useReleaseProfile>false</useReleaseProfile>
<!--
Allows to activate release profile during release.
@@ -461,6 +484,11 @@
<artifactId>maven-bundle-plugin</artifactId>
<version>3.5.1</version>
</plugin>
+ <plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <version>1.24.3</version>
+ </plugin>
</plugins>
</pluginManagement>
@@ -476,21 +504,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <configuration>
- <!-- We can't use delimiters "${*}" and "$*$" together - probably it's bug in plugin -->
- <!-- so for now we will define only our delimiters in compliance with https://sourceforge.net/apps/trac/eclemma/changeset/1229 -->
- <!-- but it would be better to use defaults -->
- <useDefaultDelimiters>false</useDefaultDelimiters>
- <delimiters>
- <delimiter>@*@</delimiter>
- <delimiter>$*$</delimiter>
- </delimiters>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<filters>
@@ -556,6 +569,52 @@
</plugin>
<plugin>
+ <groupId>com.diffplug.spotless</groupId>
+ <artifactId>spotless-maven-plugin</artifactId>
+ <configuration>
+ <java>
+ <lineEndings>UNIX</lineEndings>
+ <includes>
+ <include>src/**/*.java</include>
+ </includes>
+ <eclipse>
+ <version>4.12.0</version>
+ <file>../org.jacoco.core/.settings/org.eclipse.jdt.core.prefs</file>
+ </eclipse>
+ <trimTrailingWhitespace/>
+ <endWithNewline/>
+ </java>
+ <formats>
+ <format>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/*.html</include>
+ <include>**/*.css</include>
+ <include>**/*.js</include>
+ <include>**/*.xml</include>
+ <include>**/*.xsl</include>
+ <include>**/*.dtd</include>
+ </includes>
+ <excludes>
+ <exclude>target/**</exclude>
+ </excludes>
+ <lineEndings>UNIX</lineEndings>
+ <trimTrailingWhitespace/>
+ <endWithNewline/>
+ </format>
+ </formats>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
@@ -570,13 +629,14 @@
<fileset dir="${basedir}" includes="**/*.java,**/*.xml,**/*.bsh" excludes="target/**,.idea/**,nb-configuration.xml" id="missinglicense.fileset">
<include name="**/*.kt"/>
<include name="**/*.groovy"/>
+ <include name="**/*.scala"/>
<not>
<and>
- <contains text="Copyright (c) 2009, 2019 Mountainminds GmbH &amp; Co. KG and Contributors"/>
- <contains text="All rights reserved. This program and the accompanying materials"/>
- <contains text="are made available under the terms of the Eclipse Public License v1.0"/>
- <contains text="which accompanies this distribution, and is available at"/>
- <contains text="http://www.eclipse.org/legal/epl-v10.html"/>
+ <contains text="Copyright (c) 2009, 2021 Mountainminds GmbH &amp; Co. KG and Contributors"/>
+ <contains text="This program and the accompanying materials are made available under"/>
+ <contains text="the terms of the Eclipse Public License 2.0 which is available at"/>
+ <contains text="http://www.eclipse.org/legal/epl-2.0"/>
+ <contains text="SPDX-License-Identifier: EPL-2.0"/>
</and>
</not>
</fileset>
@@ -658,6 +718,16 @@
buildNumber = project.getProperties().get("buildNumber");
pkgName = buildNumber.substring(buildNumber.length() - 7, buildNumber.length());
project.getProperties().setProperty("jacoco.runtime.package.name", "org.jacoco.agent.rt.internal_" + pkgName);
+
+ void loadLicense(String libraryId) {
+ version = project.getProperties().get(libraryId + ".version");
+ path = project.getBasedir().toPath().resolve("../org.jacoco.build/licenses/" + libraryId + "-" + version + ".html");
+ license = new String(java.nio.file.Files.readAllBytes(path), "UTF-8");
+ project.getProperties().setProperty(libraryId + ".license", license);
+ }
+ loadLicense("args4j");
+ loadLicense("asm");
+ loadLicense("googlecodeprettify");
]]>
</script>
</configuration>
@@ -746,6 +816,69 @@
</build>
</profile>
+ <!--
+ Following profiles enable compilation into bytecode version 13
+ when requested "bytecode.version" greater than 13,
+ because this is maximum that can be processed by
+ maven-shade-plugin and maven-plugin-plugin.
+ This is overridden for tests.
+ -->
+ <profile>
+ <id>java14-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>14</value>
+ </property>
+ </activation>
+ <properties>
+ <maven.compiler.source>13</maven.compiler.source>
+ <maven.compiler.target>13</maven.compiler.target>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>java15-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>15</value>
+ </property>
+ </activation>
+ <properties>
+ <maven.compiler.source>13</maven.compiler.source>
+ <maven.compiler.target>13</maven.compiler.target>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>java16-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>16</value>
+ </property>
+ </activation>
+ <properties>
+ <maven.compiler.source>13</maven.compiler.source>
+ <maven.compiler.target>13</maven.compiler.target>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>java17-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>17</value>
+ </property>
+ </activation>
+ <properties>
+ <maven.compiler.source>13</maven.compiler.source>
+ <maven.compiler.target>13</maven.compiler.target>
+ </properties>
+ </profile>
+
<!-- This profile enables use of ECJ -->
<profile>
<id>ecj</id>
diff --git a/org.jacoco.cli.test/about.html b/org.jacoco.cli.test/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.cli.test/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.cli.test/pom.xml b/org.jacoco.cli.test/pom.xml
index fc6356db..a02f8a0f 100644
--- a/org.jacoco.cli.test/pom.xml
+++ b/org.jacoco.cli.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/CommandTestBase.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/CommandTestBase.java
index ba570b65..1497e12a 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/CommandTestBase.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/CommandTestBase.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/MainTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/MainTest.java
index 41807a65..763c0c58 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/MainTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/MainTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/XmlDocumentationTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/XmlDocumentationTest.java
index c902fb02..10b65561 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/XmlDocumentationTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/XmlDocumentationTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ClassInfoTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ClassInfoTest.java
index f1b9df10..65e879b8 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ClassInfoTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ClassInfoTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/DumpTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/DumpTest.java
index 70aeceda..00d808f9 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/DumpTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/DumpTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -86,7 +87,9 @@ public class DumpTest extends CommandTestBase {
} catch (IOException ignore) {
}
- assertContains("[WARN] Connection refused", err);
+ // Locale independent parts of error message:
+ assertContains("[WARN]", err);
+ assertContains("Connection refused", err);
}
private int startMockServer() throws IOException {
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ExecInfoTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ExecInfoTest.java
index 5308937d..e486f67f 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ExecInfoTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ExecInfoTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java
index 76f31b83..f676e8d2 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/InstrumentTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -67,7 +68,9 @@ public class InstrumentTest extends CommandTestBase {
+ destdir.getAbsolutePath(), out);
// non class-file resources are copied:
- assertTrue(new File(destdir, "about.html").isFile());
+ assertTrue(new File(destdir,
+ "org/jacoco/cli/internal/commands/test-resource.properties")
+ .isFile());
assertInstrumented(new File(destdir,
"org/jacoco/cli/internal/commands/InstrumentTest.class"));
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/MergeTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/MergeTest.java
index d2dc1199..8f3b3190 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/MergeTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/MergeTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java
index bff42966..5ad60453 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/ReportTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/VersionTest.java b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/VersionTest.java
index dab8955f..91d58698 100644
--- a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/VersionTest.java
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/VersionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/test-resource.properties b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/test-resource.properties
new file mode 100644
index 00000000..42ba86cc
--- /dev/null
+++ b/org.jacoco.cli.test/src/org/jacoco/cli/internal/commands/test-resource.properties
@@ -0,0 +1 @@
+x=42
diff --git a/org.jacoco.cli/about.html b/org.jacoco.cli/about.html
index af7ff88f..0d1c5207 100644
--- a/org.jacoco.cli/about.html
+++ b/org.jacoco.cli/about.html
@@ -9,17 +9,17 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
@@ -28,13 +28,9 @@
out below.
</p>
-<h4>args4j</h4>
-
-<p>
- This plug-in contains <a href="http://args4j.kohsuke.org/">args4j</a>
- which is subject to the terms and conditions of the
- <a href="http://www.opensource.org/licenses/mit-license.php">the MIT license</a>.
-</p>
+${args4j.license}
+${asm.license}
+${googlecodeprettify.license}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.cli/pom.xml b/org.jacoco.cli/pom.xml
index 1b975fe4..1221d8c1 100644
--- a/org.jacoco.cli/pom.xml
+++ b/org.jacoco.cli/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/Command.java b/org.jacoco.cli/src/org/jacoco/cli/internal/Command.java
index 4d35722b..4b05c259 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/Command.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/Command.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -63,7 +64,7 @@ public abstract class Command {
/**
* Executes the given command.
- *
+ *
* @param out
* std out
* @param err
@@ -77,7 +78,7 @@ public abstract class Command {
/**
* Prints textual help for this command.
- *
+ *
* @param writer
* output destination
*/
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/CommandHandler.java b/org.jacoco.cli/src/org/jacoco/cli/internal/CommandHandler.java
index 02bcbbe0..4184b95b 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/CommandHandler.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/CommandHandler.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -30,7 +31,7 @@ public class CommandHandler extends OptionHandler<Command> {
/**
* This constructor is required by the args4j framework.
- *
+ *
* @param parser
* @param option
* @param setter
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/CommandParser.java b/org.jacoco.cli/src/org/jacoco/cli/internal/CommandParser.java
index a918a7fe..d06bf966 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/CommandParser.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/CommandParser.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/Main.java b/org.jacoco.cli/src/org/jacoco/cli/internal/Main.java
index 8c3fb110..3980ebd7 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/Main.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/Main.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -91,7 +92,7 @@ public class Main extends Command {
/**
* Main entry point for program invocations.
- *
+ *
* @param args
* program arguments
* @throws Exception
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/XmlDocumentation.java b/org.jacoco.cli/src/org/jacoco/cli/internal/XmlDocumentation.java
index 3ef4aca4..b410832d 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/XmlDocumentation.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/XmlDocumentation.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -54,7 +55,7 @@ public final class XmlDocumentation {
/**
* Called during the build process.
- *
+ *
* @param args
* exactly one argument expected with the target location
* @throws IOException
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/AllCommands.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/AllCommands.java
index c8d713a5..c443d669 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/AllCommands.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/AllCommands.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ClassInfo.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ClassInfo.java
index 4e33b351..ca658dee 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ClassInfo.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ClassInfo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Dump.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Dump.java
index c63cc8a1..be6cff80 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Dump.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Dump.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ExecInfo.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ExecInfo.java
index 4519d28f..fee57bf1 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ExecInfo.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/ExecInfo.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Instrument.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Instrument.java
index b628c5b6..62f8aab2 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Instrument.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Instrument.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* John Keeping - initial implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Merge.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Merge.java
index 229ccba5..1b76cb4c 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Merge.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Merge.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Report.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Report.java
index ef984f7c..79998b26 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Report.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Report.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* John Keeping - initial implementation
diff --git a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Version.java b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Version.java
index 273fc6ec..59ed7250 100644
--- a/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Version.java
+++ b/org.jacoco.cli/src/org/jacoco/cli/internal/commands/Version.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.core.test.validation.groovy/.classpath b/org.jacoco.core.test.validation.groovy/.classpath
new file mode 100644
index 00000000..ebe550b7
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/.classpath
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/classes" path="src">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.jacoco.core.test.validation.groovy/.project b/org.jacoco.core.test.validation.groovy/.project
new file mode 100644
index 00000000..b4033cb4
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jacoco.core.test.validation.groovy</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>.settings</name>
+ <type>2</type>
+ <locationURI>PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/org.jacoco.core.test.validation.groovy/pom.xml b/org.jacoco.core.test.validation.groovy/pom.xml
index a30cb442..549c1df7 100644
--- a/org.jacoco.core.test.validation.groovy/pom.xml
+++ b/org.jacoco.core.test.validation.groovy/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Andres Almiray - initial API and implementation
@@ -16,7 +17,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core.test.validation</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.core.test.validation</relativePath>
</parent>
@@ -25,8 +26,8 @@
<name>JaCoCo :: Test :: Core :: Validation Groovy</name>
<properties>
- <gmaven.version>1.6.2</gmaven.version>
- <groovy.version>2.5.3</groovy.version>
+ <gmaven.version>1.11.0</gmaven.version>
+ <groovy.version>3.0.7</groovy.version>
</properties>
<dependencies>
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoCloneClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoCloneClassTest.java
new file mode 100644
index 00000000..537c0d51
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoCloneClassTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Oliver Nautsch - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyAutoCloneClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.AutoClone} annotation.
+ */
+public class GroovyAutoCloneClassTest extends ValidationTestBase {
+ public GroovyAutoCloneClassTest() {
+ super(GroovyAutoCloneClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoExternalizeClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoExternalizeClassTest.java
new file mode 100644
index 00000000..f2e218e2
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyAutoExternalizeClassTest.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyAutoExternalizeClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.AutoExternalize} annotation.
+ */
+public class GroovyAutoExternalizeClassTest extends ValidationTestBase {
+ public GroovyAutoExternalizeClassTest() {
+ super(GroovyAutoExternalizeClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBindableClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBindableClassTest.java
new file mode 100644
index 00000000..f70b7f4e
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBindableClassTest.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyBindableClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.beans.Bindable} annotation.
+ */
+public class GroovyBindableClassTest extends ValidationTestBase {
+ public GroovyBindableClassTest() {
+ super(GroovyBindableClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBuilderClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBuilderClassTest.java
new file mode 100644
index 00000000..66972c26
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyBuilderClassTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Jan Wloka - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyBuilderClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.builder.Builder} annotation.
+ */
+public class GroovyBuilderClassTest extends ValidationTestBase {
+ public GroovyBuilderClassTest() {
+ super(GroovyBuilderClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyCanonicalClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyCanonicalClassTest.java
new file mode 100644
index 00000000..72f36287
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyCanonicalClassTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Andres Almiray - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyCanonicalClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.Canonical} annotation.
+ */
+public class GroovyCanonicalClassTest extends ValidationTestBase {
+ public GroovyCanonicalClassTest() {
+ super(GroovyCanonicalClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDataClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDataClassTest.java
deleted file mode 100644
index f13fc438..00000000
--- a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDataClassTest.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andres Almiray - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation.groovy;
-
-import org.jacoco.core.test.validation.ValidationTestBase;
-import org.jacoco.core.test.validation.groovy.targets.GroovyDataClassTarget;
-import org.junit.Test;
-
-/**
- * Test of <code>data class</code>es.
- */
-public class GroovyDataClassTest extends ValidationTestBase {
- public GroovyDataClassTest() {
- super(GroovyDataClassTarget.class);
- }
-
- @Test
- public void test_method_count() {
- assertMethodCount(1);
- }
-}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDelegateClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDelegateClassTest.java
new file mode 100644
index 00000000..1761d0c4
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyDelegateClassTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Jan Wloka - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyDelegateClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with field annotated by {@link groovy.lang.Delegate}.
+ */
+public class GroovyDelegateClassTest extends ValidationTestBase {
+ public GroovyDelegateClassTest() {
+ super(GroovyDelegateClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(4);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyImmutableClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyImmutableClassTest.java
new file mode 100644
index 00000000..5efe749d
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyImmutableClassTest.java
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Oliver Nautsch - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyImmutableClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.Immutable} annotation.
+ */
+public class GroovyImmutableClassTest extends ValidationTestBase {
+ public GroovyImmutableClassTest() {
+ super(GroovyImmutableClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyIndexPropertyClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyIndexPropertyClassTest.java
new file mode 100644
index 00000000..32f0e4ea
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyIndexPropertyClassTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyIndexPropertyClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with fields annotated by
+ * {@link groovy.transform.IndexedProperty} annotation.
+ */
+public class GroovyIndexPropertyClassTest extends ValidationTestBase {
+ public GroovyIndexPropertyClassTest() {
+ super(GroovyIndexPropertyClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovySortableClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovySortableClassTest.java
new file mode 100644
index 00000000..810ed1d5
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovySortableClassTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovySortableClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.transform.Sortable} annotation.
+ */
+public class GroovySortableClassTest extends ValidationTestBase {
+ public GroovySortableClassTest() {
+ super(GroovySortableClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ // main method and static initializer
+ assertMethodCount(2);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyVetoableClassTest.java b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyVetoableClassTest.java
new file mode 100644
index 00000000..7ad2443d
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/GroovyVetoableClassTest.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.groovy.targets.GroovyVetoableClassTarget;
+import org.junit.Test;
+
+/**
+ * Test of class with {@link groovy.beans.Vetoable} annotation.
+ */
+public class GroovyVetoableClassTest extends ValidationTestBase {
+ public GroovyVetoableClassTest() {
+ super(GroovyVetoableClassTarget.class);
+ }
+
+ @Test
+ public void test_method_count() {
+ assertMethodCount(1);
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoCloneClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoCloneClassTarget.groovy
new file mode 100644
index 00000000..554921de
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoCloneClassTarget.groovy
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Oliver Nautsch - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.AutoClone
+
+@AutoClone
+class GroovyAutoCloneClassTarget { // assertEmpty()
+ static void main(String[] args) {
+ new GroovyAutoCloneClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoExternalizeClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoExternalizeClassTarget.groovy
new file mode 100644
index 00000000..62173881
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyAutoExternalizeClassTarget.groovy
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.AutoExternalize
+
+@AutoExternalize
+class GroovyAutoExternalizeClassTarget { // assertEmpty()
+
+ String first // assertEmpty()
+ List favItems // assertEmpty()
+ Date since // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyAutoExternalizeClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBindableClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBindableClassTarget.groovy
new file mode 100644
index 00000000..af9e8bb2
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBindableClassTarget.groovy
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.beans.Bindable
+
+class GroovyBindableClassTarget { // assertEmpty()
+
+ @Bindable
+ String firstName // assertEmpty()
+
+ @Bindable
+ def zipCode // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyBindableClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBuilderClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBuilderClassTarget.groovy
new file mode 100644
index 00000000..36990f68
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyBuilderClassTarget.groovy
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Jan Wloka - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.builder.Builder
+import groovy.transform.builder.SimpleStrategy
+
+@Builder(builderStrategy = SimpleStrategy)
+class GroovyBuilderClassTarget { // assertEmpty()
+
+ String name // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyBuilderClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyCanonicalClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyCanonicalClassTarget.groovy
new file mode 100644
index 00000000..bf0da0e2
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyCanonicalClassTarget.groovy
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Andres Almiray - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.Canonical
+
+@Canonical
+class GroovyCanonicalClassTarget { // assertEmpty()
+
+ int valRead // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyCanonicalClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDataClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDataClassTarget.groovy
deleted file mode 100644
index c51b1e51..00000000
--- a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDataClassTarget.groovy
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Andres Almiray - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation.groovy.targets
-
-/* This annotation generates the following
- * - a constructor that takes an int as argument
- * - a suitable implementation of toString()
- * - a suitable implementation of hashCode()
- * - a suitable implementation of equals(Object)
- * - a public method named canEqual(Object)
- * - a getter & setter for the valRead property
- */
-@groovy.transform.Canonical
-class GroovyDataClassTarget { // assertEmpty()
-
- int valRead // assertEmpty()
-
- static void main(String[] args) {
- new GroovyDataClassTarget() // assertFullyCovered()
- }
-}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDelegateClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDelegateClassTarget.groovy
new file mode 100644
index 00000000..6024efdd
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyDelegateClassTarget.groovy
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Jan Wloka - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+class GroovyDelegateClassTarget { // assertEmpty()
+
+ static class D {
+ void m1() {
+ } // assertFullyCovered()
+
+ void m2() {
+ } // assertFullyCovered()
+ }
+
+ @Delegate
+ D delegate = new D() // assertEmpty()
+
+ void m2() {
+ delegate.m2() // assertFullyCovered()
+ }
+
+ static void main(String[] args) {
+ new GroovyDelegateClassTarget().m1()
+ new GroovyDelegateClassTarget().m2()
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyImmutableClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyImmutableClassTarget.groovy
new file mode 100644
index 00000000..ebe8e7b7
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyImmutableClassTarget.groovy
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Oliver Nautsch - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.Immutable
+
+@Immutable
+class GroovyImmutableClassTarget { // assertEmpty()
+
+ String name // assertEmpty()
+ int age // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyImmutableClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyIndexPropertyClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyIndexPropertyClassTarget.groovy
new file mode 100644
index 00000000..dd9b84ef
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyIndexPropertyClassTarget.groovy
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.io.FileType
+import groovy.transform.IndexedProperty
+
+class GroovyIndexPropertyClassTarget { // assertEmpty()
+
+ @IndexedProperty
+ FileType[] someField // assertEmpty()
+ @IndexedProperty
+ List otherField // assertEmpty()
+ @IndexedProperty
+ List furtherField // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyIndexPropertyClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovySortableClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovySortableClassTarget.groovy
new file mode 100644
index 00000000..b3f04f04
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovySortableClassTarget.groovy
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.transform.Sortable
+
+@Sortable
+class GroovySortableClassTarget { // assertEmpty()
+
+ String first // assertEmpty()
+ String last // assertEmpty()
+ Integer born // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovySortableClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyVetoableClassTarget.groovy b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyVetoableClassTarget.groovy
new file mode 100644
index 00000000..436079be
--- /dev/null
+++ b/org.jacoco.core.test.validation.groovy/src/org/jacoco/core/test/validation/groovy/targets/GroovyVetoableClassTarget.groovy
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Stephan Classen
+ * Vadim Bauer
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.groovy.targets
+
+import groovy.beans.Vetoable
+
+@Vetoable
+class GroovyVetoableClassTarget { // assertEmpty()
+
+ String firstName // assertEmpty()
+ def zipCode // assertEmpty()
+
+ static void main(String[] args) {
+ new GroovyVetoableClassTarget() // assertFullyCovered()
+ }
+}
diff --git a/org.jacoco.core.test.validation.java14/.classpath b/org.jacoco.core.test.validation.java14/.classpath
new file mode 100644
index 00000000..8521cd5e
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/.classpath
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/classes" path="src">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.jacoco.core.test.validation.java14/.project b/org.jacoco.core.test.validation.java14/.project
new file mode 100644
index 00000000..fd583c68
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jacoco.core.test.validation.java14</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>.settings</name>
+ <type>2</type>
+ <locationURI>PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/org.jacoco.core.test.validation.java14/pom.xml b/org.jacoco.core.test.validation.java14/pom.xml
new file mode 100644
index 00000000..61701c46
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Marc R. Hoffmann - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.core.test.validation</artifactId>
+ <version>0.8.7</version>
+ <relativePath>../org.jacoco.core.test.validation</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.core.test.validation.java14</artifactId>
+
+ <name>JaCoCo :: Test :: Core :: Validation Java 14</name>
+
+ <properties>
+ <bytecode.version>14</bytecode.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.core.test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>--enable-preview</arg>
+ </compilerArgs>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>--enable-preview</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/InstanceofTest.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/InstanceofTest.java
new file mode 100644
index 00000000..09a7db34
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/InstanceofTest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14;
+
+import org.jacoco.core.test.validation.Source.Line;
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.java14.targets.InstanceofTarget;
+
+/**
+ * Test of code coverage in {@link InstanceofTarget}.
+ */
+public class InstanceofTest extends ValidationTestBase {
+
+ public InstanceofTest() {
+ super(InstanceofTarget.class);
+ }
+
+ public void assertInstanceof(final Line line) {
+ if (isJDKCompiler && JAVA_VERSION.isBefore("15")) {
+ // https://bugs.openjdk.java.net/browse/JDK-8237528
+ assertFullyCovered(line, 1, 3);
+ } else {
+ assertFullyCovered(line, 0, 2);
+ }
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/RecordsTest.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/RecordsTest.java
new file mode 100644
index 00000000..7e93f50d
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/RecordsTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.java14.targets.RecordsTarget;
+
+/**
+ * Test of code coverage for records.
+ */
+public class RecordsTest extends ValidationTestBase {
+
+ public RecordsTest() {
+ super(RecordsTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java
new file mode 100644
index 00000000..b2821ff3
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/SwitchExpressionsTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.java14.targets.SwitchExpressionsTarget;
+
+/**
+ * Test of code coverage for switch expressions.
+ */
+public class SwitchExpressionsTest extends ValidationTestBase {
+
+ public SwitchExpressionsTest() {
+ super(SwitchExpressionsTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/InstanceofTarget.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/InstanceofTarget.java
new file mode 100644
index 00000000..3058295d
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/InstanceofTarget.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14.targets;
+
+import static org.jacoco.core.test.validation.targets.Stubs.nop;
+
+/**
+ * This target exercises pattern matching for instanceof (JEP 305).
+ */
+public class InstanceofTarget {
+
+ private static void ifInstanceof(Object e) {
+ if (e instanceof String s) { // assertInstanceof()
+ nop(s);
+ }
+ }
+
+ public static void main(String[] args) {
+ ifInstanceof(new Object());
+ ifInstanceof("string");
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/RecordsTarget.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/RecordsTarget.java
new file mode 100644
index 00000000..4667c5bb
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/RecordsTarget.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14.targets;
+
+/**
+ * This target exercises records.
+ */
+public class RecordsTarget {
+
+ record WithoutFields() { // assertFullyCovered()
+ }
+
+ record WithFields( // assertPartlyCovered()
+ int x // assertEmpty()
+ ) {
+ }
+
+ record WithCustomMethods(int x) { // assertFullyCovered()
+ public int x() {
+ return x; // assertNotCovered()
+ }
+
+ public String toString() {
+ return ""; // assertNotCovered()
+ }
+
+ public int hashCode() {
+ return 0; // assertNotCovered()
+ }
+
+ public boolean equals(Object object) {
+ return false; // assertNotCovered()
+ }
+ }
+
+ public static void main(String[] args) {
+ new WithoutFields();
+ new WithFields(42);
+ new WithCustomMethods(42);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java
new file mode 100644
index 00000000..ec327584
--- /dev/null
+++ b/org.jacoco.core.test.validation.java14/src/org/jacoco/core/test/validation/java14/targets/SwitchExpressionsTarget.java
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.java14.targets;
+
+import static org.jacoco.core.test.validation.targets.Stubs.Enum.A;
+import static org.jacoco.core.test.validation.targets.Stubs.Enum.B;
+import static org.jacoco.core.test.validation.targets.Stubs.Enum.C;
+import static org.jacoco.core.test.validation.targets.Stubs.enumA;
+import static org.jacoco.core.test.validation.targets.Stubs.i1;
+import static org.jacoco.core.test.validation.targets.Stubs.i2;
+import static org.jacoco.core.test.validation.targets.Stubs.nop;
+
+/**
+ * This target exercises switch expressions.
+ */
+public class SwitchExpressionsTarget {
+
+ public static void main(String[] args) {
+
+ switchExpressionWithArrows();
+ multiValueSwitchExpressionWithArrows();
+ switchExpressionWithArrowsAndYield();
+ switchExpressionWithYield();
+ exhaustiveSwitchExpression();
+
+ }
+
+ private static void switchExpressionWithArrows() {
+
+ nop(switch (i2()) { // assertFullyCovered(3, 1)
+ case 1 -> i1(); // assertNotCovered()
+ case 2 -> i1(); // assertFullyCovered()
+ case 3 -> i1(); // assertNotCovered()
+ default -> i1(); // assertNotCovered()
+ });
+
+ }
+
+ private static void multiValueSwitchExpressionWithArrows() {
+
+ nop(switch (i2()) { // assertFullyCovered(2, 1)
+ case 1, 2 -> i1(); // assertFullyCovered()
+ case 3, 4 -> i1(); // assertNotCovered()
+ default -> i1(); // assertNotCovered()
+ });
+
+ }
+
+ private static void switchExpressionWithArrowsAndYield() {
+
+ nop(switch (i2()) { // assertFullyCovered(3, 1)
+ case 1 -> {
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ }
+ case 2 -> {
+ nop(); // assertFullyCovered()
+ yield i1(); // assertFullyCovered()
+ }
+ case 3 -> {
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ }
+ default -> {
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ }
+ });
+
+ }
+
+ private static void switchExpressionWithYield() {
+
+ nop(switch (i2()) { // assertFullyCovered(3, 1)
+ case 1:
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ case 2:
+ nop(); // assertFullyCovered()
+ yield i1(); // assertFullyCovered()
+ case 3:
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ default:
+ nop(); // assertNotCovered()
+ yield i1(); // assertNotCovered()
+ });
+
+ }
+
+ private static void exhaustiveSwitchExpression() {
+
+ nop(switch (enumA()) { // assertPartlyCovered(3, 1)
+ case A -> i1(); // assertFullyCovered()
+ case B -> i1(); // assertNotCovered()
+ case C -> i1(); // assertNotCovered()
+ });
+
+ }
+}
diff --git a/org.jacoco.core.test.validation.java5/pom.xml b/org.jacoco.core.test.validation.java5/pom.xml
index 4591189a..b65b14f1 100644
--- a/org.jacoco.core.test.validation.java5/pom.xml
+++ b/org.jacoco.core.test.validation.java5/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core.test.validation</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.core.test.validation</relativePath>
</parent>
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationGeneratedTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationGeneratedTest.java
index c56e6125..c3232d42 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationGeneratedTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationGeneratedTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationInitializerTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationInitializerTest.java
index 01a721f5..ad479611 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationInitializerTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/AnnotationInitializerTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BadCycleClassTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BadCycleClassTest.java
index cb6758bd..e833120c 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BadCycleClassTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BadCycleClassTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BooleanExpressionsTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BooleanExpressionsTest.java
index 366730e4..2db1e79d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BooleanExpressionsTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/BooleanExpressionsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ClassInitializerTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ClassInitializerTest.java
index cefd5bb2..8c945689 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ClassInitializerTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ClassInitializerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ConstructorsTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ConstructorsTest.java
index 674b3df6..15e00e2d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ConstructorsTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ConstructorsTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructureBeforeSuperConstructorTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructureBeforeSuperConstructorTest.java
index 5381ae2f..94b9c6ab 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructureBeforeSuperConstructorTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructureBeforeSuperConstructorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructuresTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructuresTest.java
index 350bbe03..28ed0015 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructuresTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ControlStructuresTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/CyclomaticComplexityTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/CyclomaticComplexityTest.java
index 6bc16140..61a1e136 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/CyclomaticComplexityTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/CyclomaticComplexityTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumConstructorTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumConstructorTest.java
index f11a8b46..c3e9b345 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumConstructorTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumConstructorTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumImplicitMethodsTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumImplicitMethodsTest.java
index 2653606c..fd30d317 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumImplicitMethodsTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumImplicitMethodsTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumSwitchTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumSwitchTest.java
index 920c39a7..eb87bb5b 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumSwitchTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/EnumSwitchTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExceptionsTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExceptionsTest.java
index 5e0b78c0..6050e4b4 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExceptionsTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExceptionsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExplicitInitialFrameTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExplicitInitialFrameTest.java
index 8b645412..37b0425d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExplicitInitialFrameTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ExplicitInitialFrameTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FieldInitializationInTwoConstructorsTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FieldInitializationInTwoConstructorsTest.java
index 069e35b2..a7f40b5d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FieldInitializationInTwoConstructorsTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FieldInitializationInTwoConstructorsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FinallyTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FinallyTest.java
index 91a81247..d23d225d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FinallyTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FinallyTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -202,8 +203,7 @@ public class FinallyTest extends ValidationTestBase {
continue;
}
int lineNumber = -1;
- for (AbstractInsnNode i = m.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (AbstractInsnNode i : m.instructions) {
if (AbstractInsnNode.LINE == i.getType()) {
lineNumber = ((LineNumberNode) i).line;
}
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FramesTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FramesTest.java
index 88e39039..921b261f 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FramesTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/FramesTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ImplicitFieldInitializationTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ImplicitFieldInitializationTest.java
index b46e9c22..d18471a4 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ImplicitFieldInitializationTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/ImplicitFieldInitializationTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/InterfaceClassInitializerTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/InterfaceClassInitializerTest.java
index ed4843b1..791691d2 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/InterfaceClassInitializerTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/InterfaceClassInitializerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/StructuredLockingTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/StructuredLockingTest.java
index 7e13e651..3676fc8b 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/StructuredLockingTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/StructuredLockingTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5;
@@ -43,7 +44,7 @@ import org.objectweb.asm.tree.analysis.Interpreter;
* Tests that the invariants specified in <a href=
* "https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-2.html#jvms-2.11.10">chapter
* 2.11.10 of the JVM Spec</a> do also hold for instrumented classes.
- *
+ *
* This is important because JIT compiler in HotSpot JVM ignores methods with
* unstructured locking, so that they executed by interpreter. Android Runtime
* also doesn't optimize such methods.
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SynchronizedTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SynchronizedTest.java
index e4a841d8..dc5c2fea 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SynchronizedTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SynchronizedTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SyntheticTest.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SyntheticTest.java
index ce690bfc..f2721720 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SyntheticTest.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/SyntheticTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -13,6 +14,7 @@ package org.jacoco.core.test.validation.java5;
import org.jacoco.core.test.validation.ValidationTestBase;
import org.jacoco.core.test.validation.java5.targets.SyntheticTarget;
+import org.junit.Test;
/**
* Test of filtering of synthetic methods.
@@ -23,6 +25,7 @@ public class SyntheticTest extends ValidationTestBase {
super(SyntheticTarget.class);
}
+ @Test
public void test_method_count() {
assertMethodCount(5);
}
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationGeneratedTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationGeneratedTarget.java
index 7effe60c..d05581a8 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationGeneratedTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationGeneratedTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationInitializerTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationInitializerTarget.java
index 841f0961..91fe8564 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationInitializerTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/AnnotationInitializerTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BadCycleClassTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BadCycleClassTarget.java
index c37fa8aa..138b3853 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BadCycleClassTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BadCycleClassTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BooleanExpressionsTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BooleanExpressionsTarget.java
index 6015ceac..49c8ab0f 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BooleanExpressionsTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/BooleanExpressionsTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ClassInitializerTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ClassInitializerTarget.java
index 5b1f5543..f7d72787 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ClassInitializerTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ClassInitializerTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ConstructorsTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ConstructorsTarget.java
index f818440e..20362c11 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ConstructorsTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ConstructorsTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructureBeforeSuperConstructorTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructureBeforeSuperConstructorTarget.java
index 3af40473..5c334dfd 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructureBeforeSuperConstructorTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructureBeforeSuperConstructorTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructuresTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructuresTarget.java
index 571adca1..7b7c521d 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructuresTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ControlStructuresTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumConstructorTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumConstructorTarget.java
index 5b526b94..e4685ed6 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumConstructorTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumConstructorTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumImplicitMethodsTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumImplicitMethodsTarget.java
index 687bc4ec..6f36f304 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumImplicitMethodsTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumImplicitMethodsTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumSwitchTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumSwitchTarget.java
index 51ca47e4..0ca43897 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumSwitchTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/EnumSwitchTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExceptionsTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExceptionsTarget.java
index efac5a69..8bec674c 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExceptionsTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExceptionsTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExplicitInitialFrameTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExplicitInitialFrameTarget.java
index 475de0a4..98a35e72 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExplicitInitialFrameTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ExplicitInitialFrameTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FieldInitializationInTwoConstructorsTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FieldInitializationInTwoConstructorsTarget.java
index b79b9224..9b6ed3b8 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FieldInitializationInTwoConstructorsTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FieldInitializationInTwoConstructorsTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FinallyTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FinallyTarget.java
index 66aeabec..7944b29a 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FinallyTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/FinallyTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ImplicitFieldInitializationTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ImplicitFieldInitializationTarget.java
index 46433454..54ea1c57 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ImplicitFieldInitializationTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/ImplicitFieldInitializationTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/InterfaceClassInitializerTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/InterfaceClassInitializerTarget.java
index 81bcda82..936d3e21 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/InterfaceClassInitializerTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/InterfaceClassInitializerTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/StructuredLockingTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/StructuredLockingTarget.java
index 76b57f93..0dd59bbb 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/StructuredLockingTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/StructuredLockingTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java5.targets;
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SynchronizedTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SynchronizedTarget.java
index b9b9ce66..bf999841 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SynchronizedTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SynchronizedTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SyntheticTarget.java b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SyntheticTarget.java
index efede92d..5cededac 100644
--- a/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SyntheticTarget.java
+++ b/org.jacoco.core.test.validation.java5/src/org/jacoco/core/test/validation/java5/targets/SyntheticTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java7/pom.xml b/org.jacoco.core.test.validation.java7/pom.xml
index 3f58d8b9..c857a974 100644
--- a/org.jacoco.core.test.validation.java7/pom.xml
+++ b/org.jacoco.core.test.validation.java7/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core.test.validation</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.core.test.validation</relativePath>
</parent>
diff --git a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/StringSwitchTest.java b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/StringSwitchTest.java
index 2e429461..9d996f9d 100644
--- a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/StringSwitchTest.java
+++ b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/StringSwitchTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/TryWithResourcesTest.java b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/TryWithResourcesTest.java
index 47b09d46..cdc535c6 100644
--- a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/TryWithResourcesTest.java
+++ b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/TryWithResourcesTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/StringSwitchTarget.java b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/StringSwitchTarget.java
index a3b57bc6..b685b729 100644
--- a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/StringSwitchTarget.java
+++ b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/StringSwitchTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/TryWithResourcesTarget.java b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/TryWithResourcesTarget.java
index 061db232..9e67092f 100644
--- a/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/TryWithResourcesTarget.java
+++ b/org.jacoco.core.test.validation.java7/src/org/jacoco/core/test/validation/java7/targets/TryWithResourcesTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/pom.xml b/org.jacoco.core.test.validation.java8/pom.xml
index 5edd498e..adbcf5a3 100644
--- a/org.jacoco.core.test.validation.java8/pom.xml
+++ b/org.jacoco.core.test.validation.java8/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core.test.validation</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.core.test.validation</relativePath>
</parent>
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/AnnotationOnLocalVariableTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/AnnotationOnLocalVariableTest.java
index e3a3221d..767c85fe 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/AnnotationOnLocalVariableTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/AnnotationOnLocalVariableTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BadCycleInterfaceTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BadCycleInterfaceTest.java
index 96896f67..82bdc54a 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BadCycleInterfaceTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BadCycleInterfaceTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BootstrapMethodReferenceTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BootstrapMethodReferenceTest.java
index e723afa8..90076dc7 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BootstrapMethodReferenceTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/BootstrapMethodReferenceTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceDefaultMethodsTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceDefaultMethodsTest.java
index b047ceb8..d754bd1f 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceDefaultMethodsTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceDefaultMethodsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8;
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceOnlyDefaultMethodsTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceOnlyDefaultMethodsTest.java
index 6915ec9f..b976ddda 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceOnlyDefaultMethodsTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/InterfaceOnlyDefaultMethodsTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaExpressionsTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaExpressionsTest.java
index 1128f701..e84fa2ca 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaExpressionsTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaExpressionsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8;
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaInInterfaceTest.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaInInterfaceTest.java
index 9e242400..153c30e4 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaInInterfaceTest.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/LambdaInInterfaceTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8;
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/AnnotationOnLocalVariableTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/AnnotationOnLocalVariableTarget.java
index 976825b7..9a8bfa22 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/AnnotationOnLocalVariableTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/AnnotationOnLocalVariableTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java
index 24515a0b..c5fbb86c 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/BadCycleInterfaceTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceDefaultMethodsTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceDefaultMethodsTarget.java
index 6b44830e..8956e150 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceDefaultMethodsTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceDefaultMethodsTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8.targets;
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceOnlyDefaultMethodsTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceOnlyDefaultMethodsTarget.java
index bd50d433..a1de2b00 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceOnlyDefaultMethodsTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/InterfaceOnlyDefaultMethodsTarget.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaExpressionsTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaExpressionsTarget.java
index 719237f5..c167e7d9 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaExpressionsTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaExpressionsTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8.targets;
diff --git a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaInInterfaceTarget.java b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaInInterfaceTarget.java
index 0bafd437..1b5aac4c 100644
--- a/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaInInterfaceTarget.java
+++ b/org.jacoco.core.test.validation.java8/src/org/jacoco/core/test/validation/java8/targets/LambdaInInterfaceTarget.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.java8.targets;
diff --git a/org.jacoco.core.test.validation.kotlin/pom.xml b/org.jacoco.core.test.validation.kotlin/pom.xml
index 0541e005..5e291389 100644
--- a/org.jacoco.core.test.validation.kotlin/pom.xml
+++ b/org.jacoco.core.test.validation.kotlin/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.core.test.validation</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.core.test.validation</relativePath>
</parent>
@@ -24,8 +25,7 @@
<name>JaCoCo :: Test :: Core :: Validation Kotlin</name>
<properties>
- <bytecode.version>6</bytecode.version>
- <kotlin.version>1.3.31</kotlin.version>
+ <kotlin.version>1.5.0</kotlin.version>
</properties>
<dependencies>
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java
index 321c717e..600ff2a9 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCallableReferenceTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinControlStructuresTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinControlStructuresTest.java
new file mode 100644
index 00000000..877ee91a
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinControlStructuresTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.kotlin.targets.KotlinControlStructuresTarget;
+
+/**
+ * Tests of Kotlin control structures.
+ */
+public class KotlinControlStructuresTest extends ValidationTestBase {
+
+ public KotlinControlStructuresTest() {
+ super(KotlinControlStructuresTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCoroutineTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCoroutineTest.java
index aa537d7d..de807dc5 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCoroutineTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinCoroutineTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDataClassTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDataClassTest.java
index 2bb94d9b..660c6244 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDataClassTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDataClassTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultArgumentsTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultArgumentsTest.java
index 660cd9cb..0bb0bce1 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultArgumentsTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultArgumentsTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultMethodsTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultMethodsTest.java
new file mode 100644
index 00000000..1cba4a2c
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDefaultMethodsTest.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.kotlin.targets.KotlinDefaultMethodsTarget;
+
+/**
+ * Test of code coverage in {@link KotlinDefaultMethodsTarget}.
+ */
+public class KotlinDefaultMethodsTest extends ValidationTestBase {
+
+ public KotlinDefaultMethodsTest() {
+ super(KotlinDefaultMethodsTarget.class);
+ }
+
+ @Override
+ public void all_missed_instructions_should_have_line_number() {
+ // instructions without line numbers
+ // corresponding to non-executed default implementations
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDelegatesTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDelegatesTest.java
new file mode 100644
index 00000000..1809128a
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinDelegatesTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.kotlin.targets.KotlinDelegatesTarget;
+
+/**
+ * Test of code coverage in {@link KotlinDelegatesTarget}.
+ */
+public class KotlinDelegatesTest extends ValidationTestBase {
+
+ public KotlinDelegatesTest() {
+ super(KotlinDelegatesTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinElvisOperatorTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinElvisOperatorTest.java
index 8a0ae789..386c9b6c 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinElvisOperatorTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinElvisOperatorTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinInlineTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinInlineTest.java
index 20276119..34660273 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinInlineTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinInlineTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -23,4 +24,9 @@ public class KotlinInlineTest extends ValidationTestBase {
super(KotlinInlineTargetKt.class);
}
+ @Override
+ public void all_missed_instructions_should_have_line_number() {
+ // missed instructions without line number in inline function
+ }
+
}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLambdaExpressionsTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLambdaExpressionsTest.java
new file mode 100644
index 00000000..cd44726d
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLambdaExpressionsTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.kotlin.targets.KotlinLambdaExpressionsTarget;
+
+/**
+ * Test of code coverage in {@link KotlinLambdaExpressionsTarget}.
+ */
+public class KotlinLambdaExpressionsTest extends ValidationTestBase {
+
+ public KotlinLambdaExpressionsTest() {
+ super(KotlinLambdaExpressionsTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLateinitTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLateinitTest.java
index b770ddbb..a2503ace 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLateinitTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinLateinitTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinNotNullOperatorTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinNotNullOperatorTest.java
index e92cee96..4843f1b2 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinNotNullOperatorTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinNotNullOperatorTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCallOperatorTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCallOperatorTest.java
index 2feb5552..f3e775fe 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCallOperatorTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCallOperatorTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCastTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCastTest.java
index 0fc1e651..e79383f2 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCastTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinSafeCastTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinTopLevelFunctionTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinTopLevelFunctionTest.java
index 473c9bb9..5b15231b 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinTopLevelFunctionTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinTopLevelFunctionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinUnsafeCastOperatorTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinUnsafeCastOperatorTest.java
index f7c10fd3..45bf3eec 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinUnsafeCastOperatorTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinUnsafeCastOperatorTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinWhenExpressionTest.java b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinWhenExpressionTest.java
index ae07b48a..084b186d 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinWhenExpressionTest.java
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/KotlinWhenExpressionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt
index b0240674..4b9aa3cb 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCallableReferenceTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinControlStructuresTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinControlStructuresTarget.kt
new file mode 100644
index 00000000..cc8825df
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinControlStructuresTarget.kt
@@ -0,0 +1,165 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin.targets
+
+import org.jacoco.core.test.validation.targets.Stubs.*
+
+/**
+ * Test target for Kotlin control structures.
+ */
+object KotlinControlStructuresTarget {
+
+ private fun unconditionalExecution() {
+
+ nop() // assertFullyCovered()
+
+ }
+
+ private fun missedIfBlock() {
+
+ if (f()) { // assertFullyCovered(1, 1)
+ nop() // assertNotCovered()
+ } else {
+ nop() // assertFullyCovered()
+ }
+
+ }
+
+ private fun executedIfBlock() {
+
+ if (t()) { // assertFullyCovered(1, 1)
+ nop() // assertFullyCovered()
+ } else {
+ nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun missedWhileBlock() {
+
+ while (f()) { // assertFullyCovered(1, 1)
+ nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun executedWhileBlock() {
+
+ var i = 0
+ while (i++ < 3) { // assertFullyCovered(0, 2)
+ nop() // assertFullyCovered()
+ }
+
+ }
+
+ private fun executedDoWhileBlock() {
+
+ do {
+ nop() // assertFullyCovered()
+ } while (f()) // assertFullyCovered(1, 1)
+
+ }
+
+ private fun missedForBlock() {
+
+ for (j in i2()..i1()) { // assertPartlyCovered(3, 1)
+ nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun executedForBlock() {
+
+ for (j in i1()..i2()) { // assertFullyCovered(1, 3)
+ nop() // assertFullyCovered()
+ }
+
+ }
+
+ private fun missedForEachBlock() {
+
+ for (o in emptyList<Any>()) { // assertPartlyCovered(1, 1)
+ nop(o) // assertNotCovered()
+ }
+
+ }
+
+ private fun executedForEachBlock() {
+
+ for (o in setOf(Any())) { // assertFullyCovered(0,2)
+ nop(o) // assertFullyCovered()
+ }
+
+ }
+
+ private fun whenExpression() {
+
+ when (i2()) { // assertFullyCovered(2, 1)
+ 1 -> nop() // assertNotCovered()
+ 2 -> nop() // assertFullyCovered()
+ else -> nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun breakStatement() {
+
+ while (true) {
+ if (t()) {
+ break // assertFullyCovered()
+ }
+ nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun continueStatement() {
+
+ for (j in i1()..i2()) {
+ if (t()) {
+ continue // assertFullyCovered()
+ }
+ nop() // assertNotCovered()
+ }
+
+ }
+
+ private fun implicitReturn() {
+ } // assertFullyCovered()
+
+ private fun explicitReturn() {
+
+ return // assertFullyCovered()
+
+ } // assertEmpty()
+
+ @JvmStatic
+ fun main(args: Array<String>) {
+ unconditionalExecution()
+ missedIfBlock()
+ executedIfBlock()
+ missedWhileBlock()
+ executedWhileBlock()
+ executedDoWhileBlock()
+ missedForBlock()
+ executedForBlock()
+ missedForEachBlock()
+ executedForEachBlock()
+ whenExpression()
+ breakStatement()
+ continueStatement()
+ implicitReturn()
+ explicitReturn()
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCoroutineTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCoroutineTarget.kt
index 6a56570f..e242d788 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCoroutineTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinCoroutineTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -24,6 +25,11 @@ object KotlinCoroutineTarget {
nop() // assertFullyCovered()
} // assertFullyCovered()
+ private suspend fun suspendingFunctionWithTailCallOptimization() { // assertEmpty()
+ nop() // assertFullyCovered()
+ anotherSuspendingFunction() // assertFullyCovered()
+ } // assertFullyCovered()
+
private suspend fun anotherSuspendingFunction() {
nop() // assertFullyCovered()
}
@@ -36,6 +42,7 @@ object KotlinCoroutineTarget {
nop(x) // assertFullyCovered()
suspendingFunction() // assertFullyCovered()
nop(x) // assertFullyCovered()
+ suspendingFunctionWithTailCallOptimization()
} // assertFullyCovered()
}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDataClassTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDataClassTarget.kt
index 2af6fb09..67abe0f9 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDataClassTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDataClassTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
@@ -19,9 +20,9 @@ import org.jacoco.core.test.validation.targets.Stubs.nop
object KotlinDataClassTarget {
data class DataClass( // assertFullyCovered()
- val valNoRead: Int, // assertNotCovered()
+ val valNoRead: Int, // assertPartlyCovered()
val valRead: Int, // assertFullyCovered()
- var varNoReadNoWrite: Int, // assertNotCovered()
+ var varNoReadNoWrite: Int, // assertPartlyCovered()
var varNoWrite: Int, // assertPartlyCovered()
var varNoRead: Int, // assertPartlyCovered()
var varReadWrite: Int // assertFullyCovered()
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultArgumentsTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultArgumentsTarget.kt
index 0a11d7da..59c07c7e 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultArgumentsTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultArgumentsTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -19,9 +20,21 @@ object KotlinDefaultArgumentsTarget {
private fun f(a: String = "a", b: String = "b") { // assertFullyCovered(0, 0)
}
+ private fun longParameter(x: Long = 0) { // assertFullyCovered()
+ }
+
private fun branch(a: Boolean, b: String = if (a) "a" else "b") { // assertFullyCovered(0, 2)
}
+ open class Open {
+ open fun f(a: String = "a") { // assertFullyCovered()
+ }
+ }
+
+ class Constructor() {
+ constructor(a: Boolean, b: String = if (a) "a" else "b") : this() // assertFullyCovered(0, 2)
+ }
+
@JvmStatic
fun main(args: Array<String>) {
f(a = "a")
@@ -29,8 +42,16 @@ object KotlinDefaultArgumentsTarget {
/* next invocation doesn't use synthetic method: */
f("a", "b")
+ longParameter()
+ longParameter(1)
+
branch(false)
branch(true)
+
+ Open().f()
+
+ Constructor(false)
+ Constructor(true)
}
}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultMethodsTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultMethodsTarget.kt
new file mode 100644
index 00000000..5325e840
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDefaultMethodsTarget.kt
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin.targets
+
+/**
+ * This test target contains class implementing interface with default methods.
+ */
+object KotlinDefaultMethodsTarget {
+
+ interface I {
+ fun m1() = Unit // assertNotCovered()
+ fun m2() = Unit // assertFullyCovered()
+ fun m3() = Unit // assertNotCovered()
+ }
+
+ class C : I { // assertFullyCovered()
+ override fun m1() = Unit // assertFullyCovered()
+ }
+
+ @JvmStatic
+ fun main(args: Array<String>) {
+ C().m1()
+ C().m2()
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDelegatesTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDelegatesTarget.kt
new file mode 100644
index 00000000..1d828ef3
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinDelegatesTarget.kt
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin.targets
+
+/**
+ * This test target contains different delegates.
+ */
+object KotlinDelegatesTarget {
+
+ class DelegatedList : List<Int> by ArrayList() // assertFullyCovered()
+
+ @JvmStatic
+ fun main(args: Array<String>) {
+ DelegatedList()
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinElvisOperatorTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinElvisOperatorTarget.kt
index 5457433b..c316b07a 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinElvisOperatorTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinElvisOperatorTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.kt
index e6344f56..a123449f 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinInlineTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLambdaExpressionsTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLambdaExpressionsTarget.kt
new file mode 100644
index 00000000..0fc7caab
--- /dev/null
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLambdaExpressionsTarget.kt
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.kotlin.targets
+
+import org.jacoco.core.test.validation.targets.Stubs.*
+
+/**
+ * This test target contains different lambda expressions.
+ */
+object KotlinLambdaExpressionsTarget {
+
+ @JvmStatic
+ fun main(args: Array<String>) {
+
+ exec { // assertFullyCovered()
+ nop() // assertFullyCovered()
+ } // assertFullyCovered()
+
+ noexec { // assertFullyCovered()
+ nop() // assertNotCovered()
+ } // assertNotCovered()
+
+ noexec { nop() } // assertPartlyCovered()
+
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLateinitTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLateinitTarget.kt
index 349a230b..050fbb50 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLateinitTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinLateinitTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinNotNullOperatorTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinNotNullOperatorTarget.kt
index 91f5420f..11204dfb 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinNotNullOperatorTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinNotNullOperatorTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCallOperatorTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCallOperatorTarget.kt
index d29e5eb3..d59d31d5 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCallOperatorTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCallOperatorTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCastTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCastTarget.kt
index ddcc7b05..7a4beae8 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCastTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinSafeCastTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinTopLevelFunctionTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinTopLevelFunctionTarget.kt
index e9e5264d..2e7d831a 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinTopLevelFunctionTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinTopLevelFunctionTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinUnsafeCastOperatorTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinUnsafeCastOperatorTarget.kt
index aa493d73..7f9e79e5 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinUnsafeCastOperatorTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinUnsafeCastOperatorTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinWhenExpressionTarget.kt b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinWhenExpressionTarget.kt
index 00ea5e2e..09572d25 100644
--- a/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinWhenExpressionTarget.kt
+++ b/org.jacoco.core.test.validation.kotlin/src/org/jacoco/core/test/validation/kotlin/targets/KotlinWhenExpressionTarget.kt
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -29,8 +30,8 @@ object KotlinWhenExpressionTarget {
@Suppress("REDUNDANT_ELSE_IN_WHEN")
private fun whenSealedRedundantElse(p: Sealed): Int = when (p) { // assertFullyCovered()
is Sealed.Sealed1 -> 1 // assertFullyCovered(0, 2)
- is Sealed.Sealed2 -> 2 // assertFullyCovered(1, 1)
- else -> throw NoWhenBranchMatchedException() // assertNotCovered()
+ is Sealed.Sealed2 -> 2 // assertFullyCovered(0, 0)
+ else -> throw NoWhenBranchMatchedException() // assertEmpty()
} // assertFullyCovered()
private enum class Enum {
@@ -43,18 +44,33 @@ object KotlinWhenExpressionTarget {
} // assertFullyCovered()
@Suppress("REDUNDANT_ELSE_IN_WHEN")
- private fun whenEnumRedundantElse(p: Enum): Int = when (p) { // assertFullyCovered(1, 2)
+ private fun whenEnumRedundantElse(p: Enum): Int = when (p) { // assertFullyCovered(0, 2)
Enum.A -> 1 // assertFullyCovered()
Enum.B -> 2 // assertFullyCovered()
- else -> throw NoWhenBranchMatchedException() // assertNotCovered()
+ else -> throw NoWhenBranchMatchedException() // assertEmpty()
} // assertFullyCovered()
- private fun whenString(p: String): Int = when (p) { // assertFullyCovered(0, 5)
+ private fun whenString(p: String): Int = when (p) { // assertFullyCovered(0, 7)
"a" -> 1 // assertFullyCovered()
"b" -> 2 // assertFullyCovered()
- "\u0000a" -> 3 // assertFullyCovered()
- "\u0000b" -> 4 // assertFullyCovered()
- else -> 5 // assertFullyCovered()
+ "c" -> 3 // assertFullyCovered()
+ "\u0000a" -> 4 // assertFullyCovered()
+ "\u0000b" -> 5 // assertFullyCovered()
+ "\u0000c" -> 6 // assertFullyCovered()
+ else -> 7 // assertFullyCovered()
+ } // assertFullyCovered()
+
+ /**
+ * Unlike [whenString]
+ * in this example first case is the only case with biggest hashCode value.
+ */
+ private fun whenStringBiggestHashCodeFirst(p: String): Int = when (p) { // assertFullyCovered(0, 6)
+ "c" -> 1 // assertFullyCovered()
+ "b" -> 2 // assertFullyCovered()
+ "\u0000b" -> 3 // assertFullyCovered()
+ "a" -> 4 // assertFullyCovered()
+ "\u0000a" -> 5 // assertFullyCovered()
+ else -> 6 // assertFullyCovered()
} // assertFullyCovered()
@JvmStatic
@@ -74,8 +90,17 @@ object KotlinWhenExpressionTarget {
whenString("")
whenString("a")
whenString("b")
+ whenString("c")
whenString("\u0000a")
whenString("\u0000b")
+ whenString("\u0000c")
+
+ whenStringBiggestHashCodeFirst("")
+ whenStringBiggestHashCodeFirst("a")
+ whenStringBiggestHashCodeFirst("b")
+ whenStringBiggestHashCodeFirst("c")
+ whenStringBiggestHashCodeFirst("\u0000a")
+ whenStringBiggestHashCodeFirst("\u0000b")
}
}
diff --git a/org.jacoco.core.test.validation.scala/.classpath b/org.jacoco.core.test.validation.scala/.classpath
new file mode 100644
index 00000000..ebe550b7
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/.classpath
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+ <attributes>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/classes" path="src">
+ <attributes>
+ <attribute name="optional" value="true"/>
+ <attribute name="maven.pomderived" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.jacoco.core.test.validation.scala/.project b/org.jacoco.core.test.validation.scala/.project
new file mode 100644
index 00000000..b742da86
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/.project
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jacoco.core.test.validation.scala</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>.settings</name>
+ <type>2</type>
+ <locationURI>PARENT-1-PROJECT_LOC/org.jacoco.core.test/.settings</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
diff --git a/org.jacoco.core.test.validation.scala/pom.xml b/org.jacoco.core.test.validation.scala/pom.xml
new file mode 100644
index 00000000..8df2e19c
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/pom.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
+ Contributors:
+ Evgeny Mandrikov - initial API and implementation
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.jacoco</groupId>
+ <artifactId>org.jacoco.core.test.validation</artifactId>
+ <version>0.8.7</version>
+ <relativePath>../org.jacoco.core.test.validation</relativePath>
+ </parent>
+
+ <artifactId>org.jacoco.core.test.validation.scala</artifactId>
+
+ <name>JaCoCo :: Test :: Core :: Validation Scala</name>
+
+ <properties>
+ <scala.version>2.13.4</scala.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>org.jacoco.core.test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.scala-lang</groupId>
+ <artifactId>scala-library</artifactId>
+ <version>${scala.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>net.alchim31.maven</groupId>
+ <artifactId>scala-maven-plugin</artifactId>
+ <version>4.4.0</version>
+ <executions>
+ <execution>
+ <id>compile</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaAnonymousFunctionTest.java b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaAnonymousFunctionTest.java
new file mode 100644
index 00000000..2792e690
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaAnonymousFunctionTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.scala.targets.ScalaAnonymousFunctionTarget;
+
+/**
+ * Test of anonymous functions.
+ */
+public class ScalaAnonymousFunctionTest extends ValidationTestBase {
+
+ public ScalaAnonymousFunctionTest() {
+ super(ScalaAnonymousFunctionTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java
new file mode 100644
index 00000000..45536a51
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSingletonObjectTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.scala.targets.ScalaSingletonObjectTarget;
+
+/**
+ * Test of singleton object.
+ */
+public class ScalaSingletonObjectTest extends ValidationTestBase {
+
+ public ScalaSingletonObjectTest() {
+ super(ScalaSingletonObjectTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSynchronizedTest.java b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSynchronizedTest.java
new file mode 100644
index 00000000..d0288222
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/ScalaSynchronizedTest.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala;
+
+import org.jacoco.core.test.validation.ValidationTestBase;
+import org.jacoco.core.test.validation.scala.targets.ScalaSynchronizedTarget;
+
+/**
+ * Test of synchronized block.
+ */
+public class ScalaSynchronizedTest extends ValidationTestBase {
+
+ public ScalaSynchronizedTest() {
+ super(ScalaSynchronizedTarget.class);
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaAnonymousFunctionTarget.scala b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaAnonymousFunctionTarget.scala
new file mode 100644
index 00000000..020a9d54
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaAnonymousFunctionTarget.scala
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala.targets
+
+import org.jacoco.core.test.validation.targets.Stubs.{exec, noexec, nop}
+
+/**
+ * Test target for anonymous functions.
+ */
+object ScalaAnonymousFunctionTarget {
+
+ def main(args: Array[String]): Unit = {
+
+ exec(() => {
+ nop() // assertFullyCovered()
+ })
+
+ noexec(() => {
+ nop() // assertNotCovered()
+ })
+
+ }
+
+}
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala
new file mode 100644
index 00000000..bf1e8cca
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSingletonObjectTarget.scala
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala.targets
+
+/**
+ * This test target is singleton object.
+ */
+object ScalaSingletonObjectTarget { // assertFullyCovered()
+
+ def main(args: Array[String]): Unit = { // assertFullyCovered()
+ } // assertEmpty()
+
+}
diff --git a/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSynchronizedTarget.scala b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSynchronizedTarget.scala
new file mode 100644
index 00000000..987a63c6
--- /dev/null
+++ b/org.jacoco.core.test.validation.scala/src/org/jacoco/core/test/validation/scala/targets/ScalaSynchronizedTarget.scala
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation.scala.targets
+
+import org.jacoco.core.test.validation.targets.Stubs.nop
+
+/**
+ * Test target for synchronized block.
+ */
+object ScalaSynchronizedTarget {
+
+ private val lock: Object = new Object()
+
+ def main(args: Array[String]): Unit = {
+ nop()
+ lock.synchronized { // assertFullyCovered()
+ /* Without filter next line covered partly */
+ nop() // assertFullyCovered()
+ } // assertEmpty()
+ nop()
+ }
+
+}
diff --git a/org.jacoco.core.test.validation/pom.xml b/org.jacoco.core.test.validation/pom.xml
index 7d9abf3c..a83c94d0 100644
--- a/org.jacoco.core.test.validation/pom.xml
+++ b/org.jacoco.core.test.validation/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -16,7 +17,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
@@ -31,7 +32,10 @@
<properties>
<jacoco.skip>true</jacoco.skip>
- <groovy.targetBytecode>${maven.compiler.target}</groovy.targetBytecode>
+
+ <!-- when bytecode.version not specified -->
+ <kotlin.compiler.jvmTarget>1.6</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>1.8</groovy.targetBytecode>
</properties>
<profiles>
@@ -63,6 +67,9 @@
<value>6</value>
</property>
</activation>
+ <properties>
+ <kotlin.compiler.jvmTarget>1.6</kotlin.compiler.jvmTarget>
+ </properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
</modules>
@@ -90,12 +97,12 @@
</property>
</activation>
<properties>
- <groovy.targetBytecode>1.7</groovy.targetBytecode>
+ <!-- Kotlin 1.5.0 doesn't support compilation into 1.7 -->
+ <kotlin.compiler.jvmTarget>1.6</kotlin.compiler.jvmTarget>
</properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
<module>../org.jacoco.core.test.validation.java7</module>
- <module>../org.jacoco.core.test.validation.groovy</module>
</modules>
</profile>
@@ -107,20 +114,29 @@
<value>7</value>
</property>
</activation>
- <properties>
- <groovy.targetBytecode>1.7</groovy.targetBytecode>
- </properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
<module>../org.jacoco.core.test.validation.java7</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
<module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
</modules>
</profile>
<profile>
<id>java8-bytecode</id>
<activation>
- <activeByDefault>true</activeByDefault>
<property>
<name>bytecode.version</name>
<value>8</value>
@@ -135,6 +151,27 @@
<module>../org.jacoco.core.test.validation.java7</module>
<module>../org.jacoco.core.test.validation.java8</module>
<module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>java9-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>9</value>
+ </property>
+ </activation>
+ <properties>
+ <kotlin.compiler.jvmTarget>9</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>9</groovy.targetBytecode>
+ </properties>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.groovy</module>
</modules>
</profile>
@@ -147,7 +184,8 @@
</property>
</activation>
<properties>
- <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
+ <kotlin.compiler.jvmTarget>10</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>10</groovy.targetBytecode>
</properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
@@ -166,13 +204,15 @@
</property>
</activation>
<properties>
- <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
+ <kotlin.compiler.jvmTarget>11</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>11</groovy.targetBytecode>
</properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
<module>../org.jacoco.core.test.validation.java7</module>
<module>../org.jacoco.core.test.validation.java8</module>
<module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
</modules>
</profile>
@@ -185,13 +225,118 @@
</property>
</activation>
<properties>
- <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
+ <kotlin.compiler.jvmTarget>12</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>12</groovy.targetBytecode>
+ </properties>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>java14-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>14</value>
+ </property>
+ </activation>
+ <properties>
+ <kotlin.compiler.jvmTarget>14</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>14</groovy.targetBytecode>
+ <!-- see respective profile in org.jacoco.build about this override -->
+ <maven.compiler.source>14</maven.compiler.source>
+ <maven.compiler.target>14</maven.compiler.target>
+ </properties>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.java14</module>
+ <module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>java15-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>15</value>
+ </property>
+ </activation>
+ <properties>
+ <kotlin.compiler.jvmTarget>15</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>15</groovy.targetBytecode>
+ <!-- see respective profile in org.jacoco.build about this override -->
+ <maven.compiler.source>15</maven.compiler.source>
+ <maven.compiler.target>15</maven.compiler.target>
+ </properties>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.java14</module>
+ <module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>java16-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>16</value>
+ </property>
+ </activation>
+ <properties>
+ <kotlin.compiler.jvmTarget>16</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>16</groovy.targetBytecode>
+ <!-- see respective profile in org.jacoco.build about this override -->
+ <maven.compiler.source>16</maven.compiler.source>
+ <maven.compiler.target>16</maven.compiler.target>
+ </properties>
+ <modules>
+ <module>../org.jacoco.core.test.validation.kotlin</module>
+ <module>../org.jacoco.core.test.validation.java7</module>
+ <module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.java14</module>
+ <module>../org.jacoco.core.test.validation.groovy</module>
+ <module>../org.jacoco.core.test.validation.scala</module>
+ </modules>
+ </profile>
+
+ <profile>
+ <id>java17-bytecode</id>
+ <activation>
+ <property>
+ <name>bytecode.version</name>
+ <value>17</value>
+ </property>
+ </activation>
+ <properties>
+ <!-- Kotlin 1.5.0 doesn't support compilation into 17 -->
+ <kotlin.compiler.jvmTarget>16</kotlin.compiler.jvmTarget>
+ <groovy.targetBytecode>17</groovy.targetBytecode>
+ <!-- see respective profile in org.jacoco.build about this override -->
+ <maven.compiler.source>17</maven.compiler.source>
+ <maven.compiler.target>17</maven.compiler.target>
</properties>
<modules>
<module>../org.jacoco.core.test.validation.kotlin</module>
<module>../org.jacoco.core.test.validation.java7</module>
<module>../org.jacoco.core.test.validation.java8</module>
+ <module>../org.jacoco.core.test.validation.java14</module>
+ <!-- Groovy 3.0.7 does not support Java 17
<module>../org.jacoco.core.test.validation.groovy</module>
+ -->
+ <module>../org.jacoco.core.test.validation.scala</module>
</modules>
</profile>
</profiles>
diff --git a/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs b/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs
index ec625f5b..815f01e2 100644
--- a/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.jacoco.core.test/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,3 @@
-#Thu Jul 02 08:45:19 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
@@ -10,15 +9,18 @@ sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
@@ -31,10 +33,13 @@ sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_semicolons=false
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
@@ -47,10 +52,14 @@ sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_autoboxing=false
sp_cleanup.use_blocks=false
sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_unboxing=false
diff --git a/org.jacoco.core.test/about.html b/org.jacoco.core.test/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.core.test/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.core.test/pom.xml b/org.jacoco.core.test/pom.xml
index 843ebc86..e79b62cc 100644
--- a/org.jacoco.core.test/pom.xml
+++ b/org.jacoco.core.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java b/org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java
index bb37e068..4d1f5498 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/JaCoCoTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
index 1e95a5d1..5bebb124 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/AnalyzerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -22,23 +23,24 @@ import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
-import java.util.jar.JarInputStream;
-import java.util.jar.Pack200;
import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import org.jacoco.core.data.ExecutionDataStore;
+import org.jacoco.core.internal.Pack200Streams;
import org.jacoco.core.internal.data.CRC64;
import org.jacoco.core.test.TargetLoader;
+import org.junit.AssumptionViolatedException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -106,7 +108,7 @@ public class AnalyzerTest {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V12 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -124,6 +126,23 @@ public class AnalyzerTest {
return cw.toByteArray();
}
+ /**
+ * @see #analyzeAll_should_throw_exception_for_unsupported_class_file_version()
+ */
+ @Test
+ public void analyzeClass_should_throw_exception_for_unsupported_class_file_version() {
+ final byte[] bytes = createClass(Opcodes.V16 + 2);
+ try {
+ analyzer.analyzeClass(bytes, "UnsupportedVersion");
+ fail("exception expected");
+ } catch (IOException e) {
+ assertEquals("Error while analyzing UnsupportedVersion.",
+ e.getMessage());
+ assertEquals("Unsupported class file major version 62",
+ e.getCause().getMessage());
+ }
+ }
+
@Test
public void testAnalyzeClassFromStream() throws IOException {
analyzer.analyzeClass(TargetLoader.getClassData(AnalyzerTest.class),
@@ -182,8 +201,7 @@ public class AnalyzerTest {
}
/**
- * Triggers exception in
- * {@link Analyzer#analyzeClass(InputStream, String)}.
+ * Triggers exception in {@link Analyzer#analyzeClass(InputStream, String)}.
*/
@Test
public void testAnalyzeClass_BrokenStream() throws IOException {
@@ -195,6 +213,24 @@ public class AnalyzerTest {
}
}
+ /**
+ * @see #analyzeClass_should_throw_exception_for_unsupported_class_file_version()
+ */
+ @Test
+ public void analyzeAll_should_throw_exception_for_unsupported_class_file_version() {
+ final byte[] bytes = createClass(Opcodes.V16 + 2);
+ try {
+ analyzer.analyzeAll(new ByteArrayInputStream(bytes),
+ "UnsupportedVersion");
+ fail("exception expected");
+ } catch (IOException e) {
+ assertEquals("Error while analyzing UnsupportedVersion.",
+ e.getMessage());
+ assertEquals("Unsupported class file major version 62",
+ e.getCause().getMessage());
+ }
+ }
+
@Test
public void testAnalyzeAll_Class() throws IOException {
final int count = analyzer.analyzeAll(
@@ -207,8 +243,8 @@ public class AnalyzerTest {
public void testAnalyzeAll_Zip() throws IOException {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ZipOutputStream zip = new ZipOutputStream(buffer);
- zip.putNextEntry(new ZipEntry(
- "org/jacoco/core/analysis/AnalyzerTest.class"));
+ zip.putNextEntry(
+ new ZipEntry("org/jacoco/core/analysis/AnalyzerTest.class"));
zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
zip.finish();
final int count = analyzer.analyzeAll(
@@ -259,22 +295,27 @@ public class AnalyzerTest {
@Test
public void testAnalyzeAll_Pack200() throws IOException {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
final ByteArrayOutputStream zipbuffer = new ByteArrayOutputStream();
final ZipOutputStream zip = new ZipOutputStream(zipbuffer);
- zip.putNextEntry(new ZipEntry(
- "org/jacoco/core/analysis/AnalyzerTest.class"));
+ zip.putNextEntry(
+ new ZipEntry("org/jacoco/core/analysis/AnalyzerTest.class"));
zip.write(TargetLoader.getClassDataAsBytes(AnalyzerTest.class));
zip.finish();
final ByteArrayOutputStream pack200buffer = new ByteArrayOutputStream();
GZIPOutputStream gzipOutput = new GZIPOutputStream(pack200buffer);
- Pack200.newPacker().pack(
- new JarInputStream(new ByteArrayInputStream(
- zipbuffer.toByteArray())), gzipOutput);
+ Pack200Streams.pack(zipbuffer.toByteArray(), gzipOutput);
gzipOutput.finish();
- final int count = analyzer.analyzeAll(new ByteArrayInputStream(
- pack200buffer.toByteArray()), "Test");
+ final int count = analyzer.analyzeAll(
+ new ByteArrayInputStream(pack200buffer.toByteArray()), "Test");
assertEquals(1, count);
assertClasses("org/jacoco/core/analysis/AnalyzerTest");
}
@@ -298,8 +339,8 @@ public class AnalyzerTest {
@Test
public void testAnalyzeAll_Empty() throws IOException {
- final int count = analyzer.analyzeAll(new ByteArrayInputStream(
- new byte[0]), "Test");
+ final int count = analyzer
+ .analyzeAll(new ByteArrayInputStream(new byte[0]), "Test");
assertEquals(0, count);
assertEquals(Collections.emptyMap(), classes);
}
@@ -345,12 +386,12 @@ public class AnalyzerTest {
/**
* With JDK 5 triggers exception in
- * {@link Analyzer#nextEntry(ZipInputStream, String)},
- * i.e. message will contain only "broken.zip".
+ * {@link Analyzer#nextEntry(ZipInputStream, String)}, i.e. message will
+ * contain only "broken.zip".
*
* With JDK > 5 triggers exception in
- * {@link Analyzer#analyzeAll(java.io.InputStream, String)},
- * i.e. message will contain only "broken.zip@brokenentry.txt".
+ * {@link Analyzer#analyzeAll(java.io.InputStream, String)}, i.e. message
+ * will contain only "broken.zip@brokenentry.txt".
*/
@Test
public void testAnalyzeAll_BrokenZipEntry() throws IOException {
@@ -377,8 +418,8 @@ public class AnalyzerTest {
public void testAnalyzeAll_BrokenClassFileInZip() throws IOException {
final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
final ZipOutputStream zip = new ZipOutputStream(buffer);
- zip.putNextEntry(new ZipEntry(
- "org/jacoco/core/analysis/AnalyzerTest.class"));
+ zip.putNextEntry(
+ new ZipEntry("org/jacoco/core/analysis/AnalyzerTest.class"));
final byte[] brokenclass = TargetLoader
.getClassDataAsBytes(AnalyzerTest.class);
brokenclass[10] = 0x23;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/CounterComparatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/CounterComparatorTest.java
index 0523abeb..d488117c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/CounterComparatorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/CounterComparatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -110,12 +111,14 @@ public class CounterComparatorTest {
private void assertCmpLess(Comparator<ICounter> cmp, int missed1,
int covered1, int missed2, int covered2) {
- assertTrue(cmp.compare(ctr(missed1, covered1), ctr(missed2, covered2)) < 0);
+ assertTrue(cmp.compare(ctr(missed1, covered1),
+ ctr(missed2, covered2)) < 0);
}
private void assertCmpGreater(Comparator<ICounter> cmp, int missed1,
int covered1, int missed2, int covered2) {
- assertTrue(cmp.compare(ctr(missed1, covered1), ctr(missed2, covered2)) > 0);
+ assertTrue(cmp.compare(ctr(missed1, covered1),
+ ctr(missed2, covered2)) > 0);
}
private CounterImpl ctr(int missed, int covered) {
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageBuilderTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageBuilderTest.java
index f29bb74d..b89582e1 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageBuilderTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageBuilderTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -141,13 +142,13 @@ public class CoverageBuilderTest {
@Test
public void testCreateSourceFile() {
- final MethodCoverageImpl method1 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method1 = new MethodCoverageImpl("doit", "()V",
+ null);
method1.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 3);
addClass(123L, false, "Sample", "Sample.java", method1);
- final MethodCoverageImpl method2 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method2 = new MethodCoverageImpl("doit", "()V",
+ null);
method2.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 6);
addClass(234L, false, "Second", "Sample.java", method2);
@@ -162,13 +163,13 @@ public class CoverageBuilderTest {
@Test
public void testCreateSourceFileDuplicateClassNameIdentical() {
- final MethodCoverageImpl method1 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method1 = new MethodCoverageImpl("doit", "()V",
+ null);
method1.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 3);
addClass(123L, false, "Sample", "Sample.java", method1);
- final MethodCoverageImpl method2 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method2 = new MethodCoverageImpl("doit", "()V",
+ null);
method2.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 3);
addClass(123L, false, "Sample", "Sample.java", method2);
@@ -183,18 +184,18 @@ public class CoverageBuilderTest {
@Test
public void testGetBundle() {
- final MethodCoverageImpl method1 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method1 = new MethodCoverageImpl("doit", "()V",
+ null);
method1.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 3);
addClass(1, false, "org/jacoco/examples/Sample1", null, method1);
- final MethodCoverageImpl method2 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method2 = new MethodCoverageImpl("doit", "()V",
+ null);
method2.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 6);
addClass(2, false, "org/jacoco/examples/Sample2", null, method2);
- final MethodCoverageImpl method3 = new MethodCoverageImpl("doit",
- "()V", null);
+ final MethodCoverageImpl method3 = new MethodCoverageImpl("doit", "()V",
+ null);
method3.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 1);
addClass(3, false, "Sample3", null, method3);
@@ -211,8 +212,7 @@ public class CoverageBuilderTest {
IPackageCoverage p1 = packagesByName.get("org/jacoco/examples");
assertNotNull(p1);
assertEquals(
- new HashSet<String>(Arrays.asList(
- "org/jacoco/examples/Sample1",
+ new HashSet<String>(Arrays.asList("org/jacoco/examples/Sample1",
"org/jacoco/examples/Sample2")),
getNames(p1.getClasses()));
@@ -236,9 +236,10 @@ public class CoverageBuilderTest {
m.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 3);
addClass(3, false, "Sample3", null, m);
- final Set<String> actual = getNames(coverageBuilder.getNoMatchClasses());
- final Set<String> expected = new HashSet<String>(Arrays.asList(
- "Sample1", "Sample2"));
+ final Set<String> actual = getNames(
+ coverageBuilder.getNoMatchClasses());
+ final Set<String> expected = new HashSet<String>(
+ Arrays.asList("Sample1", "Sample2"));
assertEquals(expected, actual);
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageNodeImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageNodeImplTest.java
index be1afdfa..0777bc90 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageNodeImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/CoverageNodeImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -52,7 +53,8 @@ public class CoverageNodeImplTest {
public void testIncrement() {
CoverageNodeImpl parent = new CoverageNodeImpl(ElementType.GROUP,
"sample");
- ICoverageNode child = new CoverageNodeImpl(ElementType.GROUP, "sample") {
+ ICoverageNode child = new CoverageNodeImpl(ElementType.GROUP,
+ "sample") {
{
instructionCounter = CounterImpl.getInstance(1, 41);
branchCounter = CounterImpl.getInstance(10, 15);
@@ -67,8 +69,10 @@ public class CoverageNodeImplTest {
parent.getCounter(INSTRUCTION));
assertEquals(CounterImpl.getInstance(1, 41),
parent.getInstructionCounter());
- assertEquals(CounterImpl.getInstance(10, 15), parent.getCounter(BRANCH));
- assertEquals(CounterImpl.getInstance(10, 15), parent.getBranchCounter());
+ assertEquals(CounterImpl.getInstance(10, 15),
+ parent.getCounter(BRANCH));
+ assertEquals(CounterImpl.getInstance(10, 15),
+ parent.getBranchCounter());
assertEquals(CounterImpl.getInstance(5, 3), parent.getCounter(LINE));
assertEquals(CounterImpl.getInstance(5, 3), parent.getLineCounter());
assertEquals(CounterImpl.getInstance(4, 2),
@@ -85,12 +89,14 @@ public class CoverageNodeImplTest {
public void testIncrementCollection() {
CoverageNodeImpl parent = new CoverageNodeImpl(ElementType.GROUP,
"sample");
- ICoverageNode child1 = new CoverageNodeImpl(ElementType.GROUP, "sample") {
+ ICoverageNode child1 = new CoverageNodeImpl(ElementType.GROUP,
+ "sample") {
{
branchCounter = CounterImpl.getInstance(5, 2);
}
};
- ICoverageNode child2 = new CoverageNodeImpl(ElementType.GROUP, "sample") {
+ ICoverageNode child2 = new CoverageNodeImpl(ElementType.GROUP,
+ "sample") {
{
branchCounter = CounterImpl.getInstance(3, 3);
}
@@ -120,7 +126,8 @@ public class CoverageNodeImplTest {
assertEquals(CounterImpl.getInstance(4, 4),
copy.getInstructionCounter());
assertEquals(CounterImpl.getInstance(5, 5), copy.getLineCounter());
- assertEquals(CounterImpl.getInstance(6, 6), copy.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(6, 6),
+ copy.getComplexityCounter());
}
@Test
diff --git a/org.jacoco.core.test/src/org/jacoco/core/analysis/NodeComparatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/analysis/NodeComparatorTest.java
index 97c8b2f4..f3eca2c0 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/analysis/NodeComparatorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/analysis/NodeComparatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -34,9 +35,9 @@ public class NodeComparatorTest {
ICoverageNode d3 = new MockNode(30);
ICoverageNode d4 = new MockNode(60);
ICoverageNode d5 = new MockNode(99);
- final List<ICoverageNode> result = CounterComparator.TOTALITEMS.on(
- CounterEntity.INSTRUCTION).sort(
- Arrays.asList(d3, d5, d1, d4, d2));
+ final List<ICoverageNode> result = CounterComparator.TOTALITEMS
+ .on(CounterEntity.INSTRUCTION)
+ .sort(Arrays.asList(d3, d5, d1, d4, d2));
assertEquals(Arrays.asList(d1, d2, d3, d4, d5), result);
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java
index f3379943..2cc2c97d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataReaderWriterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -151,8 +152,8 @@ public class ExecutionDataReaderWriterTest {
@Test(expected = IOException.class)
public void testMissingHeader() throws IOException {
buffer.reset();
- writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample",
- createData(8)));
+ writer.visitClassExecution(
+ new ExecutionData(Long.MIN_VALUE, "Sample", createData(8)));
createReaderWithVisitors().read();
}
@@ -164,8 +165,8 @@ public class ExecutionDataReaderWriterTest {
@Test(expected = EOFException.class)
public void testTruncatedFile() throws IOException {
- writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample",
- createData(8)));
+ writer.visitClassExecution(
+ new ExecutionData(Long.MIN_VALUE, "Sample", createData(8)));
final byte[] content = buffer.toByteArray();
buffer.reset();
buffer.write(content, 0, content.length - 1);
@@ -216,16 +217,16 @@ public class ExecutionDataReaderWriterTest {
@Test(expected = IOException.class)
public void testNoExecutionDataVisitor() throws IOException {
- writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample",
- createData(8)));
+ writer.visitClassExecution(
+ new ExecutionData(Long.MIN_VALUE, "Sample", createData(8)));
createReader().read();
}
@Test
public void testMinClassId() throws IOException {
final boolean[] data = createData(8);
- writer.visitClassExecution(new ExecutionData(Long.MIN_VALUE, "Sample",
- data));
+ writer.visitClassExecution(
+ new ExecutionData(Long.MIN_VALUE, "Sample", data));
assertFalse(createReaderWithVisitors().read());
assertArrayEquals(data, store.get(Long.MIN_VALUE).getProbes());
}
@@ -233,8 +234,8 @@ public class ExecutionDataReaderWriterTest {
@Test
public void testMaxClassId() throws IOException {
final boolean[] data = createData(8);
- writer.visitClassExecution(new ExecutionData(Long.MAX_VALUE, "Sample",
- data));
+ writer.visitClassExecution(
+ new ExecutionData(Long.MAX_VALUE, "Sample", data));
assertFalse(createReaderWithVisitors().read());
assertArrayEquals(data, store.get(Long.MAX_VALUE).getProbes());
}
@@ -294,7 +295,8 @@ public class ExecutionDataReaderWriterTest {
}
});
broken[0] = true;
- writer.visitClassExecution(new ExecutionData(3, "Sample", createData(1)));
+ writer.visitClassExecution(
+ new ExecutionData(3, "Sample", createData(1)));
}
private ExecutionDataReader createReaderWithVisitors() throws IOException {
@@ -327,8 +329,8 @@ public class ExecutionDataReaderWriterTest {
}
protected ExecutionDataReader createReader() throws IOException {
- return new ExecutionDataReader(new ByteArrayInputStream(
- buffer.toByteArray()));
+ return new ExecutionDataReader(
+ new ByteArrayInputStream(buffer.toByteArray()));
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataStoreTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataStoreTest.java
index a54544db..a34f0675 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataStoreTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataStoreTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -205,8 +206,8 @@ public class ExecutionDataStoreTest implements IExecutionDataVisitor {
}
@Test
- public void testReset() throws InstantiationException,
- IllegalAccessException {
+ public void testReset()
+ throws InstantiationException, IllegalAccessException {
final boolean[] data1 = new boolean[] { true, true, false };
store.put(new ExecutionData(1000, "Sample", data1));
store.reset();
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataTest.java
index 12773dfc..be57a635 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/ExecutionDataTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -45,8 +46,8 @@ public class ExecutionDataTest {
@Test
public void testReset() {
- final ExecutionData e = new ExecutionData(5, "Example", new boolean[] {
- true, false, true });
+ final ExecutionData e = new ExecutionData(5, "Example",
+ new boolean[] { true, false, true });
e.reset();
assertFalse(e.getProbes()[0]);
assertFalse(e.getProbes()[1]);
@@ -71,10 +72,10 @@ public class ExecutionDataTest {
@Test
public void testMerge() {
- final ExecutionData a = new ExecutionData(5, "Example", new boolean[] {
- false, true, false, true });
- final ExecutionData b = new ExecutionData(5, "Example", new boolean[] {
- false, false, true, true });
+ final ExecutionData a = new ExecutionData(5, "Example",
+ new boolean[] { false, true, false, true });
+ final ExecutionData b = new ExecutionData(5, "Example",
+ new boolean[] { false, false, true, true });
a.merge(b);
// b is merged into a:
@@ -92,10 +93,10 @@ public class ExecutionDataTest {
@Test
public void testMergeSubtract() {
- final ExecutionData a = new ExecutionData(5, "Example", new boolean[] {
- false, true, false, true });
- final ExecutionData b = new ExecutionData(5, "Example", new boolean[] {
- false, false, true, true });
+ final ExecutionData a = new ExecutionData(5, "Example",
+ new boolean[] { false, true, false, true });
+ final ExecutionData b = new ExecutionData(5, "Example",
+ new boolean[] { false, false, true, true });
a.merge(b, false);
// b is subtracted from a:
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/IncompatibleExecDataVersionExceptionTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/IncompatibleExecDataVersionExceptionTest.java
index d4179e00..de1607d4 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/IncompatibleExecDataVersionExceptionTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/IncompatibleExecDataVersionExceptionTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoStoreTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoStoreTest.java
index 508d4d94..7a2ca49f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoStoreTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoStoreTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoTest.java b/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoTest.java
index 568c4fad..dfd7c987 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/data/SessionInfoTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -35,15 +36,12 @@ public class SessionInfoTest {
@Test
public void testCompare() {
- assertEquals(0,
- new SessionInfo("id", 1000, 2000).compareTo(new SessionInfo(
- "id", 1234, 2000)));
- assertEquals(-1,
- new SessionInfo("id", 3333, 1999).compareTo(new SessionInfo(
- "id", 1234, 2000)));
- assertEquals(+1,
- new SessionInfo("id", 1234, 2001).compareTo(new SessionInfo(
- "id", 2222, 2000)));
+ assertEquals(0, new SessionInfo("id", 1000, 2000)
+ .compareTo(new SessionInfo("id", 1234, 2000)));
+ assertEquals(-1, new SessionInfo("id", 3333, 1999)
+ .compareTo(new SessionInfo("id", 1234, 2000)));
+ assertEquals(+1, new SessionInfo("id", 1234, 2001)
+ .compareTo(new SessionInfo("id", 2222, 2000)));
}
@Test
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
index 9a9bd557..264c23a7 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/ClassFileVersionsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.instr;
@@ -26,6 +27,10 @@ import static org.objectweb.asm.Opcodes.RETURN;
import static org.objectweb.asm.Opcodes.V10;
import static org.objectweb.asm.Opcodes.V11;
import static org.objectweb.asm.Opcodes.V12;
+import static org.objectweb.asm.Opcodes.V13;
+import static org.objectweb.asm.Opcodes.V14;
+import static org.objectweb.asm.Opcodes.V15;
+import static org.objectweb.asm.Opcodes.V16;
import static org.objectweb.asm.Opcodes.V1_1;
import static org.objectweb.asm.Opcodes.V1_2;
import static org.objectweb.asm.Opcodes.V1_3;
@@ -116,7 +121,22 @@ public class ClassFileVersionsTest {
@Test
public void test_13() throws IOException {
- testVersion(V12 + 1, true);
+ testVersion(V13, true);
+ }
+
+ @Test
+ public void test_14() throws IOException {
+ testVersion(V14, true);
+ }
+
+ @Test
+ public void test_15() throws IOException {
+ testVersion(V15, true);
+ }
+
+ @Test
+ public void test_16() throws IOException {
+ testVersion(V16, true);
}
private void testVersion(int version, boolean frames) throws IOException {
@@ -167,7 +187,7 @@ public class ClassFileVersionsTest {
/**
* Creates a class that requires a frame before the return statement. Also
* for this class instrumentation should insert another frame.
- *
+ *
* <code><pre>
* public class Sample {
* public Sample(boolean b){
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
index d5104bcc..a3a49063 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/InstrumenterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.instr;
@@ -25,9 +26,7 @@ import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.Arrays;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Pack200;
+import java.util.zip.CRC32;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
@@ -35,10 +34,12 @@ import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import org.jacoco.core.analysis.AnalyzerTest;
+import org.jacoco.core.internal.Pack200Streams;
import org.jacoco.core.internal.data.CRC64;
import org.jacoco.core.internal.instr.InstrSupport;
import org.jacoco.core.runtime.IExecutionDataAccessorGenerator;
import org.jacoco.core.test.TargetLoader;
+import org.junit.AssumptionViolatedException;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.asm.ClassWriter;
@@ -98,7 +99,7 @@ public class InstrumenterTest {
@Test
public void should_not_modify_class_bytes_to_support_next_version()
throws Exception {
- final byte[] originalBytes = createClass(Opcodes.V12 + 1);
+ final byte[] originalBytes = createClass(Opcodes.V16);
final byte[] bytes = new byte[originalBytes.length];
System.arraycopy(originalBytes, 0, bytes, 0, originalBytes.length);
final long expectedClassId = CRC64.classId(bytes);
@@ -116,6 +117,23 @@ public class InstrumenterTest {
return cw.toByteArray();
}
+ /**
+ * @see #instrumentAll_should_throw_exception_for_unsupported_class_file_version()
+ */
+ @Test
+ public void instrument_should_throw_exception_for_unsupported_class_file_version() {
+ final byte[] bytes = createClass(Opcodes.V16 + 2);
+ try {
+ instrumenter.instrument(bytes, "UnsupportedVersion");
+ fail("exception expected");
+ } catch (final IOException e) {
+ assertEquals("Error while instrumenting UnsupportedVersion.",
+ e.getMessage());
+ assertEquals("Unsupported class file major version 62",
+ e.getCause().getMessage());
+ }
+ }
+
@Test
public void testInstrumentClass() throws Exception {
byte[] bytes = instrumenter.instrument(
@@ -196,11 +214,29 @@ public class InstrumenterTest {
new ObjectOutputStream(buffer).writeObject(obj1);
// Deserialize with original class definition:
- Object obj2 = new ObjectInputStream(new ByteArrayInputStream(
- buffer.toByteArray())).readObject();
+ Object obj2 = new ObjectInputStream(
+ new ByteArrayInputStream(buffer.toByteArray())).readObject();
assertEquals("Hello42", obj2.toString());
}
+ /**
+ * @see #instrument_should_throw_exception_for_unsupported_class_file_version()
+ */
+ @Test
+ public void instrumentAll_should_throw_exception_for_unsupported_class_file_version() {
+ final byte[] bytes = createClass(Opcodes.V16 + 2);
+ try {
+ instrumenter.instrumentAll(new ByteArrayInputStream(bytes),
+ new ByteArrayOutputStream(), "UnsupportedVersion");
+ fail("exception expected");
+ } catch (final IOException e) {
+ assertEquals("Error while instrumenting UnsupportedVersion.",
+ e.getMessage());
+ assertEquals("Unsupported class file major version 62",
+ e.getCause().getMessage());
+ }
+ }
+
@Test
public void testInstrumentAll_Class() throws IOException {
InputStream in = TargetLoader.getClassData(getClass());
@@ -215,18 +251,38 @@ public class InstrumenterTest {
public void testInstrumentAll_Zip() throws IOException {
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
ZipOutputStream zipout = new ZipOutputStream(buffer);
- zipout.putNextEntry(new ZipEntry("Test.class"));
+
+ // Compressed Entry
+ ZipEntry entry = new ZipEntry("TestCompressed.class");
+ entry.setMethod(ZipEntry.DEFLATED);
+ zipout.putNextEntry(entry);
+ zipout.write(TargetLoader.getClassDataAsBytes(getClass()));
+
+ // Uncompressed Entry
+ entry = new ZipEntry("TestUncompressed.class");
+ entry.setMethod(ZipEntry.STORED);
+ entry.setSize(TargetLoader.getClassDataAsBytes(getClass()).length);
+ CRC32 crc = new CRC32();
+ crc.update(TargetLoader.getClassDataAsBytes(getClass()));
+ entry.setCrc(crc.getValue());
+ zipout.putNextEntry(entry);
zipout.write(TargetLoader.getClassDataAsBytes(getClass()));
+
zipout.finish();
ByteArrayOutputStream out = new ByteArrayOutputStream();
int count = instrumenter.instrumentAll(
new ByteArrayInputStream(buffer.toByteArray()), out, "Test");
- assertEquals(1, count);
- ZipInputStream zipin = new ZipInputStream(new ByteArrayInputStream(
- out.toByteArray()));
- assertEquals("Test.class", zipin.getNextEntry().getName());
+ assertEquals(2, count);
+ ZipInputStream zipin = new ZipInputStream(
+ new ByteArrayInputStream(out.toByteArray()));
+ entry = zipin.getNextEntry();
+ assertEquals("TestCompressed.class", entry.getName());
+ assertEquals(ZipEntry.DEFLATED, entry.getMethod());
+ entry = zipin.getNextEntry();
+ assertEquals("TestUncompressed.class", entry.getName());
+ assertEquals(ZipEntry.STORED, entry.getMethod());
assertNull(zipin.getNextEntry());
}
@@ -362,6 +418,13 @@ public class InstrumenterTest {
@Test
public void testInstrumentAll_Pack200() throws IOException {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
ByteArrayOutputStream jarbuffer = new ByteArrayOutputStream();
ZipOutputStream zipout = new ZipOutputStream(jarbuffer);
zipout.putNextEntry(new ZipEntry("Test.class"));
@@ -370,23 +433,18 @@ public class InstrumenterTest {
ByteArrayOutputStream pack200buffer = new ByteArrayOutputStream();
GZIPOutputStream gzipOutput = new GZIPOutputStream(pack200buffer);
- Pack200.newPacker().pack(
- new JarInputStream(new ByteArrayInputStream(
- jarbuffer.toByteArray())), gzipOutput);
+ Pack200Streams.pack(jarbuffer.toByteArray(), gzipOutput);
gzipOutput.finish();
ByteArrayOutputStream out = new ByteArrayOutputStream();
- int count = instrumenter.instrumentAll(new ByteArrayInputStream(
- pack200buffer.toByteArray()), out, "Test");
-
- jarbuffer.reset();
- Pack200.newUnpacker()
- .unpack(new GZIPInputStream(new ByteArrayInputStream(
- out.toByteArray())), new JarOutputStream(jarbuffer));
+ int count = instrumenter.instrumentAll(
+ new ByteArrayInputStream(pack200buffer.toByteArray()), out,
+ "Test");
assertEquals(1, count);
- ZipInputStream zipin = new ZipInputStream(new ByteArrayInputStream(
- jarbuffer.toByteArray()));
+ ZipInputStream zipin = new ZipInputStream(
+ Pack200Streams.unpack(new GZIPInputStream(
+ new ByteArrayInputStream(out.toByteArray()))));
assertEquals("Test.class", zipin.getNextEntry().getName());
assertNull(zipin.getNextEntry());
}
@@ -433,8 +491,8 @@ public class InstrumenterTest {
new ByteArrayInputStream(buffer.toByteArray()), out, "Test");
assertEquals(0, count);
- ZipInputStream zipin = new ZipInputStream(new ByteArrayInputStream(
- out.toByteArray()));
+ ZipInputStream zipin = new ZipInputStream(
+ new ByteArrayInputStream(out.toByteArray()));
assertEquals("META-INF/MANIFEST.MF", zipin.getNextEntry().getName());
assertNull(zipin.getNextEntry());
}
@@ -452,8 +510,8 @@ public class InstrumenterTest {
new ByteArrayInputStream(buffer.toByteArray()), out, "Test");
assertEquals(0, count);
- ZipInputStream zipin = new ZipInputStream(new ByteArrayInputStream(
- out.toByteArray()));
+ ZipInputStream zipin = new ZipInputStream(
+ new ByteArrayInputStream(out.toByteArray()));
assertEquals("META-INF/ALIAS.SF", zipin.getNextEntry().getName());
assertNull(zipin.getNextEntry());
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/MethodRecorder.java b/org.jacoco.core.test/src/org/jacoco/core/instr/MethodRecorder.java
index 49a88bea..2f9f58ff 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/MethodRecorder.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/MethodRecorder.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.instr;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/instr/ResizeInstructionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/instr/ResizeInstructionsTest.java
index 1a8137cb..d162631b 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/instr/ResizeInstructionsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/instr/ResizeInstructionsTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -131,7 +132,7 @@ public class ResizeInstructionsTest {
/**
* Adds code that requires
* {@link ClassWriter#getCommonSuperClass(String, String)}.
- *
+ *
* <pre>
* Object o = this;
* while (true) {
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/ContentTypeDetectorTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/ContentTypeDetectorTest.java
index a631b52e..30398c7d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/ContentTypeDetectorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/ContentTypeDetectorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal;
@@ -18,13 +19,12 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.util.jar.JarInputStream;
-import java.util.jar.Pack200;
import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import org.jacoco.core.test.TargetLoader;
+import org.junit.AssumptionViolatedException;
import org.junit.Test;
/**
@@ -159,13 +159,44 @@ public class ContentTypeDetectorTest {
}
@Test
- public void should_detect_java_13_with_preview_features() throws IOException {
+ public void should_detect_java_13_with_preview_features()
+ throws IOException {
initData(0xCA, 0xFE, 0xBA, 0xBE, 0xFF, 0xFF, 0x00, 0x39);
assertEquals(ContentTypeDetector.CLASSFILE, detector.getType());
assertContent();
}
@Test
+ public void should_detect_java_14() throws IOException {
+ initData(0xCA, 0xFE, 0xBA, 0xBE, 0x00, 0x00, 0x00, 0x3A);
+ assertEquals(ContentTypeDetector.CLASSFILE, detector.getType());
+ assertContent();
+ }
+
+ @Test
+ public void should_detect_java_14_with_preview_features()
+ throws IOException {
+ initData(0xCA, 0xFE, 0xBA, 0xBE, 0xFF, 0xFF, 0x00, 0x3A);
+ assertEquals(ContentTypeDetector.CLASSFILE, detector.getType());
+ assertContent();
+ }
+
+ @Test
+ public void should_detect_java_42() throws IOException {
+ initData(0xCA, 0xFE, 0xBA, 0xBE, 0x00, 0x00, 0x00, 0x56);
+ assertEquals(ContentTypeDetector.CLASSFILE, detector.getType());
+ assertContent();
+ }
+
+ @Test
+ public void should_not_detect_MachO_fat_binary_with_44_architectures()
+ throws IOException {
+ initData(0xCA, 0xFE, 0xBA, 0xBE, 0x00, 0x00, 0x00, 0x2C);
+ assertEquals(ContentTypeDetector.UNKNOWN, detector.getType());
+ assertContent();
+ }
+
+ @Test
public void testMachObjectFile() throws IOException {
initData(0xCA, 0xFE, 0xBA, 0xBE, 0x00, 0x00, 0x00, 0x02);
assertEquals(ContentTypeDetector.UNKNOWN, detector.getType());
@@ -186,6 +217,13 @@ public class ContentTypeDetectorTest {
@Test
public void testPack200File() throws IOException {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
final ByteArrayOutputStream zipbuffer = new ByteArrayOutputStream();
final ZipOutputStream zip = new ZipOutputStream(zipbuffer);
zip.putNextEntry(new ZipEntry("hello.txt"));
@@ -193,9 +231,7 @@ public class ContentTypeDetectorTest {
zip.close();
final ByteArrayOutputStream pack200buffer = new ByteArrayOutputStream();
- Pack200.newPacker().pack(
- new JarInputStream(new ByteArrayInputStream(
- zipbuffer.toByteArray())), pack200buffer);
+ Pack200Streams.pack(zipbuffer.toByteArray(), pack200buffer);
initData(pack200buffer.toByteArray());
assertEquals(ContentTypeDetector.PACK200FILE, detector.getType());
assertContent();
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/Pack200StreamsTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/Pack200StreamsTest.java
index ce5676c5..8548cf0d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/Pack200StreamsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/Pack200StreamsTest.java
@@ -1,18 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream;
@@ -24,12 +26,12 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
-import java.util.jar.Pack200;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
import org.jacoco.core.test.TargetLoader;
+import org.junit.AssumptionViolatedException;
import org.junit.Test;
/**
@@ -38,7 +40,14 @@ import org.junit.Test;
public class Pack200StreamsTest {
@Test
- public void testPack() throws IOException {
+ public void pack_should_pack() throws Exception {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
ByteArrayOutputStream jarbuffer = new ByteArrayOutputStream();
ZipOutputStream zipout = new ZipOutputStream(jarbuffer);
zipout.putNextEntry(new ZipEntry("Test.class"));
@@ -46,22 +55,71 @@ public class Pack200StreamsTest {
zipout.finish();
ByteArrayOutputStream pack200buffer = new ByteArrayOutputStream();
- Pack200Streams.pack(jarbuffer.toByteArray(), new NoCloseOutputStream(
- pack200buffer));
+ Pack200Streams.pack(jarbuffer.toByteArray(),
+ new NoCloseOutputStream(pack200buffer));
jarbuffer.reset();
- Pack200.newUnpacker().unpack(
- new ByteArrayInputStream(pack200buffer.toByteArray()),
- new JarOutputStream(jarbuffer));
-
- ZipInputStream zipin = new ZipInputStream(new ByteArrayInputStream(
- jarbuffer.toByteArray()));
+ final Object unpacker = Class.forName("java.util.jar.Pack200")
+ .getMethod("newUnpacker").invoke(null);
+ Class.forName("java.util.jar.Pack200$Unpacker")
+ .getMethod("unpack", InputStream.class, JarOutputStream.class)
+ .invoke(unpacker,
+ new ByteArrayInputStream(pack200buffer.toByteArray()),
+ new JarOutputStream(jarbuffer));
+
+ ZipInputStream zipin = new ZipInputStream(
+ new ByteArrayInputStream(jarbuffer.toByteArray()));
assertEquals("Test.class", zipin.getNextEntry().getName());
assertNull(zipin.getNextEntry());
}
@Test
- public void testUnpack() throws IOException {
+ public void pack_should_throw_IOException_when_can_not_write_to_OutputStream() {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
+ final OutputStream outputStream = new BrokenOutputStream();
+ try {
+ Pack200Streams.pack(new byte[0], outputStream);
+ fail("expected exception");
+ } catch (IOException e) {
+ assertTrue(e.getCause() instanceof IOException);
+ assertEquals("fake broken output stream",
+ e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void pack_should_throw_IOException_when_Pack200_not_available_in_JDK() {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ throw new AssumptionViolatedException(
+ "this test requires JDK without Pack200");
+ } catch (ClassNotFoundException ignore) {
+ }
+
+ try {
+ Pack200Streams.pack(new byte[0], new ByteArrayOutputStream());
+ fail("expected exception");
+ } catch (IOException e) {
+ assertNull(e.getMessage());
+ assertTrue(e.getCause() instanceof ClassNotFoundException);
+ }
+ }
+
+ @Test
+ public void unpack_should_unpack() throws Exception {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
ByteArrayOutputStream jarbuffer = new ByteArrayOutputStream();
ZipOutputStream zipout = new ZipOutputStream(jarbuffer);
zipout.putNextEntry(new ZipEntry("Test.class"));
@@ -69,9 +127,13 @@ public class Pack200StreamsTest {
zipout.finish();
ByteArrayOutputStream pack200buffer = new ByteArrayOutputStream();
- Pack200.newPacker().pack(
- new JarInputStream(new ByteArrayInputStream(
- jarbuffer.toByteArray())), pack200buffer);
+ final Object packer = Class.forName("java.util.jar.Pack200")
+ .getMethod("newPacker").invoke(null);
+ Class.forName("java.util.jar.Pack200$Packer")
+ .getMethod("pack", JarInputStream.class, OutputStream.class)
+ .invoke(packer, new JarInputStream(
+ new ByteArrayInputStream(jarbuffer.toByteArray())),
+ pack200buffer);
InputStream result = Pack200Streams.unpack(new NoCloseInputStream(
new ByteArrayInputStream(pack200buffer.toByteArray())));
@@ -81,6 +143,43 @@ public class Pack200StreamsTest {
assertNull(zipin.getNextEntry());
}
+ @Test
+ public void unpack_should_throw_IOException_when_can_not_read_from_InputStream() {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ } catch (ClassNotFoundException e) {
+ throw new AssumptionViolatedException(
+ "this test requires JDK with Pack200");
+ }
+
+ final InputStream inputStream = new BrokenInputStream();
+ try {
+ Pack200Streams.unpack(inputStream);
+ fail("expected exception");
+ } catch (IOException e) {
+ assertTrue(e.getCause() instanceof IOException);
+ assertEquals("fake broken input stream", e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void unpack_should_throw_IOException_when_Pack200_not_available_in_JDK() {
+ try {
+ Class.forName("java.util.jar.Pack200");
+ throw new AssumptionViolatedException(
+ "this test requires JDK without Pack200");
+ } catch (ClassNotFoundException ignore) {
+ }
+
+ try {
+ Pack200Streams.unpack(new ByteArrayInputStream(new byte[0]));
+ fail("expected exception");
+ } catch (IOException e) {
+ assertNull(e.getMessage());
+ assertTrue(e.getCause() instanceof ClassNotFoundException);
+ }
+ }
+
static class NoCloseInputStream extends FilterInputStream {
public NoCloseInputStream(InputStream in) {
super(in);
@@ -103,4 +202,18 @@ public class Pack200StreamsTest {
}
}
+ private static class BrokenInputStream extends InputStream {
+ @Override
+ public int read() throws IOException {
+ throw new IOException("fake broken input stream");
+ }
+ }
+
+ private static class BrokenOutputStream extends OutputStream {
+ @Override
+ public void write(int b) throws IOException {
+ throw new IOException("fake broken output stream");
+ }
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/BundleCoverageImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/BundleCoverageImplTest.java
index 71d8e150..7ecf5293 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/BundleCoverageImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/BundleCoverageImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassAnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassAnalyzerTest.java
index 372c6023..c4565cc1 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassAnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassAnalyzerTest.java
@@ -1,22 +1,25 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
import org.jacoco.core.internal.flow.MethodProbesVisitor;
import org.jacoco.core.internal.instr.InstrSupport;
import org.junit.Before;
import org.junit.Test;
+import org.objectweb.asm.Attribute;
import org.objectweb.asm.Opcodes;
/**
@@ -57,4 +60,12 @@ public class ClassAnalyzerTest {
assertEquals(0, coverage.getMethods().size());
}
+ @Test
+ public void should_collect_attributes() {
+ assertTrue(analyzer.getClassAttributes().isEmpty());
+ analyzer.visitAttribute(new Attribute("foo") {
+ });
+ assertTrue(analyzer.getClassAttributes().contains("foo"));
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassCoverageImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassCoverageImplTest.java
index 7a53abf8..a59150b5 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassCoverageImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/ClassCoverageImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -115,8 +116,7 @@ public class ClassCoverageImplTest {
private MethodCoverageImpl createMethod(boolean covered) {
final MethodCoverageImpl m = new MethodCoverageImpl("sample", "()V",
null);
- m.increment(
- covered ? CounterImpl.COUNTER_0_1 : CounterImpl.COUNTER_1_0,
+ m.increment(covered ? CounterImpl.COUNTER_0_1 : CounterImpl.COUNTER_1_0,
CounterImpl.COUNTER_0_0, ISourceNode.UNKNOWN_LINE);
m.incrementMethodCounter();
return m;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/CounterImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/CounterImplTest.java
index 9e55820f..13f2c5e0 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/CounterImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/CounterImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionTest.java
index e7e167e2..1d3f1d32 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java
index b938caa7..eb430d16 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/InstructionsBuilderTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -15,7 +16,7 @@ import static org.junit.Assert.assertEquals;
import java.util.Map;
-import org.jacoco.core.analysis.ISourceFileCoverage;
+import org.jacoco.core.analysis.ISourceNode;
import org.jacoco.core.internal.flow.LabelInfo;
import org.junit.Before;
import org.junit.Test;
@@ -52,7 +53,7 @@ public class InstructionsBuilderTest {
builder.addInstruction(i4);
Map<AbstractInsnNode, Instruction> map = builder.getInstructions();
- assertEquals(ISourceFileCoverage.UNKNOWN_LINE, map.get(i1).getLine());
+ assertEquals(ISourceNode.UNKNOWN_LINE, map.get(i1).getLine());
assertEquals(10, map.get(i2).getLine());
assertEquals(10, map.get(i3).getLine());
assertEquals(20, map.get(i4).getLine());
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/LineImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/LineImplTest.java
index 115c72e6..add6a46d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/LineImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/LineImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java
index 01b29db4..b25d4ce2 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodAnalyzerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java
index 306bc792..4ef23cde 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageCalculatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -18,7 +19,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
-import org.jacoco.core.analysis.ISourceFileCoverage;
+import org.jacoco.core.analysis.ISourceNode;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.asm.Opcodes;
@@ -204,15 +205,15 @@ public class MethodCoverageCalculatorTest {
@Test
public void should_work_without_lines() {
- addInsn(ISourceFileCoverage.UNKNOWN_LINE, false);
- addInsn(ISourceFileCoverage.UNKNOWN_LINE, false);
- addInsn(ISourceFileCoverage.UNKNOWN_LINE, true);
+ addInsn(ISourceNode.UNKNOWN_LINE, false);
+ addInsn(ISourceNode.UNKNOWN_LINE, false);
+ addInsn(ISourceNode.UNKNOWN_LINE, true);
MethodCoverageCalculator c = new MethodCoverageCalculator(instructions);
c.calculate(coverage);
- assertEquals(ISourceFileCoverage.UNKNOWN_LINE, coverage.getFirstLine());
- assertEquals(ISourceFileCoverage.UNKNOWN_LINE, coverage.getLastLine());
+ assertEquals(ISourceNode.UNKNOWN_LINE, coverage.getFirstLine());
+ assertEquals(ISourceNode.UNKNOWN_LINE, coverage.getLastLine());
assertEquals(CounterImpl.getInstance(2, 1),
coverage.getInstructionCounter());
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageImplTest.java
index 5a100b0e..0300d726 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/MethodCoverageImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -59,8 +60,8 @@ public class MethodCoverageImplTest {
@Test
public void testIncrementCoveredInstructions() {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
- node.increment(CounterImpl.getInstance(12, 13),
- CounterImpl.COUNTER_0_0, 3);
+ node.increment(CounterImpl.getInstance(12, 13), CounterImpl.COUNTER_0_0,
+ 3);
node.incrementMethodCounter();
assertEquals(CounterImpl.COUNTER_0_1, node.getMethodCounter());
assertEquals(CounterImpl.COUNTER_0_1, node.getComplexityCounter());
@@ -78,7 +79,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(2, 0),
3);
- assertEquals(CounterImpl.getInstance(1, 0), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(1, 0),
+ node.getComplexityCounter());
}
@Test
@@ -86,7 +88,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(1, 1),
3);
- assertEquals(CounterImpl.getInstance(1, 0), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(1, 0),
+ node.getComplexityCounter());
}
@Test
@@ -94,7 +97,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(0, 2),
3);
- assertEquals(CounterImpl.getInstance(0, 1), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(0, 1),
+ node.getComplexityCounter());
}
@Test
@@ -102,7 +106,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(3, 0),
3);
- assertEquals(CounterImpl.getInstance(2, 0), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(2, 0),
+ node.getComplexityCounter());
}
@Test
@@ -110,7 +115,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(2, 1),
3);
- assertEquals(CounterImpl.getInstance(2, 0), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(2, 0),
+ node.getComplexityCounter());
}
@Test
@@ -118,7 +124,8 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(1, 2),
3);
- assertEquals(CounterImpl.getInstance(1, 1), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(1, 1),
+ node.getComplexityCounter());
}
@Test
@@ -126,6 +133,7 @@ public class MethodCoverageImplTest {
MethodCoverageImpl node = new MethodCoverageImpl("sample", "()V", null);
node.increment(CounterImpl.COUNTER_0_0, CounterImpl.getInstance(0, 3),
3);
- assertEquals(CounterImpl.getInstance(0, 2), node.getComplexityCounter());
+ assertEquals(CounterImpl.getInstance(0, 2),
+ node.getComplexityCounter());
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/PackageCoverageTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/PackageCoverageTest.java
index 1d81a027..0a390999 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/PackageCoverageTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/PackageCoverageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -28,12 +29,12 @@ public class PackageCoverageTest {
@Test
public void testProperties() {
- Collection<IClassCoverage> classes = Collections
- .singleton((IClassCoverage) new ClassCoverageImpl(
- "org/jacoco/test/Sample", 0, false));
- Collection<ISourceFileCoverage> sourceFiles = Collections
- .singleton((ISourceFileCoverage) new SourceFileCoverageImpl(
- "Sample.java", "org/jacoco/test/Sample"));
+ Collection<IClassCoverage> classes = Collections.singleton(
+ (IClassCoverage) new ClassCoverageImpl("org/jacoco/test/Sample",
+ 0, false));
+ Collection<ISourceFileCoverage> sourceFiles = Collections.singleton(
+ (ISourceFileCoverage) new SourceFileCoverageImpl("Sample.java",
+ "org/jacoco/test/Sample"));
PackageCoverageImpl data = new PackageCoverageImpl("org/jacoco/test",
classes, sourceFiles);
assertEquals(ICoverageNode.ElementType.PACKAGE, data.getElementType());
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java
index ed83ebaf..207d0081 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceFileCoverageImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceNodeImplTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceNodeImplTest.java
index 25010428..d6d87381 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceNodeImplTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/SourceNodeImplTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -24,7 +25,8 @@ public class SourceNodeImplTest {
@Test
public void testInit() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
assertEquals(ElementType.CLASS, node.getElementType());
assertEquals("Foo", node.getName());
assertEquals(ISourceNode.UNKNOWN_LINE, node.getFirstLine());
@@ -34,7 +36,8 @@ public class SourceNodeImplTest {
@Test
public void testGetLine() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.ensureCapacity(10, 20);
assertEquals(LineImpl.EMPTY, node.getLine(5));
assertEquals(LineImpl.EMPTY, node.getLine(15));
@@ -43,21 +46,24 @@ public class SourceNodeImplTest {
@Test
public void testEnsureCapacityUnknown1() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.ensureCapacity(10, ISourceNode.UNKNOWN_LINE);
assertEquals(LineImpl.EMPTY, node.getLine(10));
}
@Test
public void testEnsureCapacityUnknown2() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.ensureCapacity(ISourceNode.UNKNOWN_LINE, 10);
assertEquals(LineImpl.EMPTY, node.getLine(10));
}
@Test
public void testIncrementLineUnknown() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.increment(CounterImpl.getInstance(1, 2),
CounterImpl.getInstance(3, 4), ISourceNode.UNKNOWN_LINE);
assertEquals(CounterImpl.getInstance(1, 2),
@@ -68,18 +74,19 @@ public class SourceNodeImplTest {
@Test
public void testIncrementLines() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.increment(CounterImpl.getInstance(1, 1), CounterImpl.COUNTER_0_0,
10);
node.increment(CounterImpl.getInstance(2, 2), CounterImpl.COUNTER_0_0,
12);
- assertEquals(CounterImpl.getInstance(1, 1), node.getLine(10)
- .getInstructionCounter());
- assertEquals(CounterImpl.COUNTER_0_0, node.getLine(11)
- .getInstructionCounter());
- assertEquals(CounterImpl.getInstance(2, 2), node.getLine(12)
- .getInstructionCounter());
+ assertEquals(CounterImpl.getInstance(1, 1),
+ node.getLine(10).getInstructionCounter());
+ assertEquals(CounterImpl.COUNTER_0_0,
+ node.getLine(11).getInstructionCounter());
+ assertEquals(CounterImpl.getInstance(2, 2),
+ node.getLine(12).getInstructionCounter());
}
@Test
@@ -164,20 +171,22 @@ public class SourceNodeImplTest {
private void testIncrementLine(int mi1, int ci1, int mi2, int ci2,
int expectedMissedLines, int expectedCoveredLines) {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
node.increment(CounterImpl.getInstance(mi1, ci1),
CounterImpl.COUNTER_0_0, 33);
node.increment(CounterImpl.getInstance(mi2, ci2),
CounterImpl.COUNTER_0_0, 33);
assertEquals(CounterImpl.getInstance(expectedMissedLines,
expectedCoveredLines), node.getLineCounter());
- assertEquals(CounterImpl.getInstance(mi1 + mi2, ci1 + ci2), node
- .getLine(33).getInstructionCounter());
+ assertEquals(CounterImpl.getInstance(mi1 + mi2, ci1 + ci2),
+ node.getLine(33).getInstructionCounter());
}
@Test
public void testIncrementChildNoLines() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
final SourceNodeImpl child = new SourceNodeImpl(ElementType.CLASS,
"Foo") {
{
@@ -197,7 +206,8 @@ public class SourceNodeImplTest {
@Test
public void testIncrementChildWithLines() {
- final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS, "Foo");
+ final SourceNodeImpl node = new SourceNodeImpl(ElementType.CLASS,
+ "Foo");
final SourceNodeImpl child = new SourceNodeImpl(ElementType.CLASS,
"Foo");
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/StringPoolTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/StringPoolTest.java
index eca2460c..b6c21f82 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/StringPoolTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/StringPoolTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AbstractMatcherTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AbstractMatcherTest.java
index f659632d..be11d7e3 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AbstractMatcherTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AbstractMatcherTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -201,6 +202,10 @@ public class AbstractMatcherTest {
@Test
public void firstIsALoad0() {
+ // should set cursor to null when no opcodes are present
+ matcher.firstIsALoad0(m);
+ assertNull(matcher.cursor);
+
// should set cursor to null when opcode mismatch
m.visitInsn(Opcodes.NOP);
matcher.firstIsALoad0(m);
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilterTest.java
index b8a0331b..5ce20a76 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/BridgeFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/BridgeFilterTest.java
new file mode 100644
index 00000000..d7308fe4
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/BridgeFilterTest.java
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.jacoco.core.internal.instr.InstrSupport;
+import org.junit.Test;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Unit tests for {@link BridgeFilter}.
+ */
+public class BridgeFilterTest extends FilterTestBase {
+
+ private final BridgeFilter filter = new BridgeFilter();
+
+ @Test
+ public void should_filter_bridge_methods() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_BRIDGE, "m", "()Ljava/lang/Object;", null, null);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_non_bridge_methods() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "m", "()Ljava/lang/Object;", null, null);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilterTest.java
index 32bc9df3..2bc447e0 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -38,7 +39,8 @@ public class EnumEmptyConstructorFilterTest extends FilterTestBase {
filter.filter(m, context, output);
- assertIgnored(new Range(m.instructions.getFirst(), m.instructions.getLast()));
+ assertIgnored(
+ new Range(m.instructions.getFirst(), m.instructions.getLast()));
}
/**
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumFilterTest.java
index 23f69f4e..ff11cda7 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/EnumFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterContextMock.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterContextMock.java
index a6c881d3..c39bd18f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterContextMock.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterContextMock.java
@@ -1,48 +1,54 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.internal.analysis.filter;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * {@link IFilterContext} mock for unit tests.
- */
-public class FilterContextMock implements IFilterContext {
-
- public String className = "Foo";
- public String superClassName = "java/lang/Object";
- public Set<String> classAnnotations = new HashSet<String>();
- public String sourceFileName = "Foo.java";
- public String sourceDebugExtension;
-
- public String getClassName() {
- return className;
- }
-
- public String getSuperClassName() {
- return superClassName;
- }
-
- public Set<String> getClassAnnotations() {
- return classAnnotations;
- }
-
- public String getSourceFileName() {
- return sourceFileName;
- }
-
- public String getSourceDebugExtension() {
- return sourceDebugExtension;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * {@link IFilterContext} mock for unit tests.
+ */
+public class FilterContextMock implements IFilterContext {
+
+ public String className = "Foo";
+ public String superClassName = "java/lang/Object";
+ public Set<String> classAnnotations = new HashSet<String>();
+ public Set<String> classAttributes = new HashSet<String>();
+ public String sourceFileName = "Foo.java";
+ public String sourceDebugExtension;
+
+ public String getClassName() {
+ return className;
+ }
+
+ public String getSuperClassName() {
+ return superClassName;
+ }
+
+ public Set<String> getClassAnnotations() {
+ return classAnnotations;
+ }
+
+ public Set<String> getClassAttributes() {
+ return classAttributes;
+ }
+
+ public String getSourceFileName() {
+ return sourceFileName;
+ }
+
+ public String getSourceDebugExtension() {
+ return sourceDebugExtension;
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterTestBase.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterTestBase.java
index 2378bee3..4408c581 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterTestBase.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FilterTestBase.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FinallyFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FinallyFilterTest.java
index 6a9cf67f..6fc23ec3 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FinallyFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/FinallyFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -239,7 +240,7 @@ public class FinallyFilterTest implements IFilterOutput {
/**
* javac >= 1.8
- *
+ *
* Probably related to https://bugs.openjdk.java.net/browse/JDK-7093325
*/
@Test
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilterTest.java
index 127ae309..f96ed78e 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -32,12 +33,11 @@ public class KotlinCoroutineFilterTest extends FilterTestBase {
context.classAnnotations
.add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
- m.visitLabel(new Label());
- final Range range1 = new Range();
- range1.fromInclusive = m.instructions.getLast();
m.visitMethodInsn(Opcodes.INVOKESTATIC,
"kotlin/coroutines/intrinsics/IntrinsicsKt",
"getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;", false);
+ final Range range1 = new Range();
+ range1.fromInclusive = m.instructions.getLast();
m.visitVarInsn(Opcodes.ASTORE, 4);
m.visitVarInsn(Opcodes.ALOAD, 0);
@@ -128,12 +128,11 @@ public class KotlinCoroutineFilterTest extends FilterTestBase {
context.classAnnotations
.add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
- m.visitLabel(new Label());
- final Range range1 = new Range();
- range1.fromInclusive = m.instructions.getLast();
m.visitMethodInsn(Opcodes.INVOKESTATIC,
"kotlin/coroutines/intrinsics/IntrinsicsKt",
"getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;", false);
+ final Range range1 = new Range();
+ range1.fromInclusive = m.instructions.getLast();
m.visitVarInsn(Opcodes.ASTORE, 4);
m.visitVarInsn(Opcodes.ALOAD, 0);
@@ -373,4 +372,80 @@ public class KotlinCoroutineFilterTest extends FilterTestBase {
assertIgnored(range0, range1, range2);
}
+ /**
+ * <pre>
+ * suspend fun example(b: Boolean) {
+ * if (b)
+ * suspendingFunction()
+ * else
+ * suspendingFunction()
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_suspending_functions_with_tail_call_optimization() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example",
+ "(ZLkotlin/coroutines/Continuation;)Ljava/lang/Object;", null,
+ null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+
+ final Label exit = new Label();
+
+ m.visitVarInsn(Opcodes.ILOAD, 1);
+ final Label next = new Label();
+ m.visitJumpInsn(Opcodes.IFEQ, next);
+
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "", "suspendingFunction",
+ "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", false);
+ final Range range1 = new Range();
+ {
+ m.visitInsn(Opcodes.DUP);
+ range1.fromInclusive = m.instructions.getLast();
+ m.visitMethodInsn(Opcodes.INVOKESTATIC,
+ "kotlin/coroutines/intrinsics/IntrinsicsKt",
+ "getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;", false);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IF_ACMPNE, label);
+ m.visitInsn(Opcodes.ARETURN);
+ m.visitLabel(label);
+ m.visitInsn(Opcodes.POP);
+ range1.toInclusive = m.instructions.getLast();
+ }
+
+ m.visitJumpInsn(Opcodes.GOTO, exit);
+ m.visitLabel(next);
+
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "", "suspendingFunction",
+ "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", false);
+ final Range range2 = new Range();
+ {
+ m.visitInsn(Opcodes.DUP);
+ range2.fromInclusive = m.instructions.getLast();
+ m.visitMethodInsn(Opcodes.INVOKESTATIC,
+ "kotlin/coroutines/intrinsics/IntrinsicsKt",
+ "getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;", false);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IF_ACMPNE, label);
+ m.visitInsn(Opcodes.ARETURN);
+ m.visitLabel(label);
+ m.visitInsn(Opcodes.POP);
+ range2.toInclusive = m.instructions.getLast();
+ }
+
+ m.visitLabel(exit);
+ m.visitFieldInsn(Opcodes.GETSTATIC, "kotlin/Unit", "INSTANCE",
+ "Lkotlin/Unit;");
+ m.visitInsn(Opcodes.ARETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(range1, range2);
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilterTest.java
index 8dfa765e..2e33173c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -95,4 +96,127 @@ public class KotlinDefaultArgumentsFilterTest extends FilterTestBase {
assertIgnored();
}
+ /**
+ * <pre>
+ * open class Open {
+ * open fun foo(a: Int = 42) {
+ * }
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_open_functions() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "foo$default",
+ "(LOpen;IILjava/lang/Object;)V", null, null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ {
+ m.visitVarInsn(Opcodes.ALOAD, 3);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFNULL, label);
+ m.visitTypeInsn(Opcodes.NEW,
+ "java/lang/UnsupportedOperationException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitLdcInsn(
+ "Super calls with default arguments not supported in this target, function: foo");
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/UnsupportedOperationException", "<init>",
+ "(Ljava/lang/String;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ m.visitLabel(label);
+ }
+ {
+ m.visitVarInsn(Opcodes.ILOAD, 2);
+ m.visitInsn(Opcodes.ICONST_1);
+ m.visitInsn(Opcodes.IAND);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFEQ, label);
+ // default argument
+ m.visitLdcInsn(Integer.valueOf(42));
+ m.visitVarInsn(Opcodes.ISTORE, 1);
+ m.visitLabel(label);
+
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ILOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "Open", "foo", "(I)V",
+ false);
+ m.visitInsn(Opcodes.RETURN);
+ }
+
+ filter.filter(m, context, output);
+
+ assertIgnored(
+ new Range(m.instructions.getFirst(), m.instructions.get(6)),
+ new Range(m.instructions.get(11), m.instructions.get(11)));
+ }
+
+ /**
+ * <pre>
+ * class C(a: Int = 42)
+ * </pre>
+ */
+ @Test
+ public void should_filter_constructors() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "<init>",
+ "(IILkotlin/jvm/internal/DefaultConstructorMarker;)V", null,
+ null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+
+ m.visitVarInsn(Opcodes.ILOAD, 2);
+ m.visitInsn(Opcodes.ICONST_1);
+ m.visitInsn(Opcodes.IAND);
+ Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFEQ, label);
+ // default argument
+ m.visitLdcInsn(Integer.valueOf(42));
+ m.visitVarInsn(Opcodes.ISTORE, 1);
+ m.visitLabel(label);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ILOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "Owner", "<init>", "(I)V",
+ false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(m.instructions.get(3), m.instructions.get(3)));
+ }
+
+ /**
+ * <pre>
+ * data class C(val x: Long = 42)
+ * </pre>
+ */
+ @Test
+ public void should_filter_methods_with_parameters_that_consume_two_slots() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "<init>",
+ "(JILkotlin/jvm/internal/DefaultConstructorMarker;)V", null,
+ null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+
+ m.visitVarInsn(Opcodes.ILOAD, 3);
+ m.visitInsn(Opcodes.ICONST_1);
+ m.visitInsn(Opcodes.IAND);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFEQ, label);
+ // default argument
+ m.visitLdcInsn(Integer.valueOf(42));
+ m.visitVarInsn(Opcodes.ISTORE, 1);
+ m.visitLabel(label);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ILOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL, "Owner", "<init>", "(J)V",
+ false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(m.instructions.get(3), m.instructions.get(3)));
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilterTest.java
new file mode 100644
index 00000000..0c9e40a1
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilterTest.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.jacoco.core.internal.instr.InstrSupport;
+import org.junit.Test;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Unit test for {@link KotlinDefaultMethodsFilter}.
+ */
+public class KotlinDefaultMethodsFilterTest extends FilterTestBase {
+
+ private final IFilter filter = new KotlinDefaultMethodsFilter();
+
+ @Test
+ public void should_filter() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "m", "()V", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Target$DefaultImpls", "m",
+ "(LTarget;)V", false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_when_invokestatic_owner_does_not_match() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "m", "()V", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Target", "m", "(LTarget;)V",
+ false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_when_instructions_do_not_match() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "m", "()V", null, null);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_when_not_kotlin() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "m", "()V", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "Target$DefaultImpls", "m",
+ "(LTarget;)V", false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilterTest.java
index 8a6e8356..287ac563 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Nikolay Krasko - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilterTest.java
index fe3b9553..beb49816 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -162,6 +163,47 @@ public class KotlinInlineFilterTest extends FilterTestBase {
assertIgnored(expectedRanges.toArray(new Range[0]));
}
+ /**
+ * See <a href="https://youtrack.jetbrains.com/issue/KT-37704">KT-37704</a>
+ *
+ * <pre>
+ * inline fun f() {}
+ * fun g() = f()
+ * </pre>
+ */
+ @Test
+ public void should_filter_without_parsing_KotlinDebug_stratum() {
+ context.sourceFileName = "Example.kt";
+ context.sourceDebugExtension = "" //
+ + "SMAP\n" //
+ + "Example.kt\n" // OutputFileName=Example.kt
+ + "Kotlin\n" // DefaultStratumId=Kotlin
+ + "*S Kotlin\n" // StratumID=Kotlin
+ + "*F\n" // FileSection
+ + "+ 1 Example.kt\n" // FileID=1,FileName=Example.kt
+ + "ExampleKt\n" //
+ + "*L\n" // LineSection
+ + "1#1,3:1\n" // InputStartLine=1,LineFileID=1,RepeatCount=3,OutputStartLine=1
+ + "1#1:4\n" // InputStartLine=1,LineFileID=1,OutputStartLine=4
+ + "*S KotlinDebug\n"; // StratumID=KotlinDebug
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+
+ m.visitLineNumber(2, new Label());
+ m.visitInsn(Opcodes.ICONST_0);
+ m.visitVarInsn(Opcodes.ISTORE, 0);
+ m.visitLineNumber(4, new Label());
+ shouldIgnorePrevious(m);
+ m.visitInsn(Opcodes.NOP);
+ shouldIgnorePrevious(m);
+ m.visitLineNumber(3, new Label());
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(expectedRanges.toArray(new Range[0]));
+ }
+
@Test
public void should_not_parse_SourceDebugExtension_attribute_when_no_kotlin_metadata_annotation() {
context.sourceDebugExtension = "SMAP";
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilterTest.java
index c9e34bab..85cbd16c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
@@ -58,4 +59,41 @@ public class KotlinLateinitFilterTest extends FilterTestBase {
assertIgnored(new Range(expectedFrom, expectedTo));
}
+ /**
+ * <pre>
+ * class Example {
+ * private lateinit var x: String
+ * fun example() = x
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_Kotlin_1_5() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example", "()Ljava/lang/String;", null, null);
+ Label label = new Label();
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitFieldInsn(Opcodes.GETFIELD, "Example", "x",
+ "Ljava/lang/String;");
+ m.visitVarInsn(Opcodes.ASTORE, 1);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitJumpInsn(Opcodes.IFNONNULL, label);
+ final AbstractInsnNode expectedFrom = m.instructions.getLast();
+ m.visitLdcInsn("x");
+ m.visitMethodInsn(Opcodes.INVOKESTATIC,
+ "kotlin/jvm/internal/Intrinsics",
+ "throwUninitializedPropertyAccessException",
+ "(Ljava/lang/String;)V", false);
+ m.visitInsn(Opcodes.ACONST_NULL);
+ m.visitInsn(Opcodes.ATHROW);
+ final AbstractInsnNode expectedTo = m.instructions.getLast();
+ m.visitLabel(label);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitInsn(Opcodes.ARETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(expectedFrom, expectedTo));
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilterTest.java
index 0d08ae3f..263fe472 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilterTest.java
index 9fc3b3da..308b866c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -30,6 +31,8 @@ public class KotlinUnsafeCastOperatorFilterTest extends FilterTestBase {
@Test
public void should_filter() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
final Label label = new Label();
m.visitInsn(Opcodes.DUP);
@@ -49,4 +52,92 @@ public class KotlinUnsafeCastOperatorFilterTest extends FilterTestBase {
assertIgnored(new Range(expectedFrom, expectedTo));
}
+ @Test
+ public void should_filter_Kotlin_1_4() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ final Label label = new Label();
+
+ m.visitInsn(Opcodes.DUP);
+ m.visitJumpInsn(Opcodes.IFNONNULL, label);
+ final AbstractInsnNode expectedFrom = m.instructions.getLast();
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/NullPointerException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitLdcInsn("null cannot be cast to non-null type kotlin.String");
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/NullPointerException", "<init>",
+ "(Ljava/lang/String;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ final AbstractInsnNode expectedTo = m.instructions.getLast();
+ m.visitLabel(label);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(expectedFrom, expectedTo));
+ }
+
+ /**
+ * For
+ *
+ * <pre>
+ * fun f(s: String?): String {
+ * return s as String
+ * }
+ * </pre>
+ *
+ * bytecode generated by Kotlin compiler version 1.4 is different from
+ * bytecode generated by version 1.5, unfortunately bytecode generated by
+ * later is the same as bytecode that both versions generate for
+ *
+ * <pre>
+ * fun f(s: String?): String {
+ * if (s == null)
+ * throw NullPointerException("null cannot be cast to non-null type kotlin.String")
+ * return s
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_Kotlin_1_5() {
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFNONNULL, label);
+ final AbstractInsnNode expectedFrom = m.instructions.getLast();
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/NullPointerException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitLdcInsn("null cannot be cast to non-null type kotlin.String");
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/NullPointerException", "<init>",
+ "(Ljava/lang/String;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ final AbstractInsnNode expectedTo = m.instructions.getLast();
+ m.visitLabel(label);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(expectedFrom, expectedTo));
+ }
+
+ @Test
+ public void should_not_filter_when_not_kotlin() {
+ m.visitInsn(Opcodes.DUP);
+ final Label label = new Label();
+ m.visitJumpInsn(Opcodes.IFNONNULL, label);
+ m.visitTypeInsn(Opcodes.NEW, "java/lang/NullPointerException");
+ m.visitInsn(Opcodes.DUP);
+ m.visitLdcInsn("null cannot be cast to non-null type kotlin.String");
+ m.visitMethodInsn(Opcodes.INVOKESPECIAL,
+ "java/lang/NullPointerException", "<init>",
+ "(Ljava/lang/String;)V", false);
+ m.visitInsn(Opcodes.ATHROW);
+ m.visitLabel(label);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilterTest.java
index 04d40a05..447cc279 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilterTest.java
index df42803d..f3a548c5 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -105,4 +106,97 @@ public class KotlinWhenStringFilterTest extends FilterTestBase {
assertIgnored(new Range(expectedFromInclusive, expectedToInclusive));
}
+ /**
+ * <pre>
+ * fun example(p: String) {
+ * when (p) {
+ * "b" -> return
+ * "a" -> return
+ * "\u0000a" -> return
+ * }
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_when_biggest_hashCode_first() {
+ final Set<AbstractInsnNode> expectedNewTargets = new HashSet<AbstractInsnNode>();
+
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example", "(Ljava/lang/String;)V", null, null);
+
+ final Label h1 = new Label();
+ final Label sameHash = new Label();
+ final Label h2 = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ final Label case3 = new Label();
+ final Label defaultCase = new Label();
+
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "hashCode",
+ "()I", false);
+ m.visitTableSwitchInsn(97, 98, defaultCase, h1, h2);
+
+ m.visitLabel(h1);
+ final AbstractInsnNode expectedFromInclusive = m.instructions.getLast();
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitLdcInsn("a");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFEQ, sameHash);
+ m.visitJumpInsn(Opcodes.GOTO, case2);
+
+ m.visitLabel(sameHash);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitLdcInsn("\u0000a");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFEQ, defaultCase);
+ m.visitJumpInsn(Opcodes.GOTO, case3);
+
+ m.visitLabel(h2);
+ m.visitVarInsn(Opcodes.ALOAD, 2);
+ m.visitLdcInsn("b");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFEQ, defaultCase);
+ final AbstractInsnNode expectedToInclusive = m.instructions.getLast();
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case3);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(defaultCase);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(expectedFromInclusive, expectedToInclusive));
+ assertReplacedBranches(expectedFromInclusive.getPrevious(),
+ expectedNewTargets);
+ }
+
+ @Test
+ public void should_not_filter_empty_lookup_switch() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "name", "(Ljava/lang/String;)V", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "hashCode",
+ "()I", false);
+ final Label defaultCase = new Label();
+ m.visitLookupSwitchInsn(defaultCase, null, new Label[] {});
+ m.visitLabel(defaultCase);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilterTest.java
index ac42e64e..8f7cc446 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java
new file mode 100644
index 00000000..48fd63c1
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/RecordsFilterTest.java
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.jacoco.core.internal.instr.InstrSupport;
+import org.junit.Test;
+import org.objectweb.asm.Handle;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Unit tests for {@link RecordsFilter}.
+ */
+public class RecordsFilterTest extends FilterTestBase {
+
+ private final RecordsFilter filter = new RecordsFilter();
+
+ @Test
+ public void should_filter_generated_toString_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "toString", "()Ljava/lang/String;", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitInvokeDynamicInsn("toString", "(LPoint;)Ljava/lang/String;",
+ new Handle(Opcodes.H_INVOKESTATIC,
+ "java/lang/runtime/ObjectMethods", "bootstrap",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;",
+ false));
+ m.visitInsn(Opcodes.ARETURN);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_custom_toString_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "toString", "()Ljava/lang/String;", null, null);
+ m.visitLdcInsn("");
+ m.visitInsn(Opcodes.ARETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_non_toString_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "toString", "()V", null, null);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_filter_generated_hashCode_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "hashCode", "()I", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitInvokeDynamicInsn("hashCode", "(LPoint;)I", new Handle(
+ Opcodes.H_INVOKESTATIC, "java/lang/runtime/ObjectMethods",
+ "bootstrap",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;",
+ false));
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_custom_hashCode_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "hashCode", "()I", null, null);
+ m.visitInsn(Opcodes.ICONST_0);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_non_hashCode_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "hashCode", "()V", null, null);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_filter_generated_equals_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "equals", "(Ljava/lang/Object;)Z", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitInvokeDynamicInsn("equals", "(LPoint;Ljava/lang/Object;)Z",
+ new Handle(Opcodes.H_INVOKESTATIC,
+ "java/lang/runtime/ObjectMethods", "bootstrap",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;",
+ false));
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_custom_equals_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "equals", "(Ljava/lang/Object;)Z", null, null);
+ m.visitInsn(Opcodes.ICONST_0);
+ m.visitInsn(Opcodes.IRETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_non_equals_method() {
+ context.superClassName = "java/lang/Record";
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "equals", "()V", null, null);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_non_records() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "toString", "()Ljava/lang/String;", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitInvokeDynamicInsn("toString", "(LPoint;)Ljava/lang/String;",
+ new Handle(Opcodes.H_INVOKESTATIC,
+ "java/lang/runtime/ObjectMethods", "bootstrap",
+ "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;",
+ false));
+ m.visitInsn(Opcodes.ARETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilterTest.java
index 3f726185..44bb10f1 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -22,11 +23,11 @@ import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.MethodNode;
/**
- * Unit tests for {@link StringSwitchEcjFilter}.
+ * Unit tests for {@link StringSwitchFilter}.
*/
-public class StringSwitchEcjFilterTest extends FilterTestBase {
+public class StringSwitchFilterTest extends FilterTestBase {
- private final IFilter filter = new StringSwitchEcjFilter();
+ private final IFilter filter = new StringSwitchFilter();
@Test
public void should_filter() {
@@ -155,4 +156,135 @@ public class StringSwitchEcjFilterTest extends FilterTestBase {
assertIgnored(new Range(switchNode.getNext(), expectedToInclusive));
}
+ /**
+ * <pre>
+ * fun example(p: String) {
+ * when (p) {
+ * "a" -> return
+ * "\u0000a" -> return
+ * "b" -> return
+ * "\u0000b" -> return
+ * "c" -> return
+ * "\u0000c" -> return
+ * }
+ * }
+ * </pre>
+ */
+ @Test
+ public void should_filter_Kotlin_1_5() {
+ final Set<AbstractInsnNode> expectedNewTargets = new HashSet<AbstractInsnNode>();
+
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "example", "()V", null, null);
+
+ final Label h1 = new Label();
+ final Label h2 = new Label();
+ final Label h3 = new Label();
+ final Label defaultCase = new Label();
+ final Label case1 = new Label();
+ final Label case2 = new Label();
+ final Label case3 = new Label();
+ final Label case4 = new Label();
+ final Label case5 = new Label();
+ final Label case6 = new Label();
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "hashCode",
+ "()I", false);
+ m.visitTableSwitchInsn(97, 99, defaultCase, h1, h2, h3);
+
+ m.visitLabel(h1);
+ final AbstractInsnNode expectedFromInclusive = m.instructions.getLast();
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("a");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case1);
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("\u0000a");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case2);
+
+ m.visitJumpInsn(Opcodes.GOTO, defaultCase);
+
+ m.visitLabel(h2);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("b");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case3);
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("\u0000b");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case4);
+
+ m.visitJumpInsn(Opcodes.GOTO, defaultCase);
+
+ m.visitLabel(h3);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("c");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case5);
+
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitLdcInsn("\u0000c");
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "equals",
+ "(Ljava/lang/Object;)Z", false);
+ m.visitJumpInsn(Opcodes.IFNE, case6);
+
+ m.visitJumpInsn(Opcodes.GOTO, defaultCase);
+ final AbstractInsnNode expectedToInclusive = m.instructions.getLast();
+
+ m.visitLabel(case1);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case2);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case3);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case4);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case5);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(case6);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+ m.visitLabel(defaultCase);
+ m.visitInsn(Opcodes.RETURN);
+ expectedNewTargets.add(m.instructions.getLast());
+
+ filter.filter(m, context, output);
+
+ assertIgnored(new Range(expectedFromInclusive, expectedToInclusive));
+ assertReplacedBranches(expectedFromInclusive.getPrevious(),
+ expectedNewTargets);
+ }
+
+ @Test
+ public void should_not_filter_empty_lookup_switch() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION, 0,
+ "name", "(Ljava/lang/String;)V", null, null);
+ m.visitVarInsn(Opcodes.ALOAD, 1);
+ m.visitVarInsn(Opcodes.ASTORE, 2);
+ m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/String", "hashCode",
+ "()I", false);
+ final Label defaultCase = new Label();
+ m.visitLookupSwitchInsn(defaultCase, null, new Label[] {});
+ m.visitLabel(defaultCase);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilterTest.java
index 592c6998..8b47302f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilterTest.java
index a40b2349..34a0439c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -152,7 +153,7 @@ public class SynchronizedFilterTest extends FilterTestBase {
filter.filter(m, context, output);
assertIgnored(new Range((LabelNode) handler.info,
- ((LabelNode) exit.info).getPrevious()));
+ ((LabelNode) exit.info).getPrevious()));
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java
index 5bbae983..affc39bc 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/SyntheticFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -57,6 +58,38 @@ public class SyntheticFilterTest extends FilterTestBase {
}
@Test
+ public void should_filter_synthetic_method_with_prefix_anonfun_in_non_Scala_classes() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "$anonfun$main$1", "()V", null, null);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+ assertMethodIgnored(m);
+ }
+
+ @Test
+ public void should_not_filter_synthetic_method_with_prefix_anonfun_in_Scala_classes() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "$anonfun$main$1", "()V", null, null);
+ m.visitInsn(Opcodes.RETURN);
+
+ context.classAttributes.add("ScalaSig");
+ filter.filter(m, context, output);
+ assertIgnored();
+ }
+
+ @Test
+ public void should_not_filter_synthetic_method_with_prefix_anonfun_in_Scala_inner_classes() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "$anonfun$main$1", "()V", null, null);
+ m.visitInsn(Opcodes.RETURN);
+
+ context.classAttributes.add("Scala");
+ filter.filter(m, context, output);
+ assertIgnored();
+ }
+
+ @Test
public void should_not_filter_method_with_suffix_default_in_kotlin_classes() {
final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
Opcodes.ACC_SYNTHETIC | Opcodes.ACC_BRIDGE, "example$default",
@@ -83,6 +116,32 @@ public class SyntheticFilterTest extends FilterTestBase {
}
@Test
+ public void should_not_filter_synthetic_constructor_containing_default_arguments_in_kotlin_classes() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_SYNTHETIC, "<init>",
+ "(IILkotlin/jvm/internal/DefaultConstructorMarker;)V", null,
+ null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ m.visitInsn(Opcodes.NOP);
+
+ filter.filter(m, context, output);
+
+ assertIgnored();
+ }
+
+ /**
+ * For private suspending function Kotlin compiler versions prior to 1.5
+ * produce package-local synthetic method that should not be filtered
+ *
+ * <pre>
+ * private suspend fun example() {
+ * }
+ * </pre>
+ *
+ * @see #should_filter_synthetic_methods_whose_name_starts_with_access_dollar_even_if_last_argument_is_kotlin_coroutine_continuation()
+ */
+ @Test
public void should_not_filter_synthetic_methods_whose_last_argument_is_kotlin_coroutine_continuation() {
final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
Opcodes.ACC_SYNTHETIC | Opcodes.ACC_STATIC, "example",
@@ -97,4 +156,36 @@ public class SyntheticFilterTest extends FilterTestBase {
assertIgnored();
}
+ /**
+ * For private suspending function Kotlin compiler versions starting from
+ * 1.5 produce additional public synthetic method with name starting with
+ * "access$" that should be filtered
+ *
+ * <pre>
+ * private suspend fun example() {
+ * }
+ * </pre>
+ *
+ * @see #should_not_filter_synthetic_methods_whose_last_argument_is_kotlin_coroutine_continuation()
+ */
+ @Test
+ public void should_filter_synthetic_methods_whose_name_starts_with_access_dollar_even_if_last_argument_is_kotlin_coroutine_continuation() {
+ final MethodNode m = new MethodNode(InstrSupport.ASM_API_VERSION,
+ Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC | Opcodes.ACC_FINAL
+ | Opcodes.ACC_SYNTHETIC,
+ "access$example",
+ "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", null,
+ null);
+ context.classAnnotations
+ .add(KotlinGeneratedFilter.KOTLIN_METADATA_DESC);
+ m.visitVarInsn(Opcodes.ALOAD, 0);
+ m.visitMethodInsn(Opcodes.INVOKESTATIC, "ExampleKt", "example",
+ "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", false);
+ m.visitInsn(Opcodes.RETURN);
+
+ filter.filter(m, context, output);
+
+ assertMethodIgnored(m);
+ }
+
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilterTest.java
index 2a930d0d..45b9135d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -313,7 +314,7 @@ public class TryWithResourcesEcjFilterTest extends FilterTestBase {
/**
* ECJ for
- *
+ *
* <pre>
* try (r1 = ...; r2 = ...; r3 = ...) {
* return ...
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11FilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11FilterTest.java
index cab9ee1f..5f20c8e1 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11FilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11FilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -49,8 +50,8 @@ public class TryWithResourcesJavac11FilterTest extends FilterTestBase {
m.visitVarInsn(Opcodes.ALOAD, 0);
range1.fromInclusive = m.instructions.getLast();
- m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close",
- "()V", false);
+ m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close", "()V",
+ false);
m.visitJumpInsn(Opcodes.GOTO, e);
range1.toInclusive = m.instructions.getLast();
@@ -58,15 +59,15 @@ public class TryWithResourcesJavac11FilterTest extends FilterTestBase {
range2.fromInclusive = m.instructions.getLast();
m.visitVarInsn(Opcodes.ASTORE, 1);
m.visitVarInsn(Opcodes.ALOAD, 0);
- m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close",
- "()V", false);
+ m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close", "()V",
+ false);
m.visitJumpInsn(Opcodes.GOTO, t);
m.visitVarInsn(Opcodes.ASTORE, 2);
m.visitVarInsn(Opcodes.ALOAD, 1);
m.visitVarInsn(Opcodes.ALOAD, 2);
m.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Throwable",
- "addSuppressed", "(Ljava/lang/Throwable;)V", false);
+ "addSuppressed", "(Ljava/lang/Throwable;)V", false);
m.visitLabel(t);
m.visitVarInsn(Opcodes.ALOAD, 1);
m.visitInsn(Opcodes.ATHROW);
@@ -103,8 +104,8 @@ public class TryWithResourcesJavac11FilterTest extends FilterTestBase {
range1.fromInclusive = m.instructions.getLast();
m.visitJumpInsn(Opcodes.IFNULL, e);
m.visitVarInsn(Opcodes.ALOAD, 0);
- m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close",
- "()V", false);
+ m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close", "()V",
+ false);
m.visitJumpInsn(Opcodes.GOTO, e);
range1.toInclusive = m.instructions.getLast();
@@ -114,8 +115,8 @@ public class TryWithResourcesJavac11FilterTest extends FilterTestBase {
m.visitVarInsn(Opcodes.ALOAD, 0);
m.visitJumpInsn(Opcodes.IFNULL, t);
m.visitVarInsn(Opcodes.ALOAD, 0);
- m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close",
- "()V", false);
+ m.visitMethodInsn(Opcodes.INVOKEINTERFACE, "Resource", "close", "()V",
+ false);
m.visitJumpInsn(Opcodes.GOTO, t);
m.visitVarInsn(Opcodes.ASTORE, 2);
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilterTest.java
index 002ad339..8e414f27 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilterTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -222,7 +223,7 @@ public class TryWithResourcesJavacFilterTest extends FilterTestBase {
/**
* javac 7 and 8 for
- *
+ *
* <pre>
* try (r0 = ...; r1 = ...) {
* return ...
@@ -539,7 +540,7 @@ public class TryWithResourcesJavacFilterTest extends FilterTestBase {
/**
* javac 9 for
- *
+ *
* <pre>
* try (r = new ...) {
* ...
@@ -705,7 +706,7 @@ public class TryWithResourcesJavacFilterTest extends FilterTestBase {
/**
* javac 9 for
- *
+ *
* <pre>
* try (r = new ...) {
* throw ...
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/data/CRC64Test.java b/org.jacoco.core.test/src/org/jacoco/core/internal/data/CRC64Test.java
index 821e2fae..d477b74f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/data/CRC64Test.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/data/CRC64Test.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.data;
@@ -60,7 +61,7 @@ public class CRC64Test {
/**
* Example taken from http://swissknife.sourceforge.net/docs/CRC64.html
- *
+ *
* @throws UnsupportedEncodingException
*/
@Test
@@ -71,26 +72,26 @@ public class CRC64Test {
/**
* Example generated with http://fsumfe.sourceforge.net/
- *
+ *
* @throws UnsupportedEncodingException
*/
@Test
public void test2() {
- final long sum = CRC64.classId(new byte[] { (byte) 0xff, (byte) 0xff,
- (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
- (byte) 0xff, (byte) 0xff });
+ final long sum = CRC64.classId(
+ new byte[] { (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff,
+ (byte) 0xff, (byte) 0xff, (byte) 0xff, (byte) 0xff });
assertEquals(0x5300000000000000L, sum);
}
/**
* Example generated with http://fsumfe.sourceforge.net/
- *
+ *
* @throws UnsupportedEncodingException
*/
@Test
public void test3() throws UnsupportedEncodingException {
- final long sum = CRC64.classId("JACOCO_JACOCO_JACOCO_JACOCO"
- .getBytes("ASCII"));
+ final long sum = CRC64
+ .classId("JACOCO_JACOCO_JACOCO_JACOCO".getBytes("ASCII"));
assertEquals(0xD8016B38AAD48308L, sum);
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/data/CompactDataInputOutputTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/data/CompactDataInputOutputTest.java
index 798bf0d2..26bbef97 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/data/CompactDataInputOutputTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/data/CompactDataInputOutputTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.data;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/ClassProbesAdapterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/ClassProbesAdapterTest.java
index bc9be31c..211433e3 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/ClassProbesAdapterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/ClassProbesAdapterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -31,14 +32,14 @@ public class ClassProbesAdapterTest {
boolean frame = false;
@Override
- public void visitJumpInsnWithProbe(int opcode, Label label,
- int probeId, IFrame frame) {
+ public void visitJumpInsnWithProbe(int opcode, Label label, int probeId,
+ IFrame frame) {
frame.accept(this);
}
@Override
- public void visitTableSwitchInsnWithProbes(int min, int max,
- Label dflt, Label[] labels, IFrame frame) {
+ public void visitTableSwitchInsnWithProbes(int min, int max, Label dflt,
+ Label[] labels, IFrame frame) {
frame.accept(this);
}
@@ -49,8 +50,8 @@ public class ClassProbesAdapterTest {
}
@Override
- public void visitFrame(int type, int nLocal, Object[] local,
- int nStack, Object[] stack) {
+ public void visitFrame(int type, int nLocal, Object[] local, int nStack,
+ Object[] stack) {
frame = true;
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/FrameSnapshotTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/FrameSnapshotTest.java
index c78fe44e..f7578086 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/FrameSnapshotTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/FrameSnapshotTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelFlowAnalyzerTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelFlowAnalyzerTest.java
index b7ac2588..ff6c4ed3 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelFlowAnalyzerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelFlowAnalyzerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -127,8 +128,8 @@ public class LabelFlowAnalyzerTest {
public void testFlowScenario11() {
// Even if the same label is referenced multiple times but from the same
// source instruction this is only counted as one target.
- analyzer.visitLookupSwitchInsn(label, new int[] { 0, 1 }, new Label[] {
- label, label });
+ analyzer.visitLookupSwitchInsn(label, new int[] { 0, 1 },
+ new Label[] { label, label });
assertFalse(LabelInfo.isMultiTarget(label));
assertFalse(LabelInfo.isSuccessor(label));
}
@@ -137,7 +138,8 @@ public class LabelFlowAnalyzerTest {
public void testFlowScenario12() {
// Even if the same label is referenced multiple times but from the same
// source instruction this is only counted as one target.
- analyzer.visitTableSwitchInsn(0, 1, label, new Label[] { label, label });
+ analyzer.visitTableSwitchInsn(0, 1, label,
+ new Label[] { label, label });
assertFalse(LabelInfo.isMultiTarget(label));
assertFalse(LabelInfo.isSuccessor(label));
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelInfoTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelInfoTest.java
index 2ca1339a..ea7c17c8 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelInfoTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/LabelInfoTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodProbesAdapterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodProbesAdapterTest.java
index ad32aeaf..33337902 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodProbesAdapterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodProbesAdapterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -63,16 +64,16 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
}
@Override
- public void visitJumpInsnWithProbe(int opcode, Label label,
- int probeId, IFrame frame) {
+ public void visitJumpInsnWithProbe(int opcode, Label label, int probeId,
+ IFrame frame) {
rec("visitJumpInsnWithProbe", Integer.valueOf(opcode), label,
Integer.valueOf(probeId));
frame.accept(this);
}
@Override
- public void visitTableSwitchInsnWithProbes(int min, int max,
- Label dflt, Label[] labels, IFrame frame) {
+ public void visitTableSwitchInsnWithProbes(int min, int max, Label dflt,
+ Label[] labels, IFrame frame) {
rec("visitTableSwitchInsnWithProbes", Integer.valueOf(min),
Integer.valueOf(max), dflt, labels);
frame.accept(this);
@@ -170,10 +171,10 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
adapter.visitJumpInsn(Opcodes.GOTO, label);
- expectedVisitor
- .visitJumpInsnWithProbe(Opcodes.GOTO, label, 1000, frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitJumpInsnWithProbe(Opcodes.GOTO, label, 1000,
+ frame);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
}
@Test
@@ -185,10 +186,10 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
adapter.visitJumpInsn(Opcodes.IFLT, label);
expectedVisitor.visitInsn(Opcodes.ICONST_0);
- expectedVisitor
- .visitJumpInsnWithProbe(Opcodes.IFLT, label, 1000, frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitJumpInsnWithProbe(Opcodes.IFLT, label, 1000,
+ frame);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
}
@Test
@@ -213,8 +214,8 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitJumpInsnWithProbe(Opcodes.IF_ICMPEQ, label, 1000,
frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
}
@Test
@@ -230,8 +231,8 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitLookupSwitchInsnWithProbes(label, keys, labels,
frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
assertEquals(1000, LabelInfo.getProbeId(label));
}
@@ -249,8 +250,8 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitLookupSwitchInsnWithProbes(label, keys, labels,
frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
assertEquals(LabelInfo.NO_PROBE, LabelInfo.getProbeId(label));
assertEquals(1000, LabelInfo.getProbeId(label2));
}
@@ -278,8 +279,8 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitTableSwitchInsnWithProbes(0, 1, label, labels,
frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
assertEquals(1000, LabelInfo.getProbeId(label));
}
@@ -296,8 +297,8 @@ public class MethodProbesAdapterTest implements IProbeIdGenerator {
expectedVisitor.visitInsn(Opcodes.ICONST_0);
expectedVisitor.visitTableSwitchInsnWithProbes(0, 1, label, labels,
frame);
- expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" },
- 0, null);
+ expectedVisitor.visitFrame(Opcodes.F_FULL, 1, new Object[] { "Foo" }, 0,
+ null);
assertEquals(LabelInfo.NO_PROBE, LabelInfo.getProbeId(label));
assertEquals(1000, LabelInfo.getProbeId(label2));
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodSanitizerTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodSanitizerTest.java
index d4724054..08ac10d6 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodSanitizerTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/flow/MethodSanitizerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java
index c5ef8201..7ae215df 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ClassInstrumenterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -27,9 +28,9 @@ public class ClassInstrumenterTest implements IProbeArrayStrategy {
@Before
public void setup() {
- instrumenter = new ClassInstrumenter(this, new ClassVisitor(
- InstrSupport.ASM_API_VERSION) {
- });
+ instrumenter = new ClassInstrumenter(this,
+ new ClassVisitor(InstrSupport.ASM_API_VERSION) {
+ });
}
@Test(expected = IllegalStateException.class)
@@ -48,14 +49,15 @@ public class ClassInstrumenterTest implements IProbeArrayStrategy {
@Test
public void testNoMethodVisitor() {
- instrumenter = new ClassInstrumenter(this, new ClassVisitor(
- InstrSupport.ASM_API_VERSION) {
- @Override
- public MethodVisitor visitMethod(int access, String name,
- String desc, String signature, String[] exceptions) {
- return null;
- }
- });
+ instrumenter = new ClassInstrumenter(this,
+ new ClassVisitor(InstrSupport.ASM_API_VERSION) {
+ @Override
+ public MethodVisitor visitMethod(int access, String name,
+ String desc, String signature,
+ String[] exceptions) {
+ return null;
+ }
+ });
assertNull(instrumenter.visitMethod(0, "foo", "()V", null, null));
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java
index 6397a59b..af97addb 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategyTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java
index 4098189f..8183e8f7 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/DuplicateFrameEliminatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -82,14 +83,14 @@ public class DuplicateFrameEliminatorTest {
@Test
public void testTypeInsn() {
- testInstructionBetweenFrames(new TypeInsnNode(Opcodes.NEW,
- "java/lang/Object"));
+ testInstructionBetweenFrames(
+ new TypeInsnNode(Opcodes.NEW, "java/lang/Object"));
}
@Test
public void testFieldInsn() {
- testInstructionBetweenFrames(new FieldInsnNode(Opcodes.GETFIELD, "Foo",
- "f", "I"));
+ testInstructionBetweenFrames(
+ new FieldInsnNode(Opcodes.GETFIELD, "Foo", "f", "I"));
}
@Test
@@ -106,8 +107,8 @@ public class DuplicateFrameEliminatorTest {
@Test
public void testJumpInsn() {
- testInstructionBetweenFrames(new JumpInsnNode(Opcodes.GOTO,
- new LabelNode()));
+ testInstructionBetweenFrames(
+ new JumpInsnNode(Opcodes.GOTO, new LabelNode()));
}
@Test
@@ -134,8 +135,8 @@ public class DuplicateFrameEliminatorTest {
@Test
public void testMultiANewArrayInsn() {
- testInstructionBetweenFrames(new MultiANewArrayInsnNode(
- "java/lang/String", 4));
+ testInstructionBetweenFrames(
+ new MultiANewArrayInsnNode("java/lang/String", 4));
}
private void testInstructionBetweenFrames(AbstractInsnNode node) {
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
index 8345ac1b..6a47d55f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/InstrSupportTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -15,11 +16,10 @@ import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
@@ -36,9 +36,6 @@ public class InstrSupportTest {
private Printer printer;
private TraceMethodVisitor trace;
- @Rule
- public ExpectedException exception = ExpectedException.none();
-
@Before
public void setup() {
printer = new Textifier();
@@ -46,8 +43,8 @@ public class InstrSupportTest {
}
@Test
- public void classReaderFor_should_read_java_13_class() {
- final byte[] bytes = createJava13Class();
+ public void classReaderFor_should_read_java_16_class() {
+ final byte[] bytes = createJava16Class();
final ClassReader classReader = InstrSupport.classReaderFor(bytes);
@@ -56,16 +53,16 @@ public class InstrSupportTest {
public void visit(final int version, final int access,
final String name, final String signature,
final String superName, final String[] interfaces) {
- assertEquals(Opcodes.V12 + 1, version);
+ assertEquals(Opcodes.V16, version);
}
}, 0);
- assertArrayEquals(createJava13Class(), bytes);
+ assertArrayEquals(createJava16Class(), bytes);
}
- private static byte[] createJava13Class() {
+ private static byte[] createJava16Class() {
final ClassWriter cw = new ClassWriter(0);
- cw.visit(Opcodes.V12 + 1, 0, "Foo", null, "java/lang/Object", null);
+ cw.visit(Opcodes.V16, 0, "Foo", null, "java/lang/Object", null);
cw.visitEnd();
return cw.toByteArray();
}
@@ -127,7 +124,10 @@ public class InstrSupportTest {
assertTrue(InstrSupport.needsFrames(Opcodes.V10));
assertTrue(InstrSupport.needsFrames(Opcodes.V11));
assertTrue(InstrSupport.needsFrames(Opcodes.V12));
- assertTrue(InstrSupport.needsFrames(Opcodes.V12 + 1));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V13));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V14));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V15));
+ assertTrue(InstrSupport.needsFrames(Opcodes.V16));
assertTrue(InstrSupport.needsFrames(0x0100));
}
@@ -139,20 +139,26 @@ public class InstrSupportTest {
@Test
public void assertNotIntrumented_should_throw_exception_when_jacoco_data_field_is_present() {
- exception.expect(IllegalStateException.class);
- exception.expectMessage(
- "Cannot process instrumented class Foo. Please supply original non-instrumented classes.");
-
- InstrSupport.assertNotInstrumented("$jacocoData", "Foo");
+ try {
+ InstrSupport.assertNotInstrumented("$jacocoData", "Foo");
+ fail("exception expected");
+ } catch (IllegalStateException e) {
+ assertEquals(
+ "Cannot process instrumented class Foo. Please supply original non-instrumented classes.",
+ e.getMessage());
+ }
}
@Test
public void assertNotIntrumented_should_throw_exception_when_jacoco_init_method_is_present() {
- exception.expect(IllegalStateException.class);
- exception.expectMessage(
- "Cannot process instrumented class Foo. Please supply original non-instrumented classes.");
-
- InstrSupport.assertNotInstrumented("$jacocoInit", "Foo");
+ try {
+ InstrSupport.assertNotInstrumented("$jacocoInit", "Foo");
+ fail("exception expected");
+ } catch (IllegalStateException e) {
+ assertEquals(
+ "Cannot process instrumented class Foo. Please supply original non-instrumented classes.",
+ e.getMessage());
+ }
}
@Test
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java
index 0d253fcf..0c5658ba 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/MethodInstrumenterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -195,8 +196,8 @@ public class MethodInstrumenterTest {
final Label L2 = new Label();
LabelInfo.setProbeId(L0, 0);
LabelInfo.setProbeId(L1, 1);
- instrumenter.visitTableSwitchInsnWithProbes(3, 5, L0, new Label[] { L1,
- L1, L2 }, frame);
+ instrumenter.visitTableSwitchInsnWithProbes(3, 5, L0,
+ new Label[] { L1, L1, L2 }, frame);
expectedVisitor.visitTableSwitchInsn(3, 4, L0,
new Label[] { L1, L1, L2 });
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java
index 0c21f02c..682dd972 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategyTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java
index f1d1282a..dab3bf01 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactoryTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java
index 86956256..6ed002a2 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeCounterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
index c086f514..fa42be82 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/ProbeInserterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -18,8 +19,10 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.TypeReference;
/**
* Unit tests for {@link ProbeInserter}.
@@ -39,7 +42,8 @@ public class ProbeInserterTest {
expected = new MethodRecorder();
expectedVisitor = expected.getVisitor();
arrayStrategy = new IProbeArrayStrategy() {
- public int storeInstance(MethodVisitor mv, boolean clinit, int variable) {
+ public int storeInstance(MethodVisitor mv, boolean clinit,
+ int variable) {
mv.visitLdcInsn(clinit ? "clinit" : "init");
return 5;
}
@@ -183,6 +187,28 @@ public class ProbeInserterTest {
}
@Test
+ public void should_remap_LocalVariableAnnotation() {
+ ProbeInserter pi = new ProbeInserter(0, "m", "(I)V", actualVisitor,
+ arrayStrategy);
+
+ final Label start = new Label();
+ pi.visitLabel(start);
+ final Label end = new Label();
+ pi.visitLabel(end);
+
+ pi.visitLocalVariableAnnotation(TypeReference.LOCAL_VARIABLE, null,
+ new Label[] { start }, new Label[] { end }, new int[] { 2 },
+ "LNonNull;", false);
+
+ expectedVisitor.visitLabel(start);
+ expectedVisitor.visitLabel(end);
+ // Local variables are shifted by one:
+ expectedVisitor.visitLocalVariableAnnotation(
+ TypeReference.LOCAL_VARIABLE, null, new Label[] { start },
+ new Label[] { end }, new int[] { 3 }, "LNonNull;", false);
+ }
+
+ @Test
public void testVisitMaxs1() {
ProbeInserter pi = new ProbeInserter(0, "m", "(II)V", actualVisitor,
arrayStrategy);
@@ -209,11 +235,13 @@ public class ProbeInserterTest {
ProbeInserter pi = new ProbeInserter(0, "m", "(J)V", actualVisitor,
arrayStrategy);
- pi.visitFrame(Opcodes.F_NEW, 3, new Object[] { "Foo", Opcodes.LONG,
- "java/lang/String" }, 0, new Object[0]);
+ pi.visitFrame(Opcodes.F_NEW, 3,
+ new Object[] { "Foo", Opcodes.LONG, "java/lang/String" }, 0,
+ new Object[0]);
- expectedVisitor.visitFrame(Opcodes.F_NEW, 4, new Object[] { "Foo",
- Opcodes.LONG, "[Z", "java/lang/String" }, 0, new Object[0]);
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 4,
+ new Object[] { "Foo", Opcodes.LONG, "[Z", "java/lang/String" },
+ 0, new Object[0]);
}
@Test
@@ -235,8 +263,8 @@ public class ProbeInserterTest {
pi.visitFrame(Opcodes.F_NEW, 2, new Object[] { Opcodes.DOUBLE, "Foo" },
0, new Object[0]);
- expectedVisitor.visitFrame(Opcodes.F_NEW, 3, new Object[] { "[Z",
- Opcodes.DOUBLE, "Foo" }, 0, new Object[0]);
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 3,
+ new Object[] { "[Z", Opcodes.DOUBLE, "Foo" }, 0, new Object[0]);
}
@Test
@@ -247,8 +275,8 @@ public class ProbeInserterTest {
pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor.visitFrame(Opcodes.F_NEW, 2, new Object[] {
- Opcodes.TOP, "[Z", }, 0, new Object[] {});
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 2,
+ new Object[] { Opcodes.TOP, "[Z", }, 0, new Object[] {});
}
@Test
@@ -259,8 +287,9 @@ public class ProbeInserterTest {
pi.visitFrame(Opcodes.F_NEW, 0, new Object[] {}, 0, new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor.visitFrame(Opcodes.F_NEW, 3, new Object[] {
- Opcodes.TOP, Opcodes.TOP, "[Z", }, 0, new Object[] {});
+ expectedVisitor.visitFrame(Opcodes.F_NEW, 3,
+ new Object[] { Opcodes.TOP, Opcodes.TOP, "[Z", }, 0,
+ new Object[] {});
}
@Test
@@ -272,9 +301,11 @@ public class ProbeInserterTest {
new Object[] {});
// The locals in this frame are filled with TOP up to the probe variable
- expectedVisitor.visitFrame(Opcodes.F_NEW, 5, new Object[] {
- Opcodes.DOUBLE, Opcodes.TOP, Opcodes.TOP, Opcodes.TOP, "[Z", },
- 0, new Object[] {});
+ expectedVisitor
+ .visitFrame(
+ Opcodes.F_NEW, 5, new Object[] { Opcodes.DOUBLE,
+ Opcodes.TOP, Opcodes.TOP, Opcodes.TOP, "[Z", },
+ 0, new Object[] {});
}
@Test(expected = IllegalArgumentException.class)
diff --git a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java
index 1500b7cd..2c6078b9 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/internal/instr/SignatureRemoverTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -111,14 +112,12 @@ public class SignatureRemoverTest {
+ "Name: org/jacoco/example/B.class\r\n" //
+ "OtherInfo: keep this\r\n" //
+ "\r\n";
- assertEquals(
- createManifest(expected.getBytes("ISO-8859-1")),
+ assertEquals(createManifest(expected.getBytes("ISO-8859-1")),
createManifest(out.toByteArray()));
}
private static Manifest createManifest(final byte[] bytes)
throws IOException {
- return new Manifest(
- new ByteArrayInputStream(bytes));
+ return new Manifest(new ByteArrayInputStream(bytes));
}
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/AgentOptionsTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/AgentOptionsTest.java
index b811b526..5518c81f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/AgentOptionsTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/AgentOptionsTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -95,7 +96,8 @@ public class AgentOptionsTest {
assertFalse(options.getAppend());
assertEquals("org.*:com.*", options.getIncludes());
assertEquals("*Test", options.getExcludes());
- assertEquals("org.jacoco.test.TestLoader", options.getExclClassloader());
+ assertEquals("org.jacoco.test.TestLoader",
+ options.getExclClassloader());
assertTrue(options.getInclBootstrapClasses());
assertTrue(options.getInclNoLocationClasses());
assertEquals("testsession", options.getSessionId());
@@ -159,14 +161,16 @@ public class AgentOptionsTest {
public void testGetExclClassloader() {
AgentOptions options = new AgentOptions(
"exclclassloader=org.jacoco.test.TestLoader");
- assertEquals("org.jacoco.test.TestLoader", options.getExclClassloader());
+ assertEquals("org.jacoco.test.TestLoader",
+ options.getExclClassloader());
}
@Test
public void testSetExclClassloader() {
AgentOptions options = new AgentOptions();
options.setExclClassloader("org.jacoco.test.TestLoader");
- assertEquals("org.jacoco.test.TestLoader", options.getExclClassloader());
+ assertEquals("org.jacoco.test.TestLoader",
+ options.getExclClassloader());
assertEquals("exclclassloader=org.jacoco.test.TestLoader",
options.toString());
}
@@ -417,9 +421,8 @@ public class AgentOptionsTest {
String vmArgument = options.getVMArgument(defaultAgentJarFile);
- assertEquals(
- String.format("-javaagent:%s=append=true",
- defaultAgentJarFile.toString()), vmArgument);
+ assertEquals(String.format("-javaagent:%s=append=true",
+ defaultAgentJarFile.toString()), vmArgument);
}
@Test
@@ -452,22 +455,21 @@ public class AgentOptionsTest {
String vmArgument = options.prependVMArguments("a b c",
defaultAgentJarFile);
- assertEquals(
- String.format("-javaagent:%s= a b c",
- defaultAgentJarFile.toString()), vmArgument);
+ assertEquals(String.format("-javaagent:%s= a b c",
+ defaultAgentJarFile.toString()), vmArgument);
}
@Test
public void testPrependVMArgumentsReplace() {
AgentOptions options = new AgentOptions();
- String vmArgument = options.prependVMArguments(String.format(
- "a b -javaagent:%s=append=false c", defaultAgentJarFile),
+ String vmArgument = options.prependVMArguments(
+ String.format("a b -javaagent:%s=append=false c",
+ defaultAgentJarFile),
defaultAgentJarFile);
- assertEquals(
- String.format("-javaagent:%s= a b c",
- defaultAgentJarFile.toString()), vmArgument);
+ assertEquals(String.format("-javaagent:%s= a b c",
+ defaultAgentJarFile.toString()), vmArgument);
}
@Test
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/CommandLineSupportTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/CommandLineSupportTest.java
index 0c7e9b13..23d24d41 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/CommandLineSupportTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/CommandLineSupportTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java
index c3fc8008..2cce6bb3 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/InjectedClassRuntimeTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -16,10 +17,10 @@ import static org.junit.Assert.fail;
import java.lang.reflect.InvocationTargetException;
+import org.junit.AssumptionViolatedException;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
-import org.junit.internal.AssumptionViolatedException;
import org.junit.rules.TestName;
/**
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java
index fcc66e5c..f2325d6f 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/LoggerRuntimeTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
index e3804278..d29e2263 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/ModifiedSystemClassRuntimeTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -56,8 +57,9 @@ public class ModifiedSystemClassRuntimeTest extends RuntimeTestBase {
* "java.lang.reflect.Module" introduced in JDK 9.
*/
private Instrumentation newInstrumentationMock() {
- return (Instrumentation) Proxy.newProxyInstance(getClass()
- .getClassLoader(), new Class[] { Instrumentation.class },
+ return (Instrumentation) Proxy.newProxyInstance(
+ getClass().getClassLoader(),
+ new Class[] { Instrumentation.class },
new MyInvocationHandler());
}
@@ -74,8 +76,8 @@ public class ModifiedSystemClassRuntimeTest extends RuntimeTestBase {
added = true;
try {
// Our class should get instrumented:
- final byte[] data = TargetLoader
- .getClassDataAsBytes(ModifiedSystemClassRuntimeTest.class);
+ final byte[] data = TargetLoader.getClassDataAsBytes(
+ ModifiedSystemClassRuntimeTest.class);
verifyInstrumentedClass(TARGET_CLASS_NAME,
transformer.transform((ClassLoader) null,
TARGET_CLASS_NAME, null, null, data));
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGeneratorTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGeneratorTest.java
index 9a6707af..e77df506 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGeneratorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGeneratorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -99,13 +100,14 @@ public class OfflineInstrumentationAccessGeneratorTest {
null);
// Constructor
- GeneratorAdapter gen = new GeneratorAdapter(writer.visitMethod(
- Opcodes.ACC_PUBLIC, "<init>", "()V", null, new String[0]),
+ GeneratorAdapter gen = new GeneratorAdapter(
+ writer.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null,
+ new String[0]),
Opcodes.ACC_PUBLIC, "<init>", "()V");
gen.visitCode();
gen.loadThis();
- gen.invokeConstructor(Type.getType(Object.class), new Method("<init>",
- "()V"));
+ gen.invokeConstructor(Type.getType(Object.class),
+ new Method("<init>", "()V"));
gen.loadThis();
final int size = generator.generateDataAccessor(classid, className, 2,
gen);
@@ -116,8 +118,8 @@ public class OfflineInstrumentationAccessGeneratorTest {
gen.visitEnd();
// get()
- gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC,
- "get", "()[Z", null, new String[0]), Opcodes.ACC_PUBLIC, "get",
+ gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "get",
+ "()[Z", null, new String[0]), Opcodes.ACC_PUBLIC, "get",
"()[Z");
gen.visitCode();
gen.getStatic(classType, InstrSupport.DATAFIELD_NAME,
@@ -129,8 +131,9 @@ public class OfflineInstrumentationAccessGeneratorTest {
writer.visitEnd();
final TargetLoader loader = new TargetLoader();
- return (ITarget) loader.add(className.replace('/', '.'),
- writer.toByteArray()).newInstance();
+ return (ITarget) loader
+ .add(className.replace('/', '.'), writer.toByteArray())
+ .newInstance();
}
/**
@@ -140,7 +143,7 @@ public class OfflineInstrumentationAccessGeneratorTest {
/**
* Returns a reference to the probe array.
- *
+ *
* @return the probe array
*/
boolean[] get();
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/RemoteControlReaderWriterTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/RemoteControlReaderWriterTest.java
index 69203cb9..66acdd7b 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/RemoteControlReaderWriterTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/RemoteControlReaderWriterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -30,8 +31,8 @@ import org.junit.Test;
* The tests don't care about the written binary format, they just verify
* symmetry.
*/
-public class RemoteControlReaderWriterTest extends
- ExecutionDataReaderWriterTest {
+public class RemoteControlReaderWriterTest
+ extends ExecutionDataReaderWriterTest {
private RemoteControlWriter writer;
@@ -93,8 +94,8 @@ public class RemoteControlReaderWriterTest extends
@Override
protected RemoteControlReader createReader() throws IOException {
- return new RemoteControlReader(new ByteArrayInputStream(
- buffer.toByteArray()));
+ return new RemoteControlReader(
+ new ByteArrayInputStream(buffer.toByteArray()));
}
@Override
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeDataTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeDataTest.java
index 272dc92f..77ab4540 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeDataTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeDataTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -29,7 +30,7 @@ import org.objectweb.asm.Type;
/**
* Unit tests for {@link RuntimeData}.
- *
+ *
*/
public class RuntimeDataTest {
@@ -138,8 +139,8 @@ public class RuntimeDataTest {
writer.visitEnd();
final TargetLoader loader = new TargetLoader();
- Callable<?> callable = (Callable<?>) loader.add("Sample",
- writer.toByteArray()).newInstance();
+ Callable<?> callable = (Callable<?>) loader
+ .add("Sample", writer.toByteArray()).newInstance();
final Object[] args = (Object[]) callable.call();
assertEquals(3, args.length, 0.0);
assertEquals(Long.valueOf(1000), args[0]);
@@ -149,8 +150,8 @@ public class RuntimeDataTest {
@Test
public void testGenerateAccessCall() throws Exception {
- final boolean[] probes = data.getExecutionData(Long.valueOf(1234),
- "Sample", 5).getProbes();
+ final boolean[] probes = data
+ .getExecutionData(Long.valueOf(1234), "Sample", 5).getProbes();
final ClassWriter writer = new ClassWriter(0);
writer.visit(Opcodes.V1_5, Opcodes.ACC_PUBLIC, "Sample", null,
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeTestBase.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeTestBase.java
index 564b372d..182060ba 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeTestBase.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/RuntimeTestBase.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -54,8 +55,8 @@ public abstract class RuntimeTestBase {
}
@Test
- public void testDataAccessor() throws InstantiationException,
- IllegalAccessException {
+ public void testDataAccessor()
+ throws InstantiationException, IllegalAccessException {
ITarget t = generateAndInstantiateClass(1234);
data.collect(storage, storage, false);
storage.assertData(1234, t.get());
@@ -64,18 +65,18 @@ public abstract class RuntimeTestBase {
@Test
public void testNoLocalVariablesInDataAccessor()
throws InstantiationException, IllegalAccessException {
- runtime.generateDataAccessor(1001, "Target", 5, new MethodVisitor(
- InstrSupport.ASM_API_VERSION) {
- @Override
- public void visitVarInsn(int opcode, int var) {
- fail("No usage of local variables allowed.");
- }
- });
+ runtime.generateDataAccessor(1001, "Target", 5,
+ new MethodVisitor(InstrSupport.ASM_API_VERSION) {
+ @Override
+ public void visitVarInsn(int opcode, int var) {
+ fail("No usage of local variables allowed.");
+ }
+ });
}
@Test
- public void testExecutionRecording() throws InstantiationException,
- IllegalAccessException {
+ public void testExecutionRecording()
+ throws InstantiationException, IllegalAccessException {
generateAndInstantiateClass(1001).a();
data.collect(storage, storage, false);
storage.assertSize(1);
@@ -85,8 +86,8 @@ public abstract class RuntimeTestBase {
}
@Test
- public void testLoadSameClassTwice() throws InstantiationException,
- IllegalAccessException {
+ public void testLoadSameClassTwice()
+ throws InstantiationException, IllegalAccessException {
generateAndInstantiateClass(1001).a();
generateAndInstantiateClass(1001).b();
data.collect(storage, storage, false);
@@ -118,13 +119,14 @@ public abstract class RuntimeTestBase {
null);
// Constructor
- GeneratorAdapter gen = new GeneratorAdapter(writer.visitMethod(
- Opcodes.ACC_PUBLIC, "<init>", "()V", null, new String[0]),
+ GeneratorAdapter gen = new GeneratorAdapter(
+ writer.visitMethod(Opcodes.ACC_PUBLIC, "<init>", "()V", null,
+ new String[0]),
Opcodes.ACC_PUBLIC, "<init>", "()V");
gen.visitCode();
gen.loadThis();
- gen.invokeConstructor(Type.getType(Object.class), new Method("<init>",
- "()V"));
+ gen.invokeConstructor(Type.getType(Object.class),
+ new Method("<init>", "()V"));
gen.loadThis();
final int size = runtime.generateDataAccessor(classid, className, 2,
gen);
@@ -135,8 +137,8 @@ public abstract class RuntimeTestBase {
gen.visitEnd();
// get()
- gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC,
- "get", "()[Z", null, new String[0]), Opcodes.ACC_PUBLIC, "get",
+ gen = new GeneratorAdapter(writer.visitMethod(Opcodes.ACC_PUBLIC, "get",
+ "()[Z", null, new String[0]), Opcodes.ACC_PUBLIC, "get",
"()[Z");
gen.visitCode();
gen.getStatic(classType, InstrSupport.DATAFIELD_NAME,
@@ -174,8 +176,9 @@ public abstract class RuntimeTestBase {
writer.visitEnd();
final TargetLoader loader = new TargetLoader();
- return (ITarget) loader.add(className.replace('/', '.'),
- writer.toByteArray()).newInstance();
+ return (ITarget) loader
+ .add(className.replace('/', '.'), writer.toByteArray())
+ .newInstance();
}
/**
@@ -186,7 +189,7 @@ public abstract class RuntimeTestBase {
/**
* Returns a reference to the probe array.
- *
+ *
* @return the probe array
*/
boolean[] get();
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java
index c058972c..3f3d8726 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/SystemPropertiesRuntimeTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/TestStorage.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/TestStorage.java
index 5698594b..95393c07 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/TestStorage.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/TestStorage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java
deleted file mode 100644
index 51428a03..00000000
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/URLStreamHandlerRuntimeTest.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.runtime;
-
-import org.junit.Assume;
-import org.junit.BeforeClass;
-
-/**
- * Unit tests for {@link URLStreamHandlerRuntime}.
- */
-public class URLStreamHandlerRuntimeTest extends RuntimeTestBase {
-
- @Override
- IRuntime createRuntime() {
- return new URLStreamHandlerRuntime();
- }
-
- @BeforeClass
- public static void checkJDK() {
- final boolean jdk9 = System.getProperty("java.version")
- .startsWith("9-");
- Assume.assumeTrue(!jdk9);
- }
-
-}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/runtime/WildcardMatcherTest.java b/org.jacoco.core.test/src/org/jacoco/core/runtime/WildcardMatcherTest.java
index 8f1313b1..a403862d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/runtime/WildcardMatcherTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/runtime/WildcardMatcherTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoader.java b/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoader.java
index f3eb7e94..6b158662 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoader.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoader.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -52,6 +53,10 @@ public final class InstrumentingLoader extends ClassLoader {
protected synchronized Class<?> loadClass(String name, boolean resolve)
throws ClassNotFoundException {
if (name.startsWith(scope)) {
+ Class<?> c = findLoadedClass(name);
+ if (c != null) {
+ return c;
+ }
final byte[] bytes;
try {
bytes = TargetLoader.getClassDataAsBytes(delegate, name);
@@ -64,8 +69,7 @@ public final class InstrumentingLoader extends ClassLoader {
} catch (IOException e) {
throw new ClassNotFoundException("Unable to instrument", e);
}
- final Class<?> c = defineClass(name, instrumented, 0,
- instrumented.length);
+ c = defineClass(name, instrumented, 0, instrumented.length);
if (resolve) {
resolveClass(c);
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoaderTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoaderTest.java
new file mode 100644
index 00000000..b9e58889
--- /dev/null
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/InstrumentingLoaderTest.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertSame;
+
+/**
+ * Unit test for {@link InstrumentingLoader}.
+ */
+public class InstrumentingLoaderTest {
+
+ @Test
+ public void should_use_findLoadedClass() throws Exception {
+ final InstrumentingLoader loader = new InstrumentingLoader(
+ InstrumentingLoaderTest.class);
+ final Class<?> c1 = loader
+ .loadClass(InstrumentingLoaderTest.class.getName());
+ final Class<?> c2 = loader
+ .loadClass(InstrumentingLoaderTest.class.getName());
+ assertSame(c1, c2);
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/TargetLoader.java b/org.jacoco.core.test/src/org/jacoco/core/test/TargetLoader.java
index 3418c63c..6fb0c42c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/TargetLoader.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/TargetLoader.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test;
@@ -61,7 +62,8 @@ public class TargetLoader extends ClassLoader {
return readBytes(getClassData(loader, name));
}
- public static byte[] getClassDataAsBytes(Class<?> clazz) throws IOException {
+ public static byte[] getClassDataAsBytes(Class<?> clazz)
+ throws IOException {
return readBytes(getClassData(clazz));
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/AnalysisTimeScenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/AnalysisTimeScenario.java
index dc155e1e..ce0b32fa 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/AnalysisTimeScenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/AnalysisTimeScenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/ExecuteInstrumentedCodeScenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/ExecuteInstrumentedCodeScenario.java
index 20bd02a6..a2037d4c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/ExecuteInstrumentedCodeScenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/ExecuteInstrumentedCodeScenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java
index 440f10e3..1ecbcfb0 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
@@ -22,7 +23,7 @@ public interface IPerfOutput {
/**
* Reports the result of a time measurement with a optional reference time
* for comparison.
- *
+ *
* @param description
* textual description of the test case
* @param duration
@@ -35,7 +36,7 @@ public interface IPerfOutput {
/**
* Reports the result of a byte size measurement with a optional reference
* size for comparison.
- *
+ *
* @param description
* textual description of the test case
* @param size
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java
index ca5590f0..897669ed 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/IPerfScenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
@@ -19,7 +20,7 @@ public interface IPerfScenario {
/**
* Runs the performance scenario and reports the result to the given
* interface.
- *
+ *
* @param output
*/
void run(IPerfOutput output) throws Exception;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationSizeSzenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationSizeSzenario.java
index 27e05455..c50e4782 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationSizeSzenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationSizeSzenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationTimeScenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationTimeScenario.java
index 3ecbbed8..7da01570 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationTimeScenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/InstrumentationTimeScenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
@@ -27,7 +28,8 @@ public class InstrumentationTimeScenario extends TimedScenario {
private final int count;
protected InstrumentationTimeScenario(Class<?> target, int count) {
- super(String.format("instrumenting %s classes", Integer.valueOf(count)));
+ super(String.format("instrumenting %s classes",
+ Integer.valueOf(count)));
this.target = target;
this.count = count;
}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerfOutputWriter.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerfOutputWriter.java
index c6b5c4e4..c569f850 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerfOutputWriter.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerfOutputWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
@@ -36,8 +37,10 @@ public class PerfOutputWriter implements IPerfOutput {
System.getProperty("java.vm.vendor"));
writer.printf("JVM Version: %s%n%n",
System.getProperty("java.vm.version"));
- writer.println("scenario instr ref overhead");
- writer.println("----------------------------------------------------------");
+ writer.println(
+ "scenario instr ref overhead");
+ writer.println(
+ "----------------------------------------------------------");
}
public void writeTimeResult(final String description, final long duration,
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerformanceSuite.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerformanceSuite.java
index 32d99b04..3aa2547b 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerformanceSuite.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/PerformanceSuite.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/TimedScenario.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/TimedScenario.java
index fd71c513..efdc1041 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/TimedScenario.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/TimedScenario.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf;
@@ -41,7 +42,7 @@ public abstract class TimedScenario implements IPerfScenario {
/**
* Runs the given subject several times and returns the minimum execution
* time.
- *
+ *
* @param subject
* @return minimum execution time in nano seconds
* @throws Exception
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target01.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target01.java
index 907e59ee..e5454dbd 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target01.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target01.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf.targets;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java
index ca29a139..d2ea7959 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target02.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf.targets;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target03.java b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target03.java
index 9ce6bff3..96317fc6 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target03.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/perf/targets/Target03.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.perf.targets;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/Compiler.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/Compiler.java
index 622fca5a..e44fca93 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/Compiler.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/Compiler.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersion.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersion.java
index 1fb5590c..a12c068b 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersion.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersion.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersionTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersionTest.java
index 389a242f..c6456651 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersionTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/JavaVersionTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/Source.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/Source.java
index fe9dde5c..a6cda16d 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/Source.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/Source.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation;
@@ -91,7 +92,7 @@ public class Source {
/**
* Reads a source file from the given reader.
- *
+ *
* @param reader
* the reader to read from, will be closed
* @param coverage
@@ -128,7 +129,7 @@ public class Source {
/**
* Loads the source file which holds the given target class.
- *
+ *
* @param target
* the target class we want the source for
* @param bundle
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/SourceTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/SourceTest.java
index 45d54341..490e5d14 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/SourceTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/SourceTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation;
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutor.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutor.java
index 52bd95eb..b88102ae 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutor.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutor.java
@@ -1,65 +1,66 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation;
-
-import java.lang.reflect.InvocationTargetException;
-
-/**
- * Executes statements against a given Java object instance.
- */
-class StatementExecutor implements StatementParser.IStatementVisitor {
-
- private final Object target;
- private final Object[] prefixArgs;
-
- StatementExecutor(Object target, Object... prefixArgs) {
- this.target = target;
- this.prefixArgs = prefixArgs;
- }
-
- public void visitInvocation(String ctx, String name, Object... args) {
- args = concat(prefixArgs, args);
- try {
- target.getClass().getMethod(name, getTypes(args)).invoke(target,
- args);
- } catch (InvocationTargetException e) {
- Throwable te = e.getTargetException();
- if (te instanceof AssertionError) {
- throw (AssertionError) te;
- }
- throw new RuntimeException("Invocation error (" + ctx + ")", te);
- } catch (Exception e) {
- throw new RuntimeException("Invocation error (" + ctx + ")", e);
- }
- }
-
- private static Object[] concat(Object[] a, Object[] b) {
- final Object[] result = new Object[a.length + b.length];
- System.arraycopy(a, 0, result, 0, a.length);
- System.arraycopy(b, 0, result, a.length, b.length);
- return result;
- }
-
- private static Class<?>[] getTypes(Object[] instances) {
- final Class<?>[] classes = new Class[instances.length];
- for (int i = 0; i < instances.length; i++) {
- Class<? extends Object> c = instances[i].getClass();
- if (c == Integer.class) {
- // We always use primitive int parameters:
- c = Integer.TYPE;
- }
- classes[i] = c;
- }
- return classes;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation;
+
+import java.lang.reflect.InvocationTargetException;
+
+/**
+ * Executes statements against a given Java object instance.
+ */
+class StatementExecutor implements StatementParser.IStatementVisitor {
+
+ private final Object target;
+ private final Object[] prefixArgs;
+
+ StatementExecutor(Object target, Object... prefixArgs) {
+ this.target = target;
+ this.prefixArgs = prefixArgs;
+ }
+
+ public void visitInvocation(String ctx, String name, Object... args) {
+ args = concat(prefixArgs, args);
+ try {
+ target.getClass().getMethod(name, getTypes(args)).invoke(target,
+ args);
+ } catch (InvocationTargetException e) {
+ Throwable te = e.getTargetException();
+ if (te instanceof AssertionError) {
+ throw (AssertionError) te;
+ }
+ throw new RuntimeException("Invocation error (" + ctx + ")", te);
+ } catch (Exception e) {
+ throw new RuntimeException("Invocation error (" + ctx + ")", e);
+ }
+ }
+
+ private static Object[] concat(Object[] a, Object[] b) {
+ final Object[] result = new Object[a.length + b.length];
+ System.arraycopy(a, 0, result, 0, a.length);
+ System.arraycopy(b, 0, result, a.length, b.length);
+ return result;
+ }
+
+ private static Class<?>[] getTypes(Object[] instances) {
+ final Class<?>[] classes = new Class[instances.length];
+ for (int i = 0; i < instances.length; i++) {
+ Class<? extends Object> c = instances[i].getClass();
+ if (c == Integer.class) {
+ // We always use primitive int parameters:
+ c = Integer.TYPE;
+ }
+ classes[i] = c;
+ }
+ return classes;
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutorTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutorTest.java
index b71c6059..4f911987 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutorTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementExecutorTest.java
@@ -1,106 +1,110 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-/**
- * Unit tests for {@link StatementExecutor}.
- */
-public class StatementExecutorTest {
-
- @Rule
- public ExpectedException exception = ExpectedException.none();
-
- private Map<String, List<?>> invocations;
-
- @Before
- public void setup() {
- invocations = new HashMap<String, List<?>>();
- }
-
- @Test
- public void should_prefix_arguments() {
- StatementExecutor executor = new StatementExecutor(this,
- "Hello", "world");
-
- executor.visitInvocation("ctx", "target1", "!");
-
- assertEquals(Arrays.asList("Hello", "world", "!"),
- invocations.get("target1"));
- }
-
- @Test
- public void should_call_method_with_int_argument() {
- StatementExecutor executor = new StatementExecutor(this);
-
- executor.visitInvocation("ctx", "target2", Integer.valueOf(42));
-
- assertEquals(Arrays.asList(Integer.valueOf(42)),
- invocations.get("target2"));
- }
-
- @Test
- public void should_preserve_AssertionError() {
- exception.expect(AssertionError.class);
- exception.expectMessage("Original AssertionError.");
- StatementExecutor executor = new StatementExecutor(this);
-
- executor.visitInvocation("ctx", "target3");
- }
-
- @Test
- public void should_wrap_other_exceptions() {
- exception.expect(RuntimeException.class);
- exception.expectMessage("Invocation error (ctx)");
- StatementExecutor executor = new StatementExecutor(this);
-
- executor.visitInvocation("ctx", "target4");
- }
-
- @Test
- public void should_throw_RuntimeException_when_method_cannot_be_invoked() {
- exception.expect(RuntimeException.class);
- exception.expectMessage("Invocation error (ctx)");
- StatementExecutor executor = new StatementExecutor(this);
-
- executor.visitInvocation("ctx", "doesNotExist");
- }
-
- public void target1(String a, String b, String c) {
- invocations.put("target1", Arrays.asList(a, b, c));
- }
-
- public void target2(int i) {
- invocations.put("target2", Arrays.asList(Integer.valueOf(i)));
- }
-
- public void target3() {
- throw new AssertionError("Original AssertionError.");
- }
-
- public void target4() throws IOException {
- throw new IOException("Original IOException.");
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit tests for {@link StatementExecutor}.
+ */
+public class StatementExecutorTest {
+
+ private Map<String, List<?>> invocations;
+
+ @Before
+ public void setup() {
+ invocations = new HashMap<String, List<?>>();
+ }
+
+ @Test
+ public void should_prefix_arguments() {
+ StatementExecutor executor = new StatementExecutor(this, "Hello",
+ "world");
+
+ executor.visitInvocation("ctx", "target1", "!");
+
+ assertEquals(Arrays.asList("Hello", "world", "!"),
+ invocations.get("target1"));
+ }
+
+ @Test
+ public void should_call_method_with_int_argument() {
+ StatementExecutor executor = new StatementExecutor(this);
+
+ executor.visitInvocation("ctx", "target2", Integer.valueOf(42));
+
+ assertEquals(Arrays.asList(Integer.valueOf(42)),
+ invocations.get("target2"));
+ }
+
+ @Test
+ public void should_preserve_AssertionError() {
+ StatementExecutor executor = new StatementExecutor(this);
+ try {
+ executor.visitInvocation("ctx", "target3");
+ fail("exception expected");
+ } catch (AssertionError e) {
+ assertEquals("Original AssertionError.", e.getMessage());
+ }
+ }
+
+ @Test
+ public void should_wrap_other_exceptions() {
+ StatementExecutor executor = new StatementExecutor(this);
+ try {
+ executor.visitInvocation("ctx", "target4");
+ fail("exception expected");
+ } catch (RuntimeException e) {
+ assertEquals("Invocation error (ctx)", e.getMessage());
+ assertEquals("Original IOException.", e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void should_throw_RuntimeException_when_method_cannot_be_invoked() {
+ StatementExecutor executor = new StatementExecutor(this);
+ try {
+ executor.visitInvocation("ctx", "doesNotExist");
+ fail("exception expected");
+ } catch (RuntimeException e) {
+ assertEquals("Invocation error (ctx)", e.getMessage());
+ }
+ }
+
+ public void target1(String a, String b, String c) {
+ invocations.put("target1", Arrays.asList(a, b, c));
+ }
+
+ public void target2(int i) {
+ invocations.put("target2", Arrays.asList(Integer.valueOf(i)));
+ }
+
+ public void target3() {
+ throw new AssertionError("Original AssertionError.");
+ }
+
+ public void target4() throws IOException {
+ throw new IOException("Original IOException.");
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParser.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParser.java
index 4008fc81..40847295 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParser.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParser.java
@@ -1,132 +1,133 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation;
-
-import java.io.IOException;
-import java.io.StreamTokenizer;
-import java.io.StringReader;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Simple parser for Java like method invocation statements. For example:
- *
- * <pre>
- * foo("BAR", 42)
- * </pre>
- *
- * Method parameters can only be String or int literals.
- */
-class StatementParser {
-
- /**
- * Call-back interface for parsed statements.
- */
- public interface IStatementVisitor {
-
- /**
- * Called when a method invocation has been paresed.
- *
- * @param ctx
- * context information for error messages
- * @param name
- * local method name
- * @param args
- * argument values
- */
- void visitInvocation(String ctx, String name, Object... args);
-
- }
-
- /**
- * Parses the given source.
- *
- * @param source
- * source string to parse
- * @param visitor
- * visitor to emit parsed statements
- * @param ctx
- * context information to include in error messages
- */
- public static void parse(String source, IStatementVisitor visitor,
- String ctx) throws IOException {
- new StatementParser(source, visitor, ctx).parse();
- }
-
- private final IStatementVisitor visitor;
- private final StreamTokenizer tokenizer;
- private final String ctx;
-
- private StatementParser(String source, IStatementVisitor visitor,
- String ctx) {
- this.visitor = visitor;
- this.ctx = ctx;
- tokenizer = new StreamTokenizer(new StringReader(source));
- tokenizer.resetSyntax();
- tokenizer.whitespaceChars(' ', ' ');
- tokenizer.whitespaceChars('\t', '\t');
- tokenizer.wordChars('a', 'z');
- tokenizer.wordChars('A', 'Z');
- tokenizer.quoteChar('"');
- tokenizer.parseNumbers();
- }
-
- private void parse() throws IOException {
- while (!accept(StreamTokenizer.TT_EOF)) {
- invocation();
- }
- }
-
- private void invocation() throws IOException {
- final String name = expect(StreamTokenizer.TT_WORD).sval;
- final List<Object> args = new ArrayList<Object>();
- expect('(');
- if (!accept(')')) {
- args.add(argument());
- while (!accept(')')) {
- expect(',');
- args.add(argument());
- }
- }
- visitor.visitInvocation(ctx, name, args.toArray());
- }
-
- private Object argument() throws IOException {
- if (accept(StreamTokenizer.TT_NUMBER)) {
- return Integer.valueOf((int) tokenizer.nval);
- }
- if (accept('"')) {
- return tokenizer.sval;
- }
- throw syntaxError();
- }
-
- private boolean accept(final int type) throws IOException {
- final boolean match = tokenizer.nextToken() == type;
- if (!match) {
- tokenizer.pushBack();
- }
- return match;
- }
-
- private StreamTokenizer expect(final int type) throws IOException {
- if (tokenizer.nextToken() != type) {
- throw syntaxError();
- }
- return tokenizer;
- }
-
- private IOException syntaxError() {
- return new IOException("Invalid syntax (" + ctx + ")");
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation;
+
+import java.io.IOException;
+import java.io.StreamTokenizer;
+import java.io.StringReader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Simple parser for Java like method invocation statements. For example:
+ *
+ * <pre>
+ * foo("BAR", 42)
+ * </pre>
+ *
+ * Method parameters can only be String or int literals.
+ */
+class StatementParser {
+
+ /**
+ * Call-back interface for parsed statements.
+ */
+ public interface IStatementVisitor {
+
+ /**
+ * Called when a method invocation has been paresed.
+ *
+ * @param ctx
+ * context information for error messages
+ * @param name
+ * local method name
+ * @param args
+ * argument values
+ */
+ void visitInvocation(String ctx, String name, Object... args);
+
+ }
+
+ /**
+ * Parses the given source.
+ *
+ * @param source
+ * source string to parse
+ * @param visitor
+ * visitor to emit parsed statements
+ * @param ctx
+ * context information to include in error messages
+ */
+ public static void parse(String source, IStatementVisitor visitor,
+ String ctx) throws IOException {
+ new StatementParser(source, visitor, ctx).parse();
+ }
+
+ private final IStatementVisitor visitor;
+ private final StreamTokenizer tokenizer;
+ private final String ctx;
+
+ private StatementParser(String source, IStatementVisitor visitor,
+ String ctx) {
+ this.visitor = visitor;
+ this.ctx = ctx;
+ tokenizer = new StreamTokenizer(new StringReader(source));
+ tokenizer.resetSyntax();
+ tokenizer.whitespaceChars(' ', ' ');
+ tokenizer.whitespaceChars('\t', '\t');
+ tokenizer.wordChars('a', 'z');
+ tokenizer.wordChars('A', 'Z');
+ tokenizer.quoteChar('"');
+ tokenizer.parseNumbers();
+ }
+
+ private void parse() throws IOException {
+ while (!accept(StreamTokenizer.TT_EOF)) {
+ invocation();
+ }
+ }
+
+ private void invocation() throws IOException {
+ final String name = expect(StreamTokenizer.TT_WORD).sval;
+ final List<Object> args = new ArrayList<Object>();
+ expect('(');
+ if (!accept(')')) {
+ args.add(argument());
+ while (!accept(')')) {
+ expect(',');
+ args.add(argument());
+ }
+ }
+ visitor.visitInvocation(ctx, name, args.toArray());
+ }
+
+ private Object argument() throws IOException {
+ if (accept(StreamTokenizer.TT_NUMBER)) {
+ return Integer.valueOf((int) tokenizer.nval);
+ }
+ if (accept('"')) {
+ return tokenizer.sval;
+ }
+ throw syntaxError();
+ }
+
+ private boolean accept(final int type) throws IOException {
+ final boolean match = tokenizer.nextToken() == type;
+ if (!match) {
+ tokenizer.pushBack();
+ }
+ return match;
+ }
+
+ private StreamTokenizer expect(final int type) throws IOException {
+ if (tokenizer.nextToken() != type) {
+ throw syntaxError();
+ }
+ return tokenizer;
+ }
+
+ private IOException syntaxError() {
+ return new IOException("Invalid syntax (" + ctx + ")");
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParserTest.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParserTest.java
index 7e7b7800..7d200e0c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParserTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/StatementParserTest.java
@@ -1,140 +1,152 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.test.validation;
-
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jacoco.core.test.validation.StatementParser.IStatementVisitor;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-/**
- * Unit tests for {@link StatementParser}
- */
-public class StatementParserTest {
-
- private IStatementVisitor visitor;
-
- private List<String> actualInvocations;
- private List<String> expectedInvocations;
-
- @Rule
- public ExpectedException exception = ExpectedException.none();
-
- @Before
- public void setup() {
- actualInvocations = new ArrayList<String>();
- expectedInvocations = new ArrayList<String>();
- visitor = new IStatementVisitor() {
- public void visitInvocation(String ctx, String name,
- Object... args) {
- actualInvocations.add(invocationStr(ctx, name, args));
- }
- };
- }
-
- @After
- public void teardown() {
- assertEquals(expectedInvocations, actualInvocations);
- }
-
- @Test
- public void should_parse_empty_string() throws IOException {
- StatementParser.parse("", visitor, "Foo.java");
- }
-
- @Test
- public void should_parse_invocation_without_params() throws IOException {
- StatementParser.parse("run()", visitor, "Foo.java");
- expectInvocation("Foo.java", "run");
- }
-
- @Test
- public void should_parse_invocation_with_one_int_parameter()
- throws IOException {
- StatementParser.parse("ask(42)", visitor, "Foo.java");
- expectInvocation("Foo.java", "ask", Integer.valueOf(42));
- }
-
- @Test
- public void should_parse_invocation_with_one_string_parameter()
- throws IOException {
- StatementParser.parse("say(\"hello\")", visitor, "Foo.java");
- expectInvocation("Foo.java", "say", "hello");
- }
-
- @Test
- public void should_parse_invocation_with_two_parameters()
- throws IOException {
- StatementParser.parse("add(1000, 234)", visitor, "Foo.java");
- expectInvocation("Foo.java", "add", Integer.valueOf(1000),
- Integer.valueOf(234));
- }
-
- @Test
- public void should_parse_invocation_with_mixed_parameter_types()
- throws IOException {
- StatementParser.parse("mix(1, \"two\", 3)", visitor, "Foo.java");
- expectInvocation("Foo.java", "mix", Integer.valueOf(1), "two",
- Integer.valueOf(3));
- }
-
- @Test
- public void should_parse_multiple_invocations() throws IOException {
- StatementParser.parse("start() stop()", visitor, "Foo.java");
- expectInvocation("Foo.java", "start");
- expectInvocation("Foo.java", "stop");
- }
-
- @Test
- public void should_fail_when_parenthesis_is_missing() throws IOException {
- exception.expect(IOException.class);
- StatementParser.parse("bad(", visitor, "Foo.java");
- }
-
- @Test
- public void should_fail_when_argument1_is_missing() throws IOException {
- exception.expect(IOException.class);
- StatementParser.parse("bad(,2)", visitor, "Foo.java");
- }
-
- @Test
- public void should_fail_when_argument2_is_missing() throws IOException {
- exception.expect(IOException.class);
- StatementParser.parse("bad(1,)", visitor, "Foo.java");
- }
-
- @Test
- public void should_give_context_info_when_parsing_fails()
- throws IOException {
- exception.expect(IOException.class);
- exception.expectMessage("Invalid syntax (Foo.java:32)");
- StatementParser.parse("bad", visitor, "Foo.java:32");
- }
-
- private void expectInvocation(String ctx, String name, Object... args) {
- expectedInvocations.add(invocationStr(ctx, name, args));
- }
-
- private String invocationStr(String ctx, String name, Object... args) {
- return String.format("%s:%s%s", ctx, name, Arrays.asList(args));
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.test.validation;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.jacoco.core.test.validation.StatementParser.IStatementVisitor;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Unit tests for {@link StatementParser}
+ */
+public class StatementParserTest {
+
+ private IStatementVisitor visitor;
+
+ private List<String> actualInvocations;
+ private List<String> expectedInvocations;
+
+ @Before
+ public void setup() {
+ actualInvocations = new ArrayList<String>();
+ expectedInvocations = new ArrayList<String>();
+ visitor = new IStatementVisitor() {
+ public void visitInvocation(String ctx, String name,
+ Object... args) {
+ actualInvocations.add(invocationStr(ctx, name, args));
+ }
+ };
+ }
+
+ @After
+ public void teardown() {
+ assertEquals(expectedInvocations, actualInvocations);
+ }
+
+ @Test
+ public void should_parse_empty_string() throws IOException {
+ StatementParser.parse("", visitor, "Foo.java");
+ }
+
+ @Test
+ public void should_parse_invocation_without_params() throws IOException {
+ StatementParser.parse("run()", visitor, "Foo.java");
+ expectInvocation("Foo.java", "run");
+ }
+
+ @Test
+ public void should_parse_invocation_with_one_int_parameter()
+ throws IOException {
+ StatementParser.parse("ask(42)", visitor, "Foo.java");
+ expectInvocation("Foo.java", "ask", Integer.valueOf(42));
+ }
+
+ @Test
+ public void should_parse_invocation_with_one_string_parameter()
+ throws IOException {
+ StatementParser.parse("say(\"hello\")", visitor, "Foo.java");
+ expectInvocation("Foo.java", "say", "hello");
+ }
+
+ @Test
+ public void should_parse_invocation_with_two_parameters()
+ throws IOException {
+ StatementParser.parse("add(1000, 234)", visitor, "Foo.java");
+ expectInvocation("Foo.java", "add", Integer.valueOf(1000),
+ Integer.valueOf(234));
+ }
+
+ @Test
+ public void should_parse_invocation_with_mixed_parameter_types()
+ throws IOException {
+ StatementParser.parse("mix(1, \"two\", 3)", visitor, "Foo.java");
+ expectInvocation("Foo.java", "mix", Integer.valueOf(1), "two",
+ Integer.valueOf(3));
+ }
+
+ @Test
+ public void should_parse_multiple_invocations() throws IOException {
+ StatementParser.parse("start() stop()", visitor, "Foo.java");
+ expectInvocation("Foo.java", "start");
+ expectInvocation("Foo.java", "stop");
+ }
+
+ @Test
+ public void should_fail_when_parenthesis_is_missing() throws IOException {
+ try {
+ StatementParser.parse("bad(", visitor, "Foo.java");
+ fail("exception expected");
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void should_fail_when_argument1_is_missing() throws IOException {
+ try {
+ StatementParser.parse("bad(,2)", visitor, "Foo.java");
+ fail("exception expected");
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void should_fail_when_argument2_is_missing() throws IOException {
+ try {
+ StatementParser.parse("bad(1,)", visitor, "Foo.java");
+ fail("exception expected");
+ } catch (IOException e) {
+ // expected
+ }
+ }
+
+ @Test
+ public void should_give_context_info_when_parsing_fails()
+ throws IOException {
+ try {
+ StatementParser.parse("bad", visitor, "Foo.java:32");
+ fail("exception expected");
+ } catch (IOException e) {
+ assertEquals("Invalid syntax (Foo.java:32)", e.getMessage());
+ }
+ }
+
+ private void expectInvocation(String ctx, String name, Object... args) {
+ expectedInvocations.add(invocationStr(ctx, name, args));
+ }
+
+ private String invocationStr(String ctx, String name, Object... args) {
+ return String.format("%s:%s%s", ctx, name, Arrays.asList(args));
+ }
+
+}
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
index bf96bbce..ab8be473 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/ValidationTestBase.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation;
@@ -98,7 +99,7 @@ public abstract class ValidationTestBase {
/**
* All single line comments are interpreted as statements in the following
* format:
- *
+ *
* <pre>
* // statement1() statement2()
* </pre>
@@ -123,6 +124,29 @@ public abstract class ValidationTestBase {
source.getCoverage().getLastLine() <= source.getLines().size());
}
+ @Test
+ public void all_missed_instructions_should_have_line_number() {
+ CounterImpl c = CounterImpl.COUNTER_0_0;
+ for (Line line : source.getLines()) {
+ c = c.increment(line.getCoverage().getInstructionCounter());
+ }
+ assertEquals(
+ "sum of missed instructions of all lines should be equal to missed instructions of file",
+ source.getCoverage().getInstructionCounter().getMissedCount(),
+ c.getMissedCount());
+ }
+
+ @Test
+ public void all_branches_should_have_line_number() {
+ CounterImpl c = CounterImpl.COUNTER_0_0;
+ for (Line line : source.getLines()) {
+ c = c.increment(line.getCoverage().getBranchCounter());
+ }
+ assertEquals(
+ "sum of branch counters of all lines should be equal to branch counter of file",
+ source.getCoverage().getBranchCounter(), c);
+ }
+
/*
* Predefined assertion methods:
*/
diff --git a/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java b/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java
index d5c1cbe4..57b78839 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/test/validation/targets/Stubs.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.test.validation.targets;
@@ -39,6 +40,13 @@ public class Stubs {
}
/**
+ * Enum stub.
+ */
+ public static enum Enum {
+ A, B, C
+ }
+
+ /**
* Dummy method.
*/
public static void nop() {
@@ -98,8 +106,15 @@ public class Stubs {
}
/**
+ * @return always <code>A</code>
+ */
+ public static Enum enumA() {
+ return Enum.A;
+ }
+
+ /**
* Always throws a {@link RuntimeException}.
- *
+ *
* @throws StubException
* always thrown
*/
diff --git a/org.jacoco.core.test/src/org/jacoco/core/tools/ExecDumpClientTest.java b/org.jacoco.core.test/src/org/jacoco/core/tools/ExecDumpClientTest.java
index 640f9249..b943339a 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/tools/ExecDumpClientTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/tools/ExecDumpClientTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.tools;
@@ -32,9 +33,7 @@ import org.jacoco.core.runtime.RemoteControlReader;
import org.jacoco.core.runtime.RemoteControlWriter;
import org.junit.After;
import org.junit.Before;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.rules.ExpectedException;
/**
* Unit tests for {@link ExecDumpClient}.
@@ -49,9 +48,6 @@ public class ExecDumpClientTest {
private ServerSocket server;
- @Rule
- public ExpectedException exception = ExpectedException.none();
-
@Before
public void setup() {
callbacks = new ArrayList<String>();
@@ -135,11 +131,13 @@ public class ExecDumpClientTest {
@Test
public void should_throw_IOException_when_server_closes_connection_without_response()
throws IOException {
- exception.expect(IOException.class);
- exception.expectMessage("Socket closed unexpectedly.");
-
int port = createNopServer();
- client.dump((String) null, port);
+ try {
+ client.dump((String) null, port);
+ fail("exception expected");
+ } catch (IOException e) {
+ assertEquals("Socket closed unexpectedly.", e.getMessage());
+ }
}
private int getFreePort() throws IOException {
diff --git a/org.jacoco.core.test/src/org/jacoco/core/tools/ExecFileLoaderTest.java b/org.jacoco.core.test/src/org/jacoco/core/tools/ExecFileLoaderTest.java
index 12148881..95dcb81c 100644
--- a/org.jacoco.core.test/src/org/jacoco/core/tools/ExecFileLoaderTest.java
+++ b/org.jacoco.core.test/src/org/jacoco/core/tools/ExecFileLoaderTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.tools;
@@ -118,8 +119,8 @@ public class ExecFileLoaderTest {
final FileOutputStream out = new FileOutputStream(file);
final ExecutionDataWriter writer = new ExecutionDataWriter(out);
final int value = id.length();
- writer.visitClassExecution(new ExecutionData(value, id,
- new boolean[] { true }));
+ writer.visitClassExecution(
+ new ExecutionData(value, id, new boolean[] { true }));
writer.visitSessionInfo(new SessionInfo(id, value, value));
out.close();
return file;
diff --git a/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs b/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs
index fd17991e..a3dee78c 100644
--- a/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.jacoco.core/.settings/org.eclipse.jdt.ui.prefs
@@ -1,4 +1,3 @@
-#Thu Jul 02 08:43:37 CEST 2009
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
@@ -11,15 +10,18 @@ sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.insert_inferred_type_arguments=false
sp_cleanup.make_local_variable_final=true
sp_cleanup.make_parameters_final=true
sp_cleanup.make_private_fields_final=true
@@ -32,10 +34,13 @@ sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_redundant_modifiers=false
+sp_cleanup.remove_redundant_semicolons=false
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
@@ -48,10 +53,14 @@ sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_autoboxing=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+sp_cleanup.use_unboxing=false
diff --git a/org.jacoco.core/about.html b/org.jacoco.core/about.html
index d31112db..d03d4ab5 100644
--- a/org.jacoco.core/about.html
+++ b/org.jacoco.core/about.html
@@ -9,19 +9,19 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.core/pom.xml b/org.jacoco.core/pom.xml
index 0bb5b2b8..c7048527 100644
--- a/org.jacoco.core/pom.xml
+++ b/org.jacoco.core/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.core/src/org/jacoco/core/JaCoCo.java b/org.jacoco.core/src/org/jacoco/core/JaCoCo.java
index ce9ec053..32ab8085 100644
--- a/org.jacoco.core/src/org/jacoco/core/JaCoCo.java
+++ b/org.jacoco.core/src/org/jacoco/core/JaCoCo.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core;
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
index 7759b89d..b3a34d25 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/Analyzer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -53,7 +54,7 @@ public class Analyzer {
/**
* Creates a new analyzer reporting to the given output.
- *
+ *
* @param executionData
* execution data
* @param coverageVisitor
@@ -69,7 +70,7 @@ public class Analyzer {
/**
* Creates an ASM class visitor for analysis.
- *
+ *
* @param classid
* id of the class calculated with {@link CRC64}
* @param className
@@ -119,7 +120,7 @@ public class Analyzer {
/**
* Analyzes the class definition from a given in-memory buffer.
- *
+ *
* @param buffer
* class definitions
* @param location
@@ -139,7 +140,7 @@ public class Analyzer {
/**
* Analyzes the class definition from a given input stream. The provided
* {@link InputStream} is not closed by this method.
- *
+ *
* @param input
* stream to read class definition from
* @param location
@@ -172,7 +173,7 @@ public class Analyzer {
* archive or a gzip stream that is searched recursively for class files.
* All other content types are ignored. The provided {@link InputStream} is
* not closed by this method.
- *
+ *
* @param input
* input data
* @param location
@@ -208,7 +209,7 @@ public class Analyzer {
* Analyzes all class files contained in the given file or folder. Class
* files as well as ZIP files are considered. Folders are searched
* recursively.
- *
+ *
* @param file
* file or folder to look for class files
* @return number of class files found
@@ -235,7 +236,7 @@ public class Analyzer {
/**
* Analyzes all classes from the given class path. Directories containing
* class files as well as archive files are considered.
- *
+ *
* @param path
* path definition
* @param basedir
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java b/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
index 8a67b970..6fe69c6c 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CounterComparator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -74,7 +75,7 @@ public class CounterComparator implements Comparator<ICounter>, Serializable {
/**
* Creates a new version of this comparator that sorts in reverse order.
- *
+ *
* @return reverse comparator
*/
public CounterComparator reverse() {
@@ -84,7 +85,7 @@ public class CounterComparator implements Comparator<ICounter>, Serializable {
/**
* Creates a new comparator for {@link ICoverageNode} counters of the given
* entity based on this counter sorting criteria.
- *
+ *
* @param entity
* counter entity to sort on
* @return comparator for {@link ICoverageNode} elements
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
index 784fbd82..2f99f0b1 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageBuilder.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -26,7 +27,7 @@ import org.jacoco.core.internal.analysis.SourceFileCoverageImpl;
* {@link ICoverageVisitor} interface. Afterwards the aggregated data can be
* obtained with {@link #getClasses()}, {@link #getSourceFiles()} or
* {@link #getBundle(String)} in the following hierarchy:
- *
+ *
* <pre>
* {@link IBundleCoverage}
* +-- {@link IPackageCoverage}*
@@ -42,7 +43,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Create a new builder.
- *
+ *
*/
public CoverageBuilder() {
this.classes = new HashMap<String, IClassCoverage>();
@@ -51,7 +52,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all class nodes currently contained in this builder.
- *
+ *
* @return all class nodes
*/
public Collection<IClassCoverage> getClasses() {
@@ -60,7 +61,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all source file nodes currently contained in this builder.
- *
+ *
* @return all source file nodes
*/
public Collection<ISourceFileCoverage> getSourceFiles() {
@@ -69,7 +70,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Creates a bundle from all nodes currently contained in this bundle.
- *
+ *
* @param name
* Name of the bundle
* @return bundle containing all classes and source files
@@ -81,7 +82,7 @@ public class CoverageBuilder implements ICoverageVisitor {
/**
* Returns all classes for which execution data does not match.
- *
+ *
* @see IClassCoverage#isNoMatch()
* @return collection of classes with non-matching execution data
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
index 6be3bb6f..db8045be 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/CoverageNodeImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -44,7 +45,7 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Creates a new coverage data node.
- *
+ *
* @param elementType
* type of the element represented by this instance
* @param name
@@ -63,17 +64,17 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Increments the counters by the values given by another element.
- *
+ *
* @param child
* counters to add
*/
public void increment(final ICoverageNode child) {
- instructionCounter = instructionCounter.increment(child
- .getInstructionCounter());
+ instructionCounter = instructionCounter
+ .increment(child.getInstructionCounter());
branchCounter = branchCounter.increment(child.getBranchCounter());
lineCounter = lineCounter.increment(child.getLineCounter());
- complexityCounter = complexityCounter.increment(child
- .getComplexityCounter());
+ complexityCounter = complexityCounter
+ .increment(child.getComplexityCounter());
methodCounter = methodCounter.increment(child.getMethodCounter());
classCounter = classCounter.increment(child.getClassCounter());
}
@@ -81,7 +82,7 @@ public class CoverageNodeImpl implements ICoverageNode {
/**
* Increments the counters by the values given by the collection of
* elements.
- *
+ *
* @param children
* list of nodes, which counters will be added to this node
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
index d488f475..aa23a95c 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IBundleCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -15,14 +16,14 @@ import java.util.Collection;
/**
* Coverage data of a bundle. A bundle groups a collection of packages.
- *
+ *
* @see IPackageCoverage
*/
public interface IBundleCoverage extends ICoverageNode {
/**
* Returns all packages contained in this bundle.
- *
+ *
* @return all packages
*/
Collection<IPackageCoverage> getPackages();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
index 81cc6fe7..071c7c07 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IClassCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -16,7 +17,7 @@ import java.util.Collection;
/**
* Coverage data of a single class containing methods. The name of this node is
* the fully qualified class name in VM notation (slash separated).
- *
+ *
* @see IMethodCoverage
*/
public interface IClassCoverage extends ISourceNode {
@@ -24,7 +25,7 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the identifier for this class which is the CRC64 signature of the
* class definition.
- *
+ *
* @return class identifier
*/
long getId();
@@ -33,7 +34,7 @@ public interface IClassCoverage extends ISourceNode {
* Returns if the the analyzed class does match the execution data provided.
* More precisely if execution data is available for a class with the same
* qualified name but with a different class id.
- *
+ *
* @return <code>true</code> if this class does not match to the provided
* execution data.
*/
@@ -41,14 +42,14 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the VM signature of the class.
- *
+ *
* @return VM signature of the class (may be <code>null</code>)
*/
String getSignature();
/**
* Returns the VM name of the superclass.
- *
+ *
* @return VM name of the super class (may be <code>null</code>, i.e.
* <code>java/lang/Object</code>)
*/
@@ -56,28 +57,28 @@ public interface IClassCoverage extends ISourceNode {
/**
* Returns the VM names of implemented/extended interfaces.
- *
+ *
* @return VM names of implemented/extended interfaces
*/
String[] getInterfaceNames();
/**
* Returns the VM name of the package this class belongs to.
- *
+ *
* @return VM name of the package
*/
String getPackageName();
/**
* Returns the optional name of the corresponding source file.
- *
+ *
* @return name of the corresponding source file
*/
String getSourceFileName();
/**
* Returns the methods included in this class.
- *
+ *
* @return methods of this class
*/
Collection<IMethodCoverage> getMethods();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
index 60c8dcc5..f7e6adb0 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICounter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -60,7 +61,7 @@ public interface ICounter {
/**
* Returns the counter value of the given type.
- *
+ *
* @param value
* value type to return
* @return counter value
@@ -69,21 +70,21 @@ public interface ICounter {
/**
* Returns the total count of items.
- *
+ *
* @return total count of items
*/
int getTotalCount();
/**
* Returns the count of covered items.
- *
+ *
* @return count of covered items
*/
int getCoveredCount();
/**
* Returns the count of missed items.
- *
+ *
* @return count of missed items
*/
int getMissedCount();
@@ -91,7 +92,7 @@ public interface ICounter {
/**
* Calculates the ratio of covered to total count items. If total count
* items is 0 this method returns NaN.
- *
+ *
* @return ratio of covered to total count items
*/
double getCoveredRatio();
@@ -99,19 +100,19 @@ public interface ICounter {
/**
* Calculates the ratio of missed to total count items. If total count items
* is 0 this method returns NaN.
- *
+ *
* @return ratio of missed to total count items
*/
double getMissedRatio();
/**
* Returns the coverage status of this counter.
- *
+ *
* @see ICounter#EMPTY
* @see ICounter#NOT_COVERED
* @see ICounter#PARTLY_COVERED
* @see ICounter#FULLY_COVERED
- *
+ *
* @return status of this line
*/
int getStatus();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
index 20b107d4..ddb765a3 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageNode.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -68,63 +69,63 @@ public interface ICoverageNode {
/**
* Returns the type of element represented by this node.
- *
+ *
* @return type of this node
*/
ElementType getElementType();
/**
* Returns the name of this node.
- *
+ *
* @return name of this node
*/
String getName();
/**
* Returns the counter for byte code instructions.
- *
+ *
* @return counter for instructions
*/
ICounter getInstructionCounter();
/**
* Returns the counter for branches.
- *
+ *
* @return counter for branches
*/
ICounter getBranchCounter();
/**
* Returns the counter for lines.
- *
+ *
* @return counter for lines
*/
ICounter getLineCounter();
/**
* Returns the counter for cyclomatic complexity.
- *
+ *
* @return counter for complexity
*/
ICounter getComplexityCounter();
/**
* Returns the counter for methods.
- *
+ *
* @return counter for methods
*/
ICounter getMethodCounter();
/**
* Returns the counter for classes.
- *
+ *
* @return counter for classes
*/
ICounter getClassCounter();
/**
* Generic access to the the counters.
- *
+ *
* @param entity
* entity we're we want to have the counter for
* @return counter for the given entity
@@ -134,7 +135,8 @@ public interface ICoverageNode {
/**
* Checks whether this node contains code relevant for code coverage.
*
- * @return <code>true</code> if this node contains code relevant for code coverage
+ * @return <code>true</code> if this node contains code relevant for code
+ * coverage
*/
boolean containsCode();
@@ -143,7 +145,7 @@ public interface ICoverageNode {
* implementations may contain heavy data structures, the copy returned by
* this method is reduced to the counters only. This helps to save memory
* while processing huge structures.
- *
+ *
* @return copy with counters only
*/
ICoverageNode getPlainCopy();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
index 3f702906..06fe9b7e 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ICoverageVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,7 +20,7 @@ public interface ICoverageVisitor {
/**
* For analyzed class coverage data is emitted to this method.
- *
+ *
* @param coverage
* coverage data for a class
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java b/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
index ef65dc0d..37a07240 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ILine.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,14 +20,14 @@ public interface ILine {
/**
* Returns the instruction counter for this line.
- *
+ *
* @return instruction counter
*/
ICounter getInstructionCounter();
/**
* Returns the branches counter for this line.
- *
+ *
* @return branches counter
*/
ICounter getBranchCounter();
@@ -34,12 +35,12 @@ public interface ILine {
/**
* Returns the coverage status of this line, calculated from the
* instructions counter and branch counter.
- *
+ *
* @see ICounter#EMPTY
* @see ICounter#NOT_COVERED
* @see ICounter#PARTLY_COVERED
* @see ICounter#FULLY_COVERED
- *
+ *
* @return status of this line
*/
int getStatus();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
index b6755170..1e278878 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IMethodCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,14 +20,14 @@ public interface IMethodCoverage extends ISourceNode {
/**
* Returns the descriptor of the method.
- *
+ *
* @return descriptor
*/
String getDesc();
/**
* Returns the generic signature of the method if defined.
- *
+ *
* @return generic signature or <code>null</code>
*/
String getSignature();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
index 32121620..b4c56a4a 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/IPackageCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -17,7 +18,7 @@ import java.util.Collection;
* Coverage data of a Java package containing classes and source files. The name
* of this node is the package name in VM notation (slash separated). The name
* of the default package is the empty string.
- *
+ *
* @see IClassCoverage
* @see ISourceFileCoverage
*/
@@ -25,14 +26,14 @@ public interface IPackageCoverage extends ICoverageNode {
/**
* Returns all classes contained in this package.
- *
+ *
* @return all classes
*/
Collection<IClassCoverage> getClasses();
/**
* Returns all source files in this package.
- *
+ *
* @return all source files
*/
Collection<ISourceFileCoverage> getSourceFiles();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
index 5f01160a..67dfa0d8 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceFileCoverage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -19,7 +20,7 @@ public interface ISourceFileCoverage extends ISourceNode {
/**
* Returns the VM name of the package the source file belongs to.
- *
+ *
* @return package name
*/
String getPackageName();
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
index d64b2cc1..8fd26fe1 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/ISourceNode.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -23,7 +24,7 @@ public interface ISourceNode extends ICoverageNode {
/**
* The number of the first line coverage information is available for. If no
* line is contained, the method returns -1.
- *
+ *
* @return number of the first line or {@link #UNKNOWN_LINE}
*/
int getFirstLine();
@@ -31,14 +32,14 @@ public interface ISourceNode extends ICoverageNode {
/**
* The number of the last line coverage information is available for. If no
* line is contained, the method returns -1.
- *
+ *
* @return number of the last line or {@link #UNKNOWN_LINE}
*/
int getLastLine();
/**
* Returns the line information for given line.
- *
+ *
* @param nr
* line number of interest
* @return line information
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
index 3fea25fb..85058f93 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/NodeComparator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.analysis;
@@ -23,7 +24,7 @@ import org.jacoco.core.analysis.ICoverageNode.CounterEntity;
/**
* Comparator to compare {@link ICoverageNode} objects by different counter
* criteria.
- *
+ *
* @see CounterComparator#on(ICoverageNode.CounterEntity)
*/
public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
@@ -42,10 +43,10 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
/**
* Creates a new composite comparator with a second search criterion.
- *
+ *
* @param second
* second criterion comparator
- *
+ *
* @return composite comparator
*/
public NodeComparator second(final Comparator<ICoverageNode> second) {
@@ -65,14 +66,15 @@ public class NodeComparator implements Comparator<ICoverageNode>, Serializable {
/**
* Returns a sorted copy of the given collection of {@link ICoverageNode}
* elements.
- *
+ *
* @param <T>
* actual type of the elements
* @param summaries
* collection to create a copy of
* @return sorted copy
*/
- public <T extends ICoverageNode> List<T> sort(final Collection<T> summaries) {
+ public <T extends ICoverageNode> List<T> sort(
+ final Collection<T> summaries) {
final List<T> result = new ArrayList<T>(summaries);
Collections.sort(result, this);
return result;
diff --git a/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java b/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
index d1a5e73b..4f83a0c4 100644
--- a/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/analysis/package-info.java
@@ -1,22 +1,22 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
* <p>
* Coverage calculation and analysis. The coverage information is calculated
* with an {@link org.jacoco.core.analysis.Analyzer} instance from class files
- * (target) and
- * {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution data}
- * (actual).
+ * (target) and {@linkplain org.jacoco.core.data.IExecutionDataVisitor execution
+ * data} (actual).
* </p>
*
* <p>
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java
index a728e033..a22c0235 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionData.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -32,7 +33,7 @@ public final class ExecutionData implements IExecutionData {
/**
* Creates a new {@link ExecutionData} object with the given probe data.
- *
+ *
* @param id
* class identifier
* @param name
@@ -50,7 +51,7 @@ public final class ExecutionData implements IExecutionData {
/**
* Creates a new {@link ExecutionData} object with the given probe data
* length. All probes are set to <code>false</code>.
- *
+ *
* @param id
* class identifier
* @param name
@@ -58,7 +59,8 @@ public final class ExecutionData implements IExecutionData {
* @param probeCount
* probe count
*/
- public ExecutionData(final long id, final String name, final int probeCount) {
+ public ExecutionData(final long id, final String name,
+ final int probeCount) {
this.id = id;
this.name = name;
this.probes = new boolean[probeCount];
@@ -67,7 +69,7 @@ public final class ExecutionData implements IExecutionData {
/**
* Return the unique identifier for this class. The identifier is the CRC64
* checksum of the raw class file definition.
- *
+ *
* @return class identifier
*/
public long getId() {
@@ -76,7 +78,7 @@ public final class ExecutionData implements IExecutionData {
/**
* The VM name of the class.
- *
+ *
* @return VM name
*/
public String getName() {
@@ -103,10 +105,9 @@ public final class ExecutionData implements IExecutionData {
}
/**
- * Returns the execution data probe for a given index. A value of
- * <code>true</code> indicates that the corresponding probe was
- * executed.
- *
+ * Returns the execution data probes. A value of <code>true</code> indicates
+ * that the corresponding probe was executed.
+ *
* @return probe data
*/
public boolean getProbe(final int index) {
@@ -130,7 +131,7 @@ public final class ExecutionData implements IExecutionData {
/**
* Checks whether any probe has been hit.
- *
+ *
* @return <code>true</code>, if at least one probe has been hit
*/
public boolean hasHits() {
@@ -147,13 +148,13 @@ public final class ExecutionData implements IExecutionData {
* a probe entry in this object is marked as executed (<code>true</code>) if
* this probe or the corresponding other probe was executed. So the result
* is
- *
+ *
* <pre>
* A or B
* </pre>
- *
+ *
* The probe array of the other object is not modified.
- *
+ *
* @param other
* execution data to merge
*/
@@ -168,19 +169,19 @@ public final class ExecutionData implements IExecutionData {
* probe in this object is set to the value of <code>flag</code> if the
* corresponding other probe was executed. For <code>flag==true</code> this
* corresponds to
- *
+ *
* <pre>
* A or B
* </pre>
- *
+ *
* For <code>flag==false</code> this can be considered as a subtraction
- *
+ *
* <pre>
* A and not B
* </pre>
- *
+ *
* The probe array of the other object is not modified.
- *
+ *
* @param other
* execution data to merge
* @param flag
@@ -203,7 +204,7 @@ public final class ExecutionData implements IExecutionData {
* Asserts that this execution data object is compatible with the given
* parameters. The purpose of this check is to detect a very unlikely class
* id collision.
- *
+ *
* @param id
* other class id, must be the same
* @param name
@@ -216,14 +217,14 @@ public final class ExecutionData implements IExecutionData {
public void assertCompatibility(final long id, final String name,
final int probecount) throws IllegalStateException {
if (this.id != id) {
- throw new IllegalStateException(format(
- "Different ids (%016x and %016x).", Long.valueOf(this.id),
- Long.valueOf(id)));
+ throw new IllegalStateException(
+ format("Different ids (%016x and %016x).",
+ Long.valueOf(this.id), Long.valueOf(id)));
}
if (!this.name.equals(name)) {
- throw new IllegalStateException(format(
- "Different class names %s and %s for id %016x.", this.name,
- name, Long.valueOf(id)));
+ throw new IllegalStateException(
+ format("Different class names %s and %s for id %016x.",
+ this.name, name, Long.valueOf(id)));
}
if (this.probes.length != probecount) {
throw new IllegalStateException(format(
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java
index dd8519b5..e7b7d816 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataReader.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -36,7 +37,7 @@ public class ExecutionDataReader {
* Creates a new reader based on the given input stream input. Depending on
* the nature of the underlying stream input should be buffered as most data
* is read in single bytes.
- *
+ *
* @param input
* input stream to read execution data from
*/
@@ -46,7 +47,7 @@ public class ExecutionDataReader {
/**
* Sets an listener for session information.
- *
+ *
* @param visitor
* visitor to retrieve session info events
*/
@@ -56,7 +57,7 @@ public class ExecutionDataReader {
/**
* Sets an listener for execution data.
- *
+ *
* @param visitor
* visitor to retrieve execution data events
*/
@@ -67,7 +68,7 @@ public class ExecutionDataReader {
/**
* Reads all data and reports it to the corresponding visitors. The stream
* is read until its end or a command confirmation has been sent.
- *
+ *
* @return <code>true</code> if additional data can be expected after a
* command has been executed. <code>false</code> if the end of the
* stream has been reached.
@@ -76,8 +77,8 @@ public class ExecutionDataReader {
* @throws IncompatibleExecDataVersionException
* incompatible data version from different JaCoCo release
*/
- public boolean read() throws IOException,
- IncompatibleExecDataVersionException {
+ public boolean read()
+ throws IOException, IncompatibleExecDataVersionException {
byte type;
do {
int i = in.read();
@@ -96,7 +97,7 @@ public class ExecutionDataReader {
/**
* Reads a block of data identified by the given id. Subclasses may
* overwrite this method to support additional block types.
- *
+ *
* @param blocktype
* block type
* @return <code>true</code> if there are more blocks to read
@@ -115,8 +116,8 @@ public class ExecutionDataReader {
readExecutionData();
return true;
default:
- throw new IOException(format("Unknown block type %x.",
- Byte.valueOf(blocktype)));
+ throw new IOException(
+ format("Unknown block type %x.", Byte.valueOf(blocktype)));
}
}
@@ -147,8 +148,8 @@ public class ExecutionDataReader {
final long id = in.readLong();
final String name = in.readUTF();
final boolean[] probes = in.readBooleanArray();
- executionDataVisitor.visitClassExecution(new ExecutionData(id, name,
- probes));
+ executionDataVisitor
+ .visitClassExecution(new ExecutionData(id, name, probes));
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataStore.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataStore.java
index ce0bec47..2291fd58 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataStore.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataStore.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -38,7 +39,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
* Adds the given {@link ExecutionData} object into the store. If there is
* already execution data with this same class id, this structure is merged
* with the given one.
- *
+ *
* @param data
* execution data to add or merge
* @throws IllegalStateException
@@ -64,7 +65,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
* store. I.e. for all set probes in the given data object the corresponding
* probes in this store will be unset. If there is no execution data with id
* of the given data object this operation will have no effect.
- *
+ *
* @param data
* execution data to subtract
* @throws IllegalStateException
@@ -84,7 +85,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
/**
* Subtracts all probes in the given execution data store from this store.
- *
+ *
* @param store
* execution data store to subtract
* @see #subtract(ExecutionData)
@@ -100,7 +101,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
/**
* Returns the {@link ExecutionData} entry with the given id if it exists in
* this store.
- *
+ *
* @param id
* class id
* @return execution data or <code>null</code>
@@ -114,7 +115,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
/**
* Checks whether execution data for classes with the given name are
* contained in the store.
- *
+ *
* @param name
* VM name
* @return <code>true</code> if at least one class with the name is
@@ -127,7 +128,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
/**
* Returns the coverage data for the class with the given identifier. If
* there is no data available under the given id a new entry is created.
- *
+ *
* @param id
* class identifier
* @param name
@@ -176,7 +177,7 @@ public final class ExecutionDataStore implements IExecutionDataVisitor {
/**
* Writes the content of the store to the given visitor interface.
- *
+ *
* @param visitor
* interface to write content to
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java
index bdf3445d..c92073c1 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/ExecutionDataWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -20,10 +21,12 @@ import org.jacoco.core.internal.data.CompactDataOutput;
/**
* Serialization of execution data into binary streams.
*/
-public class ExecutionDataWriter implements ISessionInfoVisitor,
- IExecutionDataVisitor {
+public class ExecutionDataWriter
+ implements ISessionInfoVisitor, IExecutionDataVisitor {
- /** File format version, will be incremented for each incompatible change. */
+ /**
+ * File format version, will be incremented for each incompatible change.
+ */
public static final char FORMAT_VERSION;
static {
@@ -50,7 +53,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor,
* Creates a new writer based on the given output stream. Depending on the
* nature of the underlying stream output should be buffered as most data is
* written in single bytes.
- *
+ *
* @param output
* binary stream to write execution data to
* @throws IOException
@@ -63,7 +66,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor,
/**
* Writes an file header to identify the stream and its protocol version.
- *
+ *
* @throws IOException
* if the header can't be written
*/
@@ -75,7 +78,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor,
/**
* Flushes the underlying stream.
- *
+ *
* @throws IOException
* if the underlying stream can't be flushed
*/
@@ -115,7 +118,7 @@ public class ExecutionDataWriter implements ISessionInfoVisitor,
* Returns the first bytes of a file that represents a valid execution data
* file. In any case every execution data file starts with the three bytes
* <code>0x01 0xC0 0xC0</code>.
- *
+ *
* @return first bytes of a execution data file
*/
public static final byte[] getFileHeader() {
diff --git a/org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java b/org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java
index 14eabbe7..b65ed2a7 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/IExecutionDataVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -20,7 +21,7 @@ public interface IExecutionDataVisitor {
/**
* Provides execution data for a class.
- *
+ *
* @param data
* execution data for a class
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java b/org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java
index b80797a9..5f6a9375 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/ISessionInfoVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -21,7 +22,7 @@ public interface ISessionInfoVisitor {
/**
* Provides session information for the subsequent execution data calls. In
* case of merged sessions this method might be called multiple times.
- *
+ *
* @param info
* session information
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/data/IncompatibleExecDataVersionException.java b/org.jacoco.core/src/org/jacoco/core/data/IncompatibleExecDataVersionException.java
index cc508e73..30e61e2d 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/IncompatibleExecDataVersionException.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/IncompatibleExecDataVersionException.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann, somechris - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -24,7 +25,7 @@ public class IncompatibleExecDataVersionException extends IOException {
/**
* Creates a new exception to flag version mismatches in execution data.
- *
+ *
* @param actualVersion
* version found in the exec data
*/
@@ -39,7 +40,7 @@ public class IncompatibleExecDataVersionException extends IOException {
/**
* Gets the version expected in the execution data which can be read by this
* version of JaCoCo.
- *
+ *
* @return expected version in execution data
*/
public int getExpectedVersion() {
@@ -48,7 +49,7 @@ public class IncompatibleExecDataVersionException extends IOException {
/**
* Gets the actual version found in the execution data.
- *
+ *
* @return actual version in execution data
*/
public int getActualVersion() {
diff --git a/org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java b/org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java
index 31f7b5e3..f6e77597 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/SessionInfo.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -26,7 +27,7 @@ public class SessionInfo implements Comparable<SessionInfo> {
/**
* Create a immutable session info with the given data.
- *
+ *
* @param id
* arbitrary session identifier, must not be <code>null</code>
* @param start
diff --git a/org.jacoco.core/src/org/jacoco/core/data/SessionInfoStore.java b/org.jacoco.core/src/org/jacoco/core/data/SessionInfoStore.java
index 568dcc96..20fb872b 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/SessionInfoStore.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/SessionInfoStore.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.data;
@@ -28,7 +29,7 @@ public class SessionInfoStore implements ISessionInfoVisitor {
/**
* Tests whether the store is empty.
- *
+ *
* @return <code>true</code> if the store is empty
*/
public boolean isEmpty() {
@@ -39,7 +40,7 @@ public class SessionInfoStore implements ISessionInfoVisitor {
* Returns all {@link SessionInfo} objects currently contained in the store.
* The info objects are ordered by its natural ordering (i.e. by the dump
* time stamp).
- *
+ *
* @return list of stored {@link SessionInfo} objects
*/
public List<SessionInfo> getInfos() {
@@ -54,11 +55,11 @@ public class SessionInfoStore implements ISessionInfoVisitor {
* all contained sessions, the dump timestamp the maximum of all contained
* sessions. If no session is currently contained both timestamps are set to
* <code>0</code>.
- *
+ *
* @param id
* identifier for the merged session info
* @return new {@link SessionInfo} object
- *
+ *
*/
public SessionInfo getMerged(final String id) {
if (infos.isEmpty()) {
@@ -76,7 +77,7 @@ public class SessionInfoStore implements ISessionInfoVisitor {
/**
* Writes all contained {@link SessionInfo} objects into the given visitor.
* The info objects are emitted in chronological order by dump timestamp.
- *
+ *
* @param visitor
* visitor to emit {@link SessionInfo} objects to
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/data/package-info.java b/org.jacoco.core/src/org/jacoco/core/data/package-info.java
index 6e2f37bf..b7f33fe0 100644
--- a/org.jacoco.core/src/org/jacoco/core/data/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/data/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java b/org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java
index 561b09cb..5225d2e4 100644
--- a/org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java
+++ b/org.jacoco.core/src/org/jacoco/core/instr/Instrumenter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.instr;
@@ -15,6 +16,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.util.zip.CRC32;
import java.util.zip.GZIPInputStream;
import java.util.zip.GZIPOutputStream;
import java.util.zip.ZipEntry;
@@ -47,7 +49,7 @@ public class Instrumenter {
/**
* Creates a new instance based on the given runtime.
- *
+ *
* @param runtime
* runtime used by the instrumented classes
*/
@@ -61,7 +63,7 @@ public class Instrumenter {
* typically necessary as instrumentation modifies the class files and
* therefore invalidates existing JAR signatures. Default is
* <code>true</code>.
- *
+ *
* @param flag
* <code>true</code> if signatures should be removed
*/
@@ -91,7 +93,7 @@ public class Instrumenter {
/**
* Creates a instrumented version of the given class if possible.
- *
+ *
* @param buffer
* definition of the class
* @param name
@@ -112,7 +114,7 @@ public class Instrumenter {
/**
* Creates a instrumented version of the given class if possible. The
* provided {@link InputStream} is not closed by this method.
- *
+ *
* @param input
* stream to read class definition from
* @param name
@@ -137,7 +139,7 @@ public class Instrumenter {
* Creates a instrumented version of the given class file. The provided
* {@link InputStream} and {@link OutputStream} instances are not closed by
* this method.
- *
+ *
* @param input
* stream to read class definition from
* @param output
@@ -167,7 +169,7 @@ public class Instrumenter {
* other files are copied without modification. The provided
* {@link InputStream} and {@link OutputStream} instances are not closed by
* this method.
- *
+ *
* @param input
* stream to contents from
* @param output
@@ -215,9 +217,27 @@ public class Instrumenter {
continue;
}
- zipout.putNextEntry(new ZipEntry(entryName));
- if (!signatureRemover.filterEntry(entryName, zipin, zipout)) {
- count += instrumentAll(zipin, zipout, name + "@" + entryName);
+ final ZipEntry newEntry = new ZipEntry(entryName);
+ newEntry.setMethod(entry.getMethod());
+ switch (entry.getMethod()) {
+ case ZipEntry.DEFLATED:
+ zipout.putNextEntry(newEntry);
+ count += filterOrInstrument(zipin, zipout, name, entryName);
+ break;
+ case ZipEntry.STORED:
+ // Uncompressed entries must be processed in-memory to calculate
+ // mandatory entry size and CRC
+ final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ count += filterOrInstrument(zipin, buffer, name, entryName);
+ final byte[] bytes = buffer.toByteArray();
+ newEntry.setSize(bytes.length);
+ newEntry.setCompressedSize(bytes.length);
+ newEntry.setCrc(crc(bytes));
+ zipout.putNextEntry(newEntry);
+ zipout.write(bytes);
+ break;
+ default:
+ throw new AssertionError(entry.getMethod());
}
zipout.closeEntry();
}
@@ -225,6 +245,21 @@ public class Instrumenter {
return count;
}
+ private int filterOrInstrument(final InputStream in, final OutputStream out,
+ final String name, final String entryName) throws IOException {
+ if (signatureRemover.filterEntry(entryName, in, out)) {
+ return 0;
+ } else {
+ return instrumentAll(in, out, name + "@" + entryName);
+ }
+ }
+
+ private static long crc(final byte[] data) {
+ final CRC32 crc = new CRC32();
+ crc.update(data);
+ return crc.getValue();
+ }
+
private ZipEntry nextEntry(final ZipInputStream input,
final String location) throws IOException {
try {
diff --git a/org.jacoco.core/src/org/jacoco/core/instr/package-info.java b/org.jacoco.core/src/org/jacoco/core/instr/package-info.java
index 1da3ef19..3293f149 100644
--- a/org.jacoco.core/src/org/jacoco/core/instr/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/instr/package-info.java
@@ -1,19 +1,20 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
* <p>
- * Instrumentation of Java class files for code coverage. The main entry point
- * is the class {@link org.jacoco.core.instr.Instrumenter}.
+ * Instrumentation of Java class files for code coverage. The main entry point
+ * is the class {@link org.jacoco.core.instr.Instrumenter}.
* </p>
*/
package org.jacoco.core.instr;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java b/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java
index 74574ecc..f07528ad 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/ContentTypeDetector.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal;
@@ -15,8 +16,6 @@ import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
-import org.objectweb.asm.Opcodes;
-
/**
* Detector for content types of binary streams based on a magic headers.
*/
@@ -47,7 +46,7 @@ public class ContentTypeDetector {
* Creates a new detector based on the given input. To process the complete
* original input afterwards use the stream returned by
* {@link #getInputStream()}.
- *
+ *
* @param in
* input to read the header from
* @throws IOException
@@ -72,24 +71,14 @@ public class ContentTypeDetector {
case PACK200FILE:
return PACK200FILE;
case CLASSFILE:
- // also verify version to distinguish from Mach Object files:
- switch (readInt(in)) {
- case Opcodes.V1_1:
- case Opcodes.V1_2:
- case Opcodes.V1_3:
- case Opcodes.V1_4:
- case Opcodes.V1_5:
- case Opcodes.V1_6:
- case Opcodes.V1_7:
- case Opcodes.V1_8:
- case Opcodes.V9:
- case Opcodes.V10:
- case Opcodes.V11:
- case Opcodes.V11 | Opcodes.V_PREVIEW:
- case Opcodes.V12:
- case Opcodes.V12 | Opcodes.V_PREVIEW:
- case (Opcodes.V12 + 1):
- case (Opcodes.V12 + 1) | Opcodes.V_PREVIEW:
+ // Mach-O fat/universal binaries have the same magic header as Java
+ // class files, number of architectures is stored in unsigned 4
+ // bytes in the same place and in the same big-endian order as major
+ // and minor version of class file. Hopefully on practice number of
+ // architectures in single executable is less than 45, which is
+ // major version of Java 1.1 class files:
+ final int majorVersion = readInt(in) & 0xFFFF;
+ if (majorVersion >= 45) {
return CLASSFILE;
}
}
@@ -106,7 +95,7 @@ public class ContentTypeDetector {
/**
* Returns an input stream instance to read the complete content (including
* the header) of the underlying stream.
- *
+ *
* @return input stream containing the complete content
*/
public InputStream getInputStream() {
@@ -115,7 +104,7 @@ public class ContentTypeDetector {
/**
* Returns the detected file type.
- *
+ *
* @return file type
*/
public int getType() {
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/InputStreams.java b/org.jacoco.core/src/org/jacoco/core/internal/InputStreams.java
index 93f86f67..7cd104b7 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/InputStreams.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/InputStreams.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/Pack200Streams.java b/org.jacoco.core/src/org/jacoco/core/internal/Pack200Streams.java
index eae4fdfa..b9539ef3 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/Pack200Streams.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/Pack200Streams.java
@@ -1,78 +1,116 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.internal;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.jar.JarInputStream;
-import java.util.jar.JarOutputStream;
-import java.util.jar.Pack200;
-
-/**
- * Internal wrapper for the weird Pack200 Java API to allow usage with streams.
- */
-public final class Pack200Streams {
-
- /**
- * Unpack a stream in Pack200 format into a stream in JAR/ZIP format.
- *
- * @param input
- * stream in Pack200 format
- * @return stream in JAR/ZIP format
- * @throws IOException
- * in case of errors with the streams
- */
- public static InputStream unpack(final InputStream input)
- throws IOException {
- final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
- final JarOutputStream jar = new JarOutputStream(buffer);
- Pack200.newUnpacker().unpack(new NoCloseInput(input), jar);
- jar.finish();
- return new ByteArrayInputStream(buffer.toByteArray());
- }
-
- /**
- * Packs a buffer in JAR/ZIP format into a stream in Pack200 format.
- *
- * @param source
- * source in JAR/ZIP format
- * @param output
- * stream in Pack200 format
- * @throws IOException
- * in case of errors with the streams
- */
- public static void pack(final byte[] source, final OutputStream output)
- throws IOException {
- final JarInputStream jar = new JarInputStream(new ByteArrayInputStream(
- source));
- Pack200.newPacker().pack(jar, output);
- }
-
- private static class NoCloseInput extends FilterInputStream {
- protected NoCloseInput(final InputStream in) {
- super(in);
- }
-
- @Override
- public void close() throws IOException {
- // do not close the underlying stream
- }
- }
-
- private Pack200Streams() {
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FilterInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.util.jar.JarInputStream;
+import java.util.jar.JarOutputStream;
+
+/**
+ * Internal wrapper for the weird Pack200 Java API to allow usage with streams.
+ */
+public final class Pack200Streams {
+
+ /**
+ * Unpack a stream in Pack200 format into a stream in JAR/ZIP format.
+ *
+ * @param input
+ * stream in Pack200 format
+ * @return stream in JAR/ZIP format
+ * @throws IOException
+ * in case of errors with the streams
+ */
+ @SuppressWarnings("resource")
+ public static InputStream unpack(final InputStream input)
+ throws IOException {
+ final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ final JarOutputStream jar = new JarOutputStream(buffer);
+ try {
+ final Object unpacker = Class.forName("java.util.jar.Pack200")
+ .getMethod("newUnpacker").invoke(null);
+ Class.forName("java.util.jar.Pack200$Unpacker")
+ .getMethod("unpack", InputStream.class,
+ JarOutputStream.class)
+ .invoke(unpacker, new NoCloseInput(input), jar);
+ } catch (ClassNotFoundException e) {
+ throw newIOException(e);
+ } catch (NoSuchMethodException e) {
+ throw newIOException(e);
+ } catch (IllegalAccessException e) {
+ throw newIOException(e);
+ } catch (InvocationTargetException e) {
+ throw newIOException(e.getCause());
+ }
+ jar.finish();
+ return new ByteArrayInputStream(buffer.toByteArray());
+ }
+
+ /**
+ * Packs a buffer in JAR/ZIP format into a stream in Pack200 format.
+ *
+ * @param source
+ * source in JAR/ZIP format
+ * @param output
+ * stream in Pack200 format
+ * @throws IOException
+ * in case of errors with the streams
+ */
+ @SuppressWarnings("resource")
+ public static void pack(final byte[] source, final OutputStream output)
+ throws IOException {
+ final JarInputStream jar = new JarInputStream(
+ new ByteArrayInputStream(source));
+ try {
+ final Object packer = Class.forName("java.util.jar.Pack200")
+ .getMethod("newPacker").invoke(null);
+ Class.forName("java.util.jar.Pack200$Packer")
+ .getMethod("pack", JarInputStream.class, OutputStream.class)
+ .invoke(packer, jar, output);
+ } catch (ClassNotFoundException e) {
+ throw newIOException(e);
+ } catch (NoSuchMethodException e) {
+ throw newIOException(e);
+ } catch (IllegalAccessException e) {
+ throw newIOException(e);
+ } catch (InvocationTargetException e) {
+ throw newIOException(e.getCause());
+ }
+ }
+
+ private static IOException newIOException(final Throwable cause) {
+ final IOException exception = new IOException();
+ exception.initCause(cause);
+ return exception;
+ }
+
+ private static class NoCloseInput extends FilterInputStream {
+ protected NoCloseInput(final InputStream in) {
+ super(in);
+ }
+
+ @Override
+ public void close() throws IOException {
+ // do not close the underlying stream
+ }
+ }
+
+ private Pack200Streams() {
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/BundleCoverageImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/BundleCoverageImpl.java
index 9c6fcefc..8e799153 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/BundleCoverageImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/BundleCoverageImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -28,14 +29,14 @@ import org.jacoco.core.analysis.ISourceFileCoverage;
/**
* Implementation of {@link IBundleCoverage}.
*/
-public class BundleCoverageImpl extends CoverageNodeImpl implements
- IBundleCoverage {
+public class BundleCoverageImpl extends CoverageNodeImpl
+ implements IBundleCoverage {
private final Collection<IPackageCoverage> packages;
/**
* Creates a new instance of a bundle with the given name.
- *
+ *
* @param name
* name of this bundle
* @param packages
@@ -51,7 +52,7 @@ public class BundleCoverageImpl extends CoverageNodeImpl implements
/**
* Creates a new instance of a bundle with the given name. The packages are
* calculated from the given classes and source files.
- *
+ *
* @param name
* name of this bundle
* @param classes
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassAnalyzer.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassAnalyzer.java
index a18ee7ed..c42c7eea 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassAnalyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassAnalyzer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -21,6 +22,7 @@ import org.jacoco.core.internal.flow.ClassProbesVisitor;
import org.jacoco.core.internal.flow.MethodProbesVisitor;
import org.jacoco.core.internal.instr.InstrSupport;
import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Attribute;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.tree.MethodNode;
@@ -37,13 +39,15 @@ public class ClassAnalyzer extends ClassProbesVisitor
private final Set<String> classAnnotations = new HashSet<String>();
+ private final Set<String> classAttributes = new HashSet<String>();
+
private String sourceDebugExtension;
private final IFilter filter;
/**
* Creates a new analyzer that builds coverage data for a class.
- *
+ *
* @param coverage
* coverage node for the analyzed class data
* @param probes
@@ -76,6 +80,11 @@ public class ClassAnalyzer extends ClassProbesVisitor
}
@Override
+ public void visitAttribute(final Attribute attribute) {
+ classAttributes.add(attribute.type);
+ }
+
+ @Override
public void visitSource(final String source, final String debug) {
coverage.setSourceFileName(stringPool.get(source));
sourceDebugExtension = debug;
@@ -146,6 +155,10 @@ public class ClassAnalyzer extends ClassProbesVisitor
return classAnnotations;
}
+ public Set<String> getClassAttributes() {
+ return classAttributes;
+ }
+
public String getSourceFileName() {
return coverage.getSourceFileName();
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassCoverageImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassCoverageImpl.java
index 444a81ed..f91c8f67 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassCoverageImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/ClassCoverageImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -20,7 +21,8 @@ import org.jacoco.core.analysis.IMethodCoverage;
/**
* Implementation of {@link IClassCoverage}.
*/
-public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage {
+public class ClassCoverageImpl extends SourceNodeImpl
+ implements IClassCoverage {
private final long id;
private final boolean noMatch;
@@ -32,7 +34,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Creates a class coverage data object with the given parameters.
- *
+ *
* @param name
* VM name of the class
* @param id
@@ -51,7 +53,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Add a method to this class.
- *
+ *
* @param method
* method data to add
*/
@@ -68,7 +70,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Sets the VM signature of the class.
- *
+ *
* @param signature
* VM signature of the class (may be <code>null</code>)
*/
@@ -78,7 +80,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Sets the VM name of the superclass.
- *
+ *
* @param superName
* VM name of the super class (may be <code>null</code>, i.e.
* <code>java/lang/Object</code>)
@@ -89,7 +91,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Sets the VM names of implemented/extended interfaces.
- *
+ *
* @param interfaces
* VM names of implemented/extended interfaces
*/
@@ -99,7 +101,7 @@ public class ClassCoverageImpl extends SourceNodeImpl implements IClassCoverage
/**
* Sets the name of the corresponding source file for this class.
- *
+ *
* @param sourceFileName
* name of the source file
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/CounterImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/CounterImpl.java
index e166c626..0ff6d78b 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/CounterImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/CounterImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -22,7 +23,8 @@ public abstract class CounterImpl implements ICounter {
/** Max counter value for which singletons are created */
private static final int SINGLETON_LIMIT = 30;
- private static final CounterImpl[][] SINGLETONS = new CounterImpl[SINGLETON_LIMIT + 1][];
+ private static final CounterImpl[][] SINGLETONS = new CounterImpl[SINGLETON_LIMIT
+ + 1][];
static {
for (int i = 0; i <= SINGLETON_LIMIT; i++) {
@@ -74,7 +76,7 @@ public abstract class CounterImpl implements ICounter {
/**
* Factory method to retrieve a counter with the given number of items.
- *
+ *
* @param missed
* number of missed items
* @param covered
@@ -91,7 +93,7 @@ public abstract class CounterImpl implements ICounter {
/**
* Factory method to retrieve a clone of the given counter.
- *
+ *
* @param counter
* counter to copy
* @return counter instance
@@ -108,7 +110,7 @@ public abstract class CounterImpl implements ICounter {
/**
* Creates a new instance with the given numbers.
- *
+ *
* @param missed
* number of missed items
* @param covered
@@ -123,7 +125,7 @@ public abstract class CounterImpl implements ICounter {
* Returns a counter with values incremented by the numbers of the given
* counter. It is up to the implementation whether this counter instance is
* modified or a new instance is returned.
- *
+ *
* @param counter
* number of additional total and covered items
* @return counter instance with incremented values
@@ -136,7 +138,7 @@ public abstract class CounterImpl implements ICounter {
* Returns a counter with values incremented by the given numbers. It is up
* to the implementation whether this counter instance is modified or a new
* instance is returned.
- *
+ *
* @param missed
* number of missed items
* @param covered
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/Instruction.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/Instruction.java
index c5a1aaae..2e34bf03 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/Instruction.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/Instruction.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -22,31 +23,31 @@ import org.jacoco.core.analysis.ICounter;
* outgoing branch. Each instruction has at least one branch, for example in
* case of a simple sequence of instructions (by convention branch 0). Instances
* of this class are used in two steps:
- *
- * <h3>Step 1: Building the CFG</h3>
- *
+ *
+ * <h2>Step 1: Building the CFG</h2>
+ *
* For each bytecode instruction of a method a {@link Instruction} instance is
* created. In correspondence with the CFG these instances are linked with each
* other with the <code>addBranch()</code> methods. The executions status is
* either directly derived from a probe which has been inserted in the execution
* flow ({@link #addBranch(boolean, int)}) or indirectly propagated along the
* CFG edges ({@link #addBranch(Instruction, int)}).
- *
- * <h3>Step 2: Querying the Coverage Status</h3>
- *
+ *
+ * <h2>Step 2: Querying the Coverage Status</h2>
+ *
* After all instructions have been created and linked each instruction knows
* its execution status and can be queried with:
- *
+ *
* <ul>
* <li>{@link #getLine()}</li>
* <li>{@link #getInstructionCounter()}</li>
* <li>{@link #getBranchCounter()}</li>
* </ul>
- *
+ *
* For the purpose of filtering instructions can be combined to new
* instructions. Note that these methods create new {@link Instruction}
* instances and do not modify the existing ones.
- *
+ *
* <ul>
* <li>{@link #merge(Instruction)}</li>
* <li>{@link #replaceBranches(Collection)}</li>
@@ -66,7 +67,7 @@ public class Instruction {
/**
* New instruction at the given line.
- *
+ *
* @param line
* source line this instruction belongs to
*/
@@ -81,10 +82,10 @@ public class Instruction {
* derived from the execution status of the target instruction. In case the
* branch is covered the status is propagated also to the predecessors of
* this instruction.
- *
+ *
* Note: This method is not idempotent and must be called exactly once for
* every branch.
- *
+ *
* @param target
* target instruction of this branch
* @param branch
@@ -103,10 +104,10 @@ public class Instruction {
* Adds a branch to this instruction which execution status is directly
* derived from a probe. In case the branch is covered the status is
* propagated also to the predecessors of this instruction.
- *
+ *
* Note: This method is not idempotent and must be called exactly once for
* every branch.
- *
+ *
* @param executed
* whether the corresponding probe has been executed
* @param branch
@@ -134,7 +135,7 @@ public class Instruction {
/**
* Returns the source line this instruction belongs to.
- *
+ *
* @return corresponding source line
*/
public int getLine() {
@@ -144,7 +145,7 @@ public class Instruction {
/**
* Merges information about covered branches of this instruction with
* another instruction.
- *
+ *
* @param other
* instruction to merge with
* @return new instance with merged branches
@@ -161,7 +162,7 @@ public class Instruction {
* Creates a copy of this instruction where all outgoing branches are
* replaced with the given instructions. The coverage status of the new
* instruction is derived from the status of the given instructions.
- *
+ *
* @param newBranches
* new branches to consider
* @return new instance with replaced branches
@@ -182,7 +183,7 @@ public class Instruction {
/**
* Returns the instruction coverage counter of this instruction. It is
* always 1 instruction which is covered or not.
- *
+ *
* @return the instruction coverage counter
*/
public ICounter getInstructionCounter() {
@@ -193,7 +194,7 @@ public class Instruction {
/**
* Returns the branch coverage counter of this instruction. Only
* instructions with at least 2 outgoing edges report branches.
- *
+ *
* @return the branch coverage counter
*/
public ICounter getBranchCounter() {
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/InstructionsBuilder.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/InstructionsBuilder.java
index b22d872a..a69f34c8 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/InstructionsBuilder.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/InstructionsBuilder.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -46,7 +47,7 @@ class InstructionsBuilder {
/**
* The labels which mark the subsequent instructions.
- *
+ *
* Due to ASM issue #315745 there can be more than one label per instruction
*/
private final List<Label> currentLabel;
@@ -60,7 +61,7 @@ class InstructionsBuilder {
/**
* Creates a new builder instance which can be used to analyze a single
* method.
- *
+ *
* @param probes
* probe array of the corresponding class used to determine the
* coverage status of every instruction.
@@ -126,7 +127,7 @@ class InstructionsBuilder {
/**
* Adds a jump from the last added instruction.
- *
+ *
* @param target
* jump target
* @param branch
@@ -138,7 +139,7 @@ class InstructionsBuilder {
/**
* Adds a new probe for the last instruction.
- *
+ *
* @param probeId
* index in the probe array
* @param branch
@@ -152,7 +153,7 @@ class InstructionsBuilder {
/**
* Returns the status for all instructions of this method. This method must
* be called exactly once after the instructions have been added.
- *
+ *
* @return map of ASM instruction nodes to corresponding {@link Instruction}
* instances
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/LineImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/LineImpl.java
index 908bcb60..b504c510 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/LineImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/LineImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -25,7 +26,8 @@ public abstract class LineImpl implements ILine {
/** Max branch counter value for which singletons are created */
private static final int SINGLETON_BRA_LIMIT = 4;
- private static final LineImpl[][][][] SINGLETONS = new LineImpl[SINGLETON_INS_LIMIT + 1][][][];
+ private static final LineImpl[][][][] SINGLETONS = new LineImpl[SINGLETON_INS_LIMIT
+ + 1][][][];
static {
for (int i = 0; i <= SINGLETON_INS_LIMIT; i++) {
@@ -82,8 +84,8 @@ public abstract class LineImpl implements ILine {
*/
private static final class Fix extends LineImpl {
public Fix(final int im, final int ic, final int bm, final int bc) {
- super(CounterImpl.getInstance(im, ic), CounterImpl.getInstance(bm,
- bc));
+ super(CounterImpl.getInstance(im, ic),
+ CounterImpl.getInstance(bm, bc));
}
@Override
@@ -100,14 +102,15 @@ public abstract class LineImpl implements ILine {
/** branch counter */
protected CounterImpl branches;
- private LineImpl(final CounterImpl instructions, final CounterImpl branches) {
+ private LineImpl(final CounterImpl instructions,
+ final CounterImpl branches) {
this.instructions = instructions;
this.branches = branches;
}
/**
* Adds the given counters to this line.
- *
+ *
* @param instructions
* instructions to add
* @param branches
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodAnalyzer.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodAnalyzer.java
index 1aaadf2e..547d6b36 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodAnalyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodAnalyzer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -46,10 +47,9 @@ public class MethodAnalyzer extends MethodProbesVisitor {
for (final TryCatchBlockNode n : methodNode.tryCatchBlocks) {
n.accept(methodVisitor);
}
- currentNode = methodNode.instructions.getFirst();
- while (currentNode != null) {
- currentNode.accept(methodVisitor);
- currentNode = currentNode.getNext();
+ for (final AbstractInsnNode i : methodNode.instructions) {
+ currentNode = i;
+ i.accept(methodVisitor);
}
methodVisitor.visitEnd();
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java
index ebe167a2..2906dd13 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageCalculator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -19,7 +20,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-import org.jacoco.core.analysis.ISourceFileCoverage;
import org.jacoco.core.analysis.ISourceNode;
import org.jacoco.core.internal.analysis.filter.IFilterOutput;
import org.objectweb.asm.tree.AbstractInsnNode;
@@ -39,11 +39,11 @@ class MethodCoverageCalculator implements IFilterOutput {
* Instructions that should be merged form disjoint sets. Coverage
* information from instructions of one set will be merged into
* representative instruction of set.
- *
+ *
* Each such set is represented as a singly linked list: each element except
* one references another element from the same set, element without
* reference - is a representative of this set.
- *
+ *
* This map stores reference (value) for elements of sets (key).
*/
private final Map<AbstractInsnNode, AbstractInsnNode> merged;
@@ -61,7 +61,7 @@ class MethodCoverageCalculator implements IFilterOutput {
/**
* Applies all specified filtering commands and calculates the resulting
* coverage.
- *
+ *
* @param coverage
* the result is added to this coverage node
*/
@@ -121,8 +121,8 @@ class MethodCoverageCalculator implements IFilterOutput {
private void ensureCapacity(final MethodCoverageImpl coverage) {
// Determine line range:
- int firstLine = ISourceFileCoverage.UNKNOWN_LINE;
- int lastLine = ISourceFileCoverage.UNKNOWN_LINE;
+ int firstLine = ISourceNode.UNKNOWN_LINE;
+ int lastLine = ISourceNode.UNKNOWN_LINE;
for (final Entry<AbstractInsnNode, Instruction> entry : instructions
.entrySet()) {
if (!ignored.contains(entry.getKey())) {
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageImpl.java
index aa7dccf0..b6ba4f95 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/MethodCoverageImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -17,8 +18,8 @@ import org.jacoco.core.analysis.IMethodCoverage;
/**
* Implementation of {@link IMethodCoverage}.
*/
-public class MethodCoverageImpl extends SourceNodeImpl implements
- IMethodCoverage {
+public class MethodCoverageImpl extends SourceNodeImpl
+ implements IMethodCoverage {
private final String desc;
@@ -26,7 +27,7 @@ public class MethodCoverageImpl extends SourceNodeImpl implements
/**
* Creates a method coverage data object with the given parameters.
- *
+ *
* @param name
* name of the method
* @param desc
@@ -58,7 +59,8 @@ public class MethodCoverageImpl extends SourceNodeImpl implements
* branches have been incremented for this method coverage node.
*/
public void incrementMethodCounter() {
- final ICounter base = this.instructionCounter.getCoveredCount() == 0 ? CounterImpl.COUNTER_1_0
+ final ICounter base = this.instructionCounter.getCoveredCount() == 0
+ ? CounterImpl.COUNTER_1_0
: CounterImpl.COUNTER_0_1;
this.methodCounter = this.methodCounter.increment(base);
this.complexityCounter = this.complexityCounter.increment(base);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/PackageCoverageImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/PackageCoverageImpl.java
index 285ddd38..b9bad063 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/PackageCoverageImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/PackageCoverageImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -21,8 +22,8 @@ import org.jacoco.core.analysis.ISourceFileCoverage;
/**
* Implementation of {@link IPackageCoverage}.
*/
-public class PackageCoverageImpl extends CoverageNodeImpl implements
- IPackageCoverage {
+public class PackageCoverageImpl extends CoverageNodeImpl
+ implements IPackageCoverage {
private final Collection<IClassCoverage> classes;
@@ -30,7 +31,7 @@ public class PackageCoverageImpl extends CoverageNodeImpl implements
/**
* Creates package node instance for a package with the given name.
- *
+ *
* @param name
* vm name of the package
* @param classes
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceFileCoverageImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceFileCoverageImpl.java
index dc4483f5..fafce46c 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceFileCoverageImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceFileCoverageImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -16,14 +17,14 @@ import org.jacoco.core.analysis.ISourceFileCoverage;
/**
* Implementation of {@link ISourceFileCoverage}.
*/
-public class SourceFileCoverageImpl extends SourceNodeImpl implements
- ISourceFileCoverage {
+public class SourceFileCoverageImpl extends SourceNodeImpl
+ implements ISourceFileCoverage {
private final String packagename;
/**
* Creates a source file data object with the given parameters.
- *
+ *
* @param name
* name of the source file
* @param packagename
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceNodeImpl.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceNodeImpl.java
index 3fa3d692..e577c55d 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceNodeImpl.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/SourceNodeImpl.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -28,7 +29,7 @@ public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode {
/**
* Create a new source node implementation instance.
- *
+ *
* @param elementType
* element type
* @param name
@@ -44,7 +45,7 @@ public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode {
* Make sure that the internal buffer can keep lines from first to last.
* While the buffer is also incremented automatically, this method allows
* optimization in case the total range is known in advance.
- *
+ *
* @param first
* first line number or {@link ISourceNode#UNKNOWN_LINE}
* @param last
@@ -75,16 +76,16 @@ public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode {
* Increments all counters by the values of the given child. When
* incrementing the line counter it is assumed that the child refers to the
* same source file.
- *
+ *
* @param child
* child node to add
*/
public void increment(final ISourceNode child) {
- instructionCounter = instructionCounter.increment(child
- .getInstructionCounter());
+ instructionCounter = instructionCounter
+ .increment(child.getInstructionCounter());
branchCounter = branchCounter.increment(child.getBranchCounter());
- complexityCounter = complexityCounter.increment(child
- .getComplexityCounter());
+ complexityCounter = complexityCounter
+ .increment(child.getComplexityCounter());
methodCounter = methodCounter.increment(child.getMethodCounter());
classCounter = classCounter.increment(child.getClassCounter());
final int firstLine = child.getFirstLine();
@@ -103,7 +104,7 @@ public class SourceNodeImpl extends CoverageNodeImpl implements ISourceNode {
* Increments instructions and branches by the given counter values. If a
* optional line number is specified the instructions and branches are added
* to the given line. The line counter is incremented accordingly.
- *
+ *
* @param instructions
* instructions to add
* @param branches
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/StringPool.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/StringPool.java
index 97e25aaa..8b646e9e 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/StringPool.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/StringPool.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
- * Brock Janiczak - analysis and concept
+ * Brock Janiczak - analysis and concept
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.analysis;
@@ -31,7 +32,7 @@ public final class StringPool {
/**
* Returns a normalized instance that is equal to the given {@link String} .
- *
+ *
* @param s
* any string or <code>null</code>
* @return normalized instance or <code>null</code>
@@ -52,7 +53,7 @@ public final class StringPool {
* Returns a modified version of the array with all string slots normalized.
* It is up to the implementation to replace strings in the array instance
* or return a new array instance.
- *
+ *
* @param arr
* String array or <code>null</code>
* @return normalized instance or <code>null</code>
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
index 38860a83..837278e9 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AbstractMatcher.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -34,7 +35,7 @@ abstract class AbstractMatcher {
final void firstIsALoad0(final MethodNode methodNode) {
cursor = methodNode.instructions.getFirst();
skipNonOpcodes();
- if (cursor.getOpcode() == Opcodes.ALOAD
+ if (cursor != null && cursor.getOpcode() == Opcodes.ALOAD
&& ((VarInsnNode) cursor).var == 0) {
return;
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilter.java
index d78444c0..1653fa27 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/AnnotationGeneratedFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/BridgeFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/BridgeFilter.java
new file mode 100644
index 00000000..bc23941b
--- /dev/null
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/BridgeFilter.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Filters bridge methods.
+ */
+final class BridgeFilter implements IFilter {
+
+ public void filter(final MethodNode methodNode,
+ final IFilterContext context, final IFilterOutput output) {
+ if ((methodNode.access & Opcodes.ACC_BRIDGE) == 0) {
+ return;
+ }
+ output.ignore(methodNode.instructions.getFirst(),
+ methodNode.instructions.getLast());
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilter.java
index 4a39d1e8..ae23c641 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumEmptyConstructorFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumFilter.java
index 0c2eef58..faab0ad4 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/EnumFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
index 7a1053b5..484ccc00 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/Filters.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -27,24 +28,25 @@ public final class Filters implements IFilter {
/**
* Creates filter that combines all other filters.
- *
+ *
* @return filter that combines all other filters
*/
public static IFilter all() {
return new Filters(new EnumFilter(), new SyntheticFilter(),
- new SynchronizedFilter(), new TryWithResourcesJavac11Filter(),
+ new BridgeFilter(), new SynchronizedFilter(),
+ new TryWithResourcesJavac11Filter(),
new TryWithResourcesJavacFilter(),
new TryWithResourcesEcjFilter(), new FinallyFilter(),
new PrivateEmptyNoArgConstructorFilter(),
- new StringSwitchJavacFilter(), new StringSwitchEcjFilter(),
- new EnumEmptyConstructorFilter(),
+ new StringSwitchJavacFilter(), new StringSwitchFilter(),
+ new EnumEmptyConstructorFilter(), new RecordsFilter(),
new AnnotationGeneratedFilter(), new KotlinGeneratedFilter(),
new KotlinLateinitFilter(), new KotlinWhenFilter(),
new KotlinWhenStringFilter(),
new KotlinUnsafeCastOperatorFilter(),
new KotlinNotNullOperatorFilter(),
new KotlinDefaultArgumentsFilter(), new KotlinInlineFilter(),
- new KotlinCoroutineFilter());
+ new KotlinCoroutineFilter(), new KotlinDefaultMethodsFilter());
}
private Filters(final IFilter... filters) {
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/FinallyFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/FinallyFilter.java
index b2e0b145..284d4322 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/FinallyFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/FinallyFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -26,7 +27,7 @@ import org.objectweb.asm.tree.VarInsnNode;
* Filters duplicates of finally blocks that compiler generates.
*
* To understand algorithm of filtering, consider following example:
- *
+ *
* <pre>
* try {
* if (x) {
@@ -44,7 +45,7 @@ import org.objectweb.asm.tree.VarInsnNode;
* There are 4 <b>distinct</b> points of exit out of these "try/catch/finally"
* blocks - three without exception, and one with Throwable if it is thrown
* prior to reaching first three points of exit.
- *
+ *
* "finally" block must be executed just before these points, so there must be 4
* copies of its bytecode instructions.
*
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilter.java
index b662ba4f..9f0a7589 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterContext.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterContext.java
index 8b97654d..992e3e8d 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterContext.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterContext.java
@@ -1,48 +1,54 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.internal.analysis.filter;
-
-import java.util.Set;
-
-/**
- * Context information provided to filters.
- */
-public interface IFilterContext {
-
- /**
- * @return vm name of the enclosing class
- */
- String getClassName();
-
- /**
- * @return vm name of the super class of the enclosing class
- */
- String getSuperClassName();
-
- /**
- * @return vm names of the class annotations of the enclosing class
- */
- Set<String> getClassAnnotations();
-
- /**
- * @return file name of the corresponding source file or <code>null</code>
- * if not available
- */
- String getSourceFileName();
-
- /**
- * @return value of SourceDebugExtension attribute or <code>null</code> if
- * not available
- */
- String getSourceDebugExtension();
-
-}
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Marc R. Hoffmann - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import java.util.Set;
+
+/**
+ * Context information provided to filters.
+ */
+public interface IFilterContext {
+
+ /**
+ * @return vm name of the enclosing class
+ */
+ String getClassName();
+
+ /**
+ * @return vm name of the super class of the enclosing class
+ */
+ String getSuperClassName();
+
+ /**
+ * @return vm names of the class annotations of the enclosing class
+ */
+ Set<String> getClassAnnotations();
+
+ /**
+ * @return names of the class attributes
+ */
+ Set<String> getClassAttributes();
+
+ /**
+ * @return file name of the corresponding source file or <code>null</code>
+ * if not available
+ */
+ String getSourceFileName();
+
+ /**
+ * @return value of SourceDebugExtension attribute or <code>null</code> if
+ * not available
+ */
+ String getSourceDebugExtension();
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterOutput.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterOutput.java
index 0f022201..93ad2eeb 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterOutput.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/IFilterOutput.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -35,7 +36,7 @@ public interface IFilterOutput {
/**
* Marks two instructions that should be merged during computation of
* coverage.
- *
+ *
* @param i1
* first instruction
* @param i2
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilter.java
index 66d450a3..4b850f33 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinCoroutineFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -19,6 +20,7 @@ import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.LdcInsnNode;
+import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.TableSwitchInsnNode;
@@ -27,7 +29,11 @@ import org.objectweb.asm.tree.TableSwitchInsnNode;
*/
public final class KotlinCoroutineFilter implements IFilter {
- static boolean isLastArgumentContinuation(final MethodNode methodNode) {
+ static boolean isImplementationOfSuspendFunction(
+ final MethodNode methodNode) {
+ if (methodNode.name.startsWith("access$")) {
+ return false;
+ }
final Type methodType = Type.getMethodType(methodNode.desc);
final int lastArgument = methodType.getArgumentTypes().length - 1;
return lastArgument >= 0 && "kotlin.coroutines.Continuation".equals(
@@ -42,16 +48,41 @@ public final class KotlinCoroutineFilter implements IFilter {
}
new Matcher().match(methodNode, output);
-
+ new Matcher().matchOptimizedTailCall(methodNode, output);
}
private static class Matcher extends AbstractMatcher {
+
+ private void matchOptimizedTailCall(final MethodNode methodNode,
+ final IFilterOutput output) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
+ cursor = i;
+ nextIs(Opcodes.DUP);
+ nextIsInvoke(Opcodes.INVOKESTATIC,
+ "kotlin/coroutines/intrinsics/IntrinsicsKt",
+ "getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;");
+ nextIs(Opcodes.IF_ACMPNE);
+ nextIs(Opcodes.ARETURN);
+ nextIs(Opcodes.POP);
+ if (cursor != null) {
+ output.ignore(i.getNext(), cursor);
+ }
+ }
+ }
+
private void match(final MethodNode methodNode,
final IFilterOutput output) {
- cursor = methodNode.instructions.getFirst();
- nextIsInvoke(Opcodes.INVOKESTATIC,
- "kotlin/coroutines/intrinsics/IntrinsicsKt",
- "getCOROUTINE_SUSPENDED", "()Ljava/lang/Object;");
+ cursor = skipNonOpcodes(methodNode.instructions.getFirst());
+ if (cursor == null || cursor.getOpcode() != Opcodes.INVOKESTATIC) {
+ cursor = null;
+ } else {
+ final MethodInsnNode m = (MethodInsnNode) cursor;
+ if (!"kotlin/coroutines/intrinsics/IntrinsicsKt".equals(m.owner)
+ || !"getCOROUTINE_SUSPENDED".equals(m.name)
+ || !"()Ljava/lang/Object;".equals(m.desc)) {
+ cursor = null;
+ }
+ }
if (cursor == null) {
cursor = skipNonOpcodes(methodNode.instructions.getFirst());
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java
index ef198447..b734d234 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultArgumentsFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -18,15 +19,16 @@ import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.JumpInsnNode;
+import org.objectweb.asm.tree.LdcInsnNode;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.VarInsnNode;
/**
* Filters branches that Kotlin compiler generates for default arguments.
- *
+ *
* For each default argument Kotlin compiler generates following bytecode to
* determine if it should be used or not:
- *
+ *
* <pre>
* ILOAD maskVar
* ICONST_x, BIPUSH, SIPUSH, LDC or LDC_W
@@ -35,16 +37,30 @@ import org.objectweb.asm.tree.VarInsnNode;
* default argument
* label:
* </pre>
- *
+ *
* Where <code>maskVar</code> is penultimate argument of synthetic method with
- * suffix "$default". And its value can't be zero - invocation with all
- * arguments uses original non synthetic method, thus <code>IFEQ</code>
- * instructions should be ignored.
+ * suffix "$default" or of synthetic constructor with last argument
+ * "kotlin.jvm.internal.DefaultConstructorMarker". And its value can't be zero -
+ * invocation with all arguments uses original non synthetic method, thus
+ * <code>IFEQ</code> instructions should be ignored.
*/
public final class KotlinDefaultArgumentsFilter implements IFilter {
- static boolean isDefaultArgumentsMethodName(final String methodName) {
- return methodName.endsWith("$default");
+ static boolean isDefaultArgumentsMethod(final MethodNode methodNode) {
+ return methodNode.name.endsWith("$default");
+ }
+
+ static boolean isDefaultArgumentsConstructor(final MethodNode methodNode) {
+ if (!"<init>".equals(methodNode.name)) {
+ return false;
+ }
+ final Type[] argumentTypes = Type.getMethodType(methodNode.desc)
+ .getArgumentTypes();
+ if (argumentTypes.length < 2) {
+ return false;
+ }
+ return "kotlin.jvm.internal.DefaultConstructorMarker"
+ .equals(argumentTypes[argumentTypes.length - 1].getClassName());
}
public void filter(final MethodNode methodNode,
@@ -52,24 +68,45 @@ public final class KotlinDefaultArgumentsFilter implements IFilter {
if ((methodNode.access & Opcodes.ACC_SYNTHETIC) == 0) {
return;
}
- if (!isDefaultArgumentsMethodName(methodNode.name)) {
- return;
- }
if (!KotlinGeneratedFilter.isKotlinClass(context)) {
return;
}
- new Matcher().match(methodNode, output);
+ if (isDefaultArgumentsMethod(methodNode)) {
+ new Matcher().match(methodNode, output, false);
+ } else if (isDefaultArgumentsConstructor(methodNode)) {
+ new Matcher().match(methodNode, output, true);
+ }
}
private static class Matcher extends AbstractMatcher {
public void match(final MethodNode methodNode,
- final IFilterOutput output) {
- cursor = methodNode.instructions.getFirst();
+ final IFilterOutput output, final boolean constructor) {
+ cursor = skipNonOpcodes(methodNode.instructions.getFirst());
+
+ nextIs(Opcodes.IFNULL);
+ nextIsType(Opcodes.NEW, "java/lang/UnsupportedOperationException");
+ nextIs(Opcodes.DUP);
+ nextIs(Opcodes.LDC);
+ if (cursor == null
+ || !(((LdcInsnNode) cursor).cst instanceof String)
+ || !(((String) ((LdcInsnNode) cursor).cst).startsWith(
+ "Super calls with default arguments not supported in this target"))) {
+ cursor = null;
+ }
+ nextIsInvoke(Opcodes.INVOKESPECIAL,
+ "java/lang/UnsupportedOperationException", "<init>",
+ "(Ljava/lang/String;)V");
+ nextIs(Opcodes.ATHROW);
+ if (cursor != null) {
+ output.ignore(methodNode.instructions.getFirst(), cursor);
+ next();
+ } else {
+ cursor = skipNonOpcodes(methodNode.instructions.getFirst());
+ }
final Set<AbstractInsnNode> ignore = new HashSet<AbstractInsnNode>();
- final int maskVar = Type.getMethodType(methodNode.desc)
- .getArgumentTypes().length - 2;
+ final int maskVar = maskVar(methodNode.desc, constructor);
while (true) {
if (cursor.getOpcode() != Opcodes.ILOAD) {
break;
@@ -92,6 +129,22 @@ public final class KotlinDefaultArgumentsFilter implements IFilter {
output.ignore(i, i);
}
}
+
+ private static int maskVar(final String desc,
+ final boolean constructor) {
+ int slot = 0;
+ if (constructor) {
+ // one slot for reference to current object
+ slot++;
+ }
+ final Type[] argumentTypes = Type.getMethodType(desc)
+ .getArgumentTypes();
+ final int penultimateArgument = argumentTypes.length - 2;
+ for (int i = 0; i < penultimateArgument; i++) {
+ slot += argumentTypes[i].getSize();
+ }
+ return slot;
+ }
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilter.java
new file mode 100644
index 00000000..50d6280e
--- /dev/null
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinDefaultMethodsFilter.java
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.MethodInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Filters methods that Kotlin compiler generates for non-overridden
+ * non-abstract methods of interfaces.
+ */
+final class KotlinDefaultMethodsFilter implements IFilter {
+
+ public void filter(final MethodNode methodNode,
+ final IFilterContext context, final IFilterOutput output) {
+ if (!KotlinGeneratedFilter.isKotlinClass(context)) {
+ return;
+ }
+ new Matcher().match(methodNode, output);
+ }
+
+ private static class Matcher extends AbstractMatcher {
+ private void match(final MethodNode methodNode,
+ final IFilterOutput output) {
+ firstIsALoad0(methodNode);
+ nextIs(Opcodes.INVOKESTATIC);
+ if (cursor != null && ((MethodInsnNode) cursor).owner
+ .endsWith("$DefaultImpls")) {
+ output.ignore(methodNode.instructions.getFirst(),
+ methodNode.instructions.getLast());
+ }
+ }
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilter.java
index 129580a9..4ebc3707 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinGeneratedFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Nikolay Krasko - initial API and implementation
@@ -49,8 +50,7 @@ public class KotlinGeneratedFilter implements IFilter {
}
private boolean hasLineNumber(final MethodNode methodNode) {
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
if (AbstractInsnNode.LINE == i.getType()) {
return true;
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilter.java
index 5666de2d..f3e7d6b9 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinInlineFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -46,8 +47,7 @@ public final class KotlinInlineFilter implements IFilter {
}
int line = 0;
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
if (AbstractInsnNode.LINE == i.getType()) {
line = ((LineNumberNode) i).line;
}
@@ -92,7 +92,11 @@ public final class KotlinInlineFilter implements IFilter {
}
// LineSection
int min = Integer.MAX_VALUE;
- while (!"*E".equals(line = br.readLine())) {
+ while (true) {
+ line = br.readLine();
+ if (line.equals("*E") || line.equals("*S KotlinDebug")) {
+ break;
+ }
final Matcher m = LINE_INFO_PATTERN.matcher(line);
if (!m.matches()) {
throw new IllegalStateException(
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilter.java
index 12fe926c..a5e20265 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinLateinitFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Fabian Mastenbroek - initial API and implementation
@@ -13,6 +14,7 @@ package org.jacoco.core.internal.analysis.filter;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode;
+import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.MethodNode;
/**
@@ -24,9 +26,8 @@ public class KotlinLateinitFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
- matcher.match(i, output);
+ for (final AbstractInsnNode node : methodNode.instructions) {
+ matcher.match(node, output);
}
}
@@ -44,6 +45,13 @@ public class KotlinLateinitFilter implements IFilter {
"throwUninitializedPropertyAccessException",
"(Ljava/lang/String;)V");
+ if (cursor != null
+ && skipNonOpcodes(cursor.getNext()) != skipNonOpcodes(
+ ((JumpInsnNode) start).label)) {
+ nextIs(Opcodes.ACONST_NULL);
+ nextIs(Opcodes.ATHROW);
+ }
+
if (cursor != null) {
output.ignore(start, cursor);
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilter.java
index 4dd223a3..dda54210 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinNotNullOperatorFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -24,8 +25,7 @@ public final class KotlinNotNullOperatorFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
matcher.match(i, output);
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilter.java
index c298e945..82522a8a 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinUnsafeCastOperatorFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -23,27 +24,29 @@ import org.objectweb.asm.tree.MethodNode;
*/
public final class KotlinUnsafeCastOperatorFilter implements IFilter {
- private static final String KOTLIN_TYPE_CAST_EXCEPTION = "kotlin/TypeCastException";
-
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
+ if (!KotlinGeneratedFilter.isKotlinClass(context)) {
+ return;
+ }
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
- matcher.match(i, output);
+ for (final AbstractInsnNode i : methodNode.instructions) {
+ matcher.match("kotlin/TypeCastException", i, output);
+ // Since Kotlin 1.4.0:
+ matcher.match("java/lang/NullPointerException", i, output);
}
}
private static class Matcher extends AbstractMatcher {
- public void match(final AbstractInsnNode start,
- final IFilterOutput output) {
+ public void match(final String exceptionType,
+ final AbstractInsnNode start, final IFilterOutput output) {
if (Opcodes.IFNONNULL != start.getOpcode()) {
return;
}
cursor = start;
-
- nextIsType(Opcodes.NEW, KOTLIN_TYPE_CAST_EXCEPTION);
+ final JumpInsnNode jumpInsnNode = (JumpInsnNode) cursor;
+ nextIsType(Opcodes.NEW, exceptionType);
nextIs(Opcodes.DUP);
nextIs(Opcodes.LDC);
if (cursor == null) {
@@ -54,13 +57,13 @@ public final class KotlinUnsafeCastOperatorFilter implements IFilter {
.startsWith("null cannot be cast to non-null type"))) {
return;
}
- nextIsInvoke(Opcodes.INVOKESPECIAL, KOTLIN_TYPE_CAST_EXCEPTION,
- "<init>", "(Ljava/lang/String;)V");
+ nextIsInvoke(Opcodes.INVOKESPECIAL, exceptionType, "<init>",
+ "(Ljava/lang/String;)V");
nextIs(Opcodes.ATHROW);
if (cursor == null) {
return;
}
- if (cursor.getNext() != ((JumpInsnNode) start).label) {
+ if (cursor.getNext() != jumpInsnNode.label) {
return;
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java
index a229aa04..ba2fb95c 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -17,7 +18,6 @@ import java.util.Set;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode;
-import org.objectweb.asm.tree.InsnNode;
import org.objectweb.asm.tree.JumpInsnNode;
import org.objectweb.asm.tree.LabelNode;
import org.objectweb.asm.tree.LookupSwitchInsnNode;
@@ -37,15 +37,14 @@ public final class KotlinWhenFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
matcher.match(i, output);
}
}
private static class Matcher extends AbstractMatcher {
void match(final AbstractInsnNode start, final IFilterOutput output) {
- if (start.getType() != InsnNode.LABEL) {
+ if (start.getType() != AbstractInsnNode.LABEL) {
return;
}
cursor = start;
@@ -92,7 +91,7 @@ public final class KotlinWhenFilter implements IFilter {
labels = ((TableSwitchInsnNode) switchNode).labels;
}
final Set<AbstractInsnNode> newTargets = new HashSet<AbstractInsnNode>();
- for (LabelNode label : labels) {
+ for (final LabelNode label : labels) {
newTargets.add(AbstractMatcher.skipNonOpcodes(label));
}
output.replaceBranches(switchNode, newTargets);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilter.java
index fcccb550..5fd20874 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/KotlinWhenStringFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -32,8 +33,7 @@ public final class KotlinWhenStringFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
matcher.match(i, output);
}
}
@@ -67,10 +67,14 @@ public final class KotlinWhenStringFilter implements IFilter {
hashCodes = tableSwitch.labels.size();
}
+ if (hashCodes == 0) {
+ return;
+ }
+
final Set<AbstractInsnNode> replacements = new HashSet<AbstractInsnNode>();
replacements.add(skipNonOpcodes(defaultLabel));
- for (int i = 0; i < hashCodes; i++) {
+ for (int i = 1; i <= hashCodes; i++) {
while (true) {
nextIsVar(Opcodes.ALOAD, "s");
nextIs(Opcodes.LDC);
@@ -79,18 +83,24 @@ public final class KotlinWhenStringFilter implements IFilter {
// jump to next comparison or default case
nextIs(Opcodes.IFEQ);
final JumpInsnNode jump = (JumpInsnNode) cursor;
- // jump to case
- nextIs(Opcodes.GOTO);
+ next();
if (cursor == null) {
return;
- }
-
- replacements
- .add(skipNonOpcodes(((JumpInsnNode) cursor).label));
-
- if (jump.label == defaultLabel) {
- // end of comparisons for same hashCode
+ } else if (cursor.getOpcode() == Opcodes.GOTO) {
+ // jump to case body
+ replacements.add(
+ skipNonOpcodes(((JumpInsnNode) cursor).label));
+ if (jump.label == defaultLabel) {
+ // end of comparisons for same hashCode
+ break;
+ }
+ } else if (i == hashCodes && jump.label == defaultLabel) {
+ // case body
+ replacements.add(cursor);
+ cursor = jump;
break;
+ } else {
+ return;
}
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilter.java
index 236ef712..4b22dc29 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/PrivateEmptyNoArgConstructorFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java
new file mode 100644
index 00000000..745848ba
--- /dev/null
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/RecordsFilter.java
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Evgeny Mandrikov - initial API and implementation
+ *
+ *******************************************************************************/
+package org.jacoco.core.internal.analysis.filter;
+
+import org.objectweb.asm.Handle;
+import org.objectweb.asm.Opcodes;
+import org.objectweb.asm.tree.InvokeDynamicInsnNode;
+import org.objectweb.asm.tree.MethodNode;
+
+/**
+ * Filters methods <code>toString</code>, <code>hashCode</code> and
+ * <code>equals</code> that compiler generates for records.
+ */
+public final class RecordsFilter implements IFilter {
+
+ public void filter(final MethodNode methodNode,
+ final IFilterContext context, final IFilterOutput output) {
+ if (!"java/lang/Record".equals(context.getSuperClassName())) {
+ return;
+ }
+ final Matcher matcher = new Matcher();
+ if (matcher.isEquals(methodNode) || matcher.isHashCode(methodNode)
+ || matcher.isToString(methodNode)) {
+ output.ignore(methodNode.instructions.getFirst(),
+ methodNode.instructions.getLast());
+ }
+ }
+
+ private static class Matcher extends AbstractMatcher {
+ boolean isToString(final MethodNode m) {
+ if (!"toString".equals(m.name)
+ || !"()Ljava/lang/String;".equals(m.desc)) {
+ return false;
+ }
+ firstIsALoad0(m);
+ nextIsInvokeDynamic("toString");
+ nextIs(Opcodes.ARETURN);
+ return cursor != null;
+ }
+
+ boolean isHashCode(final MethodNode m) {
+ if (!"hashCode".equals(m.name) || !"()I".equals(m.desc)) {
+ return false;
+ }
+ firstIsALoad0(m);
+ nextIsInvokeDynamic("hashCode");
+ nextIs(Opcodes.IRETURN);
+ return cursor != null;
+ }
+
+ boolean isEquals(final MethodNode m) {
+ if (!"equals".equals(m.name)
+ || !"(Ljava/lang/Object;)Z".equals(m.desc)) {
+ return false;
+ }
+ firstIsALoad0(m);
+ nextIs(Opcodes.ALOAD);
+ nextIsInvokeDynamic("equals");
+ nextIs(Opcodes.IRETURN);
+ return cursor != null;
+ }
+
+ private void nextIsInvokeDynamic(final String name) {
+ nextIs(Opcodes.INVOKEDYNAMIC);
+ if (cursor == null) {
+ return;
+ }
+ final InvokeDynamicInsnNode i = (InvokeDynamicInsnNode) cursor;
+ final Handle bsm = i.bsm;
+ if (name.equals(i.name)
+ && "java/lang/runtime/ObjectMethods".equals(bsm.getOwner())
+ && "bootstrap".equals(bsm.getName())) {
+ return;
+ }
+ cursor = null;
+ }
+ }
+
+}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilter.java
index e0aba35d..a78e253e 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchEcjFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -25,15 +26,15 @@ import org.objectweb.asm.tree.VarInsnNode;
/**
* Filters code that is generated by ECJ for a <code>switch</code> statement
- * with a <code>String</code>.
+ * with a <code>String</code> and by Kotlin compiler 1.5 and above for a
+ * <code>when</code> expression with a <code>String</code>.
*/
-public final class StringSwitchEcjFilter implements IFilter {
+public final class StringSwitchFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
final Matcher matcher = new Matcher();
- for (AbstractInsnNode i = methodNode.instructions
- .getFirst(); i != null; i = i.getNext()) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
matcher.match(i, output);
}
}
@@ -42,7 +43,8 @@ public final class StringSwitchEcjFilter implements IFilter {
public void match(final AbstractInsnNode start,
final IFilterOutput output) {
- if (Opcodes.ASTORE != start.getOpcode()) {
+ if (start.getOpcode() != /* ECJ */ Opcodes.ASTORE
+ && start.getOpcode() != /* Kotlin */ Opcodes.ALOAD) {
return;
}
cursor = start;
@@ -67,6 +69,10 @@ public final class StringSwitchEcjFilter implements IFilter {
hashCodes = tableSwitch.labels.size();
}
+ if (hashCodes == 0) {
+ return;
+ }
+
final Set<AbstractInsnNode> replacements = new HashSet<AbstractInsnNode>();
replacements.add(skipNonOpcodes(defaultLabel));
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilter.java
index 3033d9bc..a5baf34c 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/StringSwitchJavacFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -26,10 +27,8 @@ public final class StringSwitchJavacFilter implements IFilter {
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
- AbstractInsnNode i = methodNode.instructions.getFirst();
- while (i != null) {
+ for (final AbstractInsnNode i : methodNode.instructions) {
filter(i, output);
- i = i.getNext();
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilter.java
index 6341328f..abc9e45b 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SynchronizedFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java
index 69c4092a..127f7b03 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/SyntheticFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -19,6 +20,11 @@ import org.objectweb.asm.tree.MethodNode;
*/
public final class SyntheticFilter implements IFilter {
+ private static boolean isScalaClass(final IFilterContext context) {
+ return context.getClassAttributes().contains("ScalaSig")
+ || context.getClassAttributes().contains("Scala");
+ }
+
public void filter(final MethodNode methodNode,
final IFilterContext context, final IFilterOutput output) {
if ((methodNode.access & Opcodes.ACC_SYNTHETIC) == 0) {
@@ -29,13 +35,25 @@ public final class SyntheticFilter implements IFilter {
return;
}
+ if (isScalaClass(context)) {
+ if (methodNode.name.startsWith("$anonfun$")) {
+ return;
+ }
+ }
+
if (KotlinGeneratedFilter.isKotlinClass(context)) {
if (KotlinDefaultArgumentsFilter
- .isDefaultArgumentsMethodName(methodNode.name)) {
+ .isDefaultArgumentsMethod(methodNode)) {
+ return;
+ }
+
+ if (KotlinDefaultArgumentsFilter
+ .isDefaultArgumentsConstructor(methodNode)) {
return;
}
- if (KotlinCoroutineFilter.isLastArgumentContinuation(methodNode)) {
+ if (KotlinCoroutineFilter
+ .isImplementationOfSuspendFunction(methodNode)) {
return;
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilter.java
index 94dea561..714ab223 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesEcjFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11Filter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11Filter.java
index 7a20f74f..0b451750 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11Filter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavac11Filter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -55,7 +56,7 @@ public final class TryWithResourcesJavac11Filter implements IFilter {
* throw primaryExc;
* }
* </pre>
- *
+ *
* <code>null</code> check for resource is omitted when it is initialized
* using <code>new</code>
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilter.java b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilter.java
index 23ecb0e6..c3a0fa32 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/analysis/filter/TryWithResourcesJavacFilter.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -47,7 +48,7 @@ public final class TryWithResourcesJavacFilter implements IFilter {
* compilation of source code that is described in <a href=
* "http://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.3.1">JLS
* 14.20.3. try-with-resources</a>:
- *
+ *
* <pre>
* Resource r = ...;
* Throwable primaryExc = null;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/data/CRC64.java b/org.jacoco.core/src/org/jacoco/core/internal/data/CRC64.java
index 620a46f0..b0e8a098 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/data/CRC64.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/data/CRC64.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.data;
@@ -16,7 +17,7 @@ import org.objectweb.asm.Opcodes;
/**
* CRC64 checksum calculator based on the polynom specified in ISO 3309. The
* implementation is based on the following publications:
- *
+ *
* <ul>
* <li>http://en.wikipedia.org/wiki/Cyclic_redundancy_check</li>
* <li>http://www.geocities.com/SiliconValley/Pines/8659/crc.htm</li>
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java
index 945b2b64..2f4e2eee 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataInput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.data;
@@ -17,7 +18,7 @@ import java.io.InputStream;
/**
* Additional data input methods for compact storage of data structures.
- *
+ *
* @see CompactDataOutput
*/
public class CompactDataInput extends DataInputStream {
@@ -25,7 +26,7 @@ public class CompactDataInput extends DataInputStream {
/**
* Creates a new {@link CompactDataInput} that uses the specified underlying
* input stream.
- *
+ *
* @param in
* underlying input stream
*/
@@ -35,7 +36,7 @@ public class CompactDataInput extends DataInputStream {
/**
* Reads a variable length representation of an integer value.
- *
+ *
* @return read value
* @throws IOException
* if thrown by the underlying stream
@@ -50,7 +51,7 @@ public class CompactDataInput extends DataInputStream {
/**
* Reads a boolean array.
- *
+ *
* @return boolean array
* @throws IOException
* if thrown by the underlying stream
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java
index 4d230f8e..ba52555e 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/data/CompactDataOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.data;
@@ -17,7 +18,7 @@ import java.io.OutputStream;
/**
* Additional data output methods for compact storage of data structures.
- *
+ *
* @see CompactDataInput
*/
public class CompactDataOutput extends DataOutputStream {
@@ -25,7 +26,7 @@ public class CompactDataOutput extends DataOutputStream {
/**
* Creates a new {@link CompactDataOutput} instance that writes data to the
* specified underlying output stream
- *
+ *
* @param out
* underlying output stream
*/
@@ -37,7 +38,7 @@ public class CompactDataOutput extends DataOutputStream {
* Writes a variable length representation of an integer value that reduces
* the number of written bytes for small positive values. Depending on the
* given value 1 to 5 bytes will be written to the underlying stream.
- *
+ *
* @param value
* value to write
* @throws IOException
@@ -55,7 +56,7 @@ public class CompactDataOutput extends DataOutputStream {
/**
* Writes a boolean array. Internally a sequence of boolean values is packed
* into single bits.
- *
+ *
* @param value
* boolean array
* @throws IOException
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesAdapter.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesAdapter.java
index 876a1351..3ed19a88 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesAdapter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesAdapter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -20,8 +21,8 @@ import org.objectweb.asm.commons.AnalyzerAdapter;
* A {@link org.objectweb.asm.ClassVisitor} that calculates probes for every
* method.
*/
-public class ClassProbesAdapter extends ClassVisitor implements
- IProbeIdGenerator {
+public class ClassProbesAdapter extends ClassVisitor
+ implements IProbeIdGenerator {
private static final MethodProbesVisitor EMPTY_METHOD_PROBES_VISITOR = new MethodProbesVisitor() {
};
@@ -36,7 +37,7 @@ public class ClassProbesAdapter extends ClassVisitor implements
/**
* Creates a new adapter that delegates to the given visitor.
- *
+ *
* @param cv
* instance to delegate to
* @param trackFrames
@@ -59,7 +60,8 @@ public class ClassProbesAdapter extends ClassVisitor implements
@Override
public final MethodVisitor visitMethod(final int access, final String name,
- final String desc, final String signature, final String[] exceptions) {
+ final String desc, final String signature,
+ final String[] exceptions) {
final MethodProbesVisitor methodProbes;
final MethodProbesVisitor mv = cv.visitMethod(access, name, desc,
signature, exceptions);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesVisitor.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesVisitor.java
index 54817e80..f8325efc 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/ClassProbesVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -29,7 +30,7 @@ public abstract class ClassProbesVisitor extends ClassVisitor {
/**
* New visitor instance that delegates to the given visitor.
- *
+ *
* @param cv
* optional next visitor in chain
*/
@@ -50,7 +51,7 @@ public abstract class ClassProbesVisitor extends ClassVisitor {
* is called just before {@link ClassVisitor#visitEnd()}. For interfaces
* this method is called before the first method (the static initializer) is
* emitted.
- *
+ *
* @param count
* total number of probes
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/FrameSnapshot.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/FrameSnapshot.java
index a0c7449f..b8c819da 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/FrameSnapshot.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/FrameSnapshot.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -36,7 +37,7 @@ class FrameSnapshot implements IFrame {
/**
* Create a IFrame instance based on the given analyzer.
- *
+ *
* @param analyzer
* analyzer instance or <code>null</code>
* @param popCount
@@ -58,7 +59,8 @@ class FrameSnapshot implements IFrame {
* {@link MethodVisitor#visitFrame(int, int, Object[], int, Object[])}
* method.
*/
- private static Object[] reduce(final List<Object> source, final int popCount) {
+ private static Object[] reduce(final List<Object> source,
+ final int popCount) {
final List<Object> copy = new ArrayList<Object>(source);
final int size = source.size() - popCount;
copy.subList(size, source.size()).clear();
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java
index 6079f443..5c10ae76 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/IFrame.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -20,7 +21,7 @@ public interface IFrame {
/**
* Emits a frame event with the current content to the given visitor.
- *
+ *
* @param mv
* method visitor to emit frame event to
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java
index 6f3f1977..692fea03 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/IProbeIdGenerator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -18,7 +19,7 @@ public interface IProbeIdGenerator {
/**
* Returns the next unique probe id.
- *
+ *
* @return unique probe id
*/
int nextId();
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
index 0f0e4d33..f44d66da 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -27,7 +28,7 @@ public final class LabelFlowAnalyzer extends MethodVisitor {
/**
* Marks all labels of the method with control flow information.
- *
+ *
* @param method
* Method to mark labels
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
index 85dc1d81..122d62b5 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/LabelInfo.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -48,7 +49,7 @@ public final class LabelInfo {
/**
* Defines that the given label is a jump target.
- *
+ *
* @param label
* label to define
*/
@@ -64,7 +65,7 @@ public final class LabelInfo {
/**
* Defines that the given label is the possible successor of the previous
* instruction in the method.
- *
+ *
* @param label
* label to define
*/
@@ -81,7 +82,7 @@ public final class LabelInfo {
* to a certain label are: jump targets, exception handlers and normal
* control flow from its predecessor instruction (unless this is an
* unconditional jump or method exit).
- *
+ *
* @param label
* label to check
* @return <code>true</code> if the given multiple control paths lead to the
@@ -96,7 +97,7 @@ public final class LabelInfo {
* Checks whether this label is the possible successor of the previous
* instruction in the method. This is the case if the predecessor isn't a
* unconditional jump or method exit instruction.
- *
+ *
* @param label
* label to check
* @return <code>true</code> if the label is a possible instruction
@@ -109,7 +110,7 @@ public final class LabelInfo {
/**
* Mark a given label as the beginning of a line with method invocations.
- *
+ *
* @param label
* label to mark
*/
@@ -120,7 +121,7 @@ public final class LabelInfo {
/**
* Checks whether the a given label has been marked as a line with method
* invocations.
- *
+ *
* @param label
* label to check
* @return <code>true</code> if the label represents a line with method
@@ -133,7 +134,7 @@ public final class LabelInfo {
/**
* Determines whether the given label needs a probe to be inserted before.
- *
+ *
* @param label
* label to test
* @return <code>true</code> if a probe should be inserted before
@@ -146,7 +147,7 @@ public final class LabelInfo {
/**
* Mark a given label as done.
- *
+ *
* @param label
* label to mark
*/
@@ -156,7 +157,7 @@ public final class LabelInfo {
/**
* Resets the "done" status of a given label.
- *
+ *
* @param label
* label to reset
*/
@@ -169,7 +170,7 @@ public final class LabelInfo {
/**
* Resets the "done" status of all given labels.
- *
+ *
* @param labels
* labels to reset
*/
@@ -181,7 +182,7 @@ public final class LabelInfo {
/**
* Checks whether this label is marked as done.
- *
+ *
* @param label
* label to check
* @return <code>true</code> if this label is marked as done
@@ -193,7 +194,7 @@ public final class LabelInfo {
/**
* Sets the given probe id to the given label.
- *
+ *
* @param label
* label to assign a probe to
* @param id
@@ -205,7 +206,7 @@ public final class LabelInfo {
/**
* Returns the assigned probe id.
- *
+ *
* @param label
* label to check
* @return probe id or {@link #NO_PROBE} if no probe is assigned to the
@@ -219,7 +220,7 @@ public final class LabelInfo {
/**
* Defines an intermediate label for the given label. Such intermediate
* labels are required during instrumentation to add probes to jump targets.
- *
+ *
* @param label
* label to define for
* @param intermediate
@@ -233,7 +234,7 @@ public final class LabelInfo {
/**
* Returns the intermediate label for the given label if one has been
* defined.
- *
+ *
* @param label
* label to look for
* @return intermediate label or <code>null</code>
@@ -245,7 +246,7 @@ public final class LabelInfo {
/**
* Sets the instruction corresponding to this label.
- *
+ *
* @param label
* label to set the instruction for
* @param instruction
@@ -259,7 +260,7 @@ public final class LabelInfo {
/**
* Returns the corresponding instruction for the given label if one has been
* defined.
- *
+ *
* @param label
* label to look for
* @return corresponding instruction or <code>null</code>
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesAdapter.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesAdapter.java
index 40e20a3e..30253d02 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesAdapter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesAdapter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -36,7 +37,7 @@ public final class MethodProbesAdapter extends MethodVisitor {
/**
* Create a new adapter instance.
- *
+ *
* @param probesVisitor
* visitor to delegate to
* @param idGenerator
@@ -53,7 +54,7 @@ public final class MethodProbesAdapter extends MethodVisitor {
/**
* If an analyzer is set {@link IFrame} handles are calculated and emitted
* to the probes methods.
- *
+ *
* @param analyzer
* optional analyzer to set
*/
@@ -64,8 +65,8 @@ public final class MethodProbesAdapter extends MethodVisitor {
@Override
public void visitTryCatchBlock(final Label start, final Label end,
final Label handler, final String type) {
- probesVisitor.visitTryCatchBlock(getTryCatchLabel(start), getTryCatchLabel(end),
- handler, type);
+ probesVisitor.visitTryCatchBlock(getTryCatchLabel(start),
+ getTryCatchLabel(end), handler, type);
}
private Label getTryCatchLabel(Label label) {
@@ -154,8 +155,8 @@ public final class MethodProbesAdapter extends MethodVisitor {
public void visitTableSwitchInsn(final int min, final int max,
final Label dflt, final Label... labels) {
if (markLabels(dflt, labels)) {
- probesVisitor.visitTableSwitchInsnWithProbes(min, max, dflt,
- labels, frame(1));
+ probesVisitor.visitTableSwitchInsnWithProbes(min, max, dflt, labels,
+ frame(1));
} else {
probesVisitor.visitTableSwitchInsn(min, max, dflt, labels);
}
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesVisitor.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesVisitor.java
index 75e63555..b9073c4b 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodProbesVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -31,7 +32,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
/**
* New visitor instance that delegates to the given visitor.
- *
+ *
* @param mv
* optional next visitor in chain
*/
@@ -42,7 +43,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
/**
* Visits an unconditional probe that should be inserted at the current
* position.
- *
+ *
* @param probeId
* id of the probe to insert
*/
@@ -54,7 +55,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
* Visits a jump instruction. A probe with the given id should be inserted
* in a way that it is executed only when the jump to the given label is
* executed.
- *
+ *
* @param opcode
* the opcode of the type instruction to be visited. This opcode
* is either IFEQ, IFNE, IFLT, IFGE, IFGT, IFLE, IF_ICMPEQ,
@@ -81,7 +82,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
* Visits a zero operand instruction with a probe. This event is used only
* for instructions that terminate the method. Therefore the probe must be
* inserted before the actual instruction.
- *
+ *
* @param opcode
* the opcode of the instruction to be visited. This opcode is
* either IRETURN, LRETURN, FRETURN, DRETURN, ARETURN, RETURN or
@@ -100,7 +101,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
* target labels will always have the same probe id within a call to this
* method. The probe id for each label can be obtained with
* {@link LabelInfo#getProbeId(Label)}.
- *
+ *
* @param min
* the minimum key value.
* @param max
@@ -128,7 +129,7 @@ public abstract class MethodProbesVisitor extends MethodVisitor {
* target labels will always have the same probe id within a call to this
* method. The probe id for each label can be obtained with
* {@link LabelInfo#getProbeId(Label)}.
- *
+ *
* @param dflt
* beginning of the default handler block.
* @param keys
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodSanitizer.java b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodSanitizer.java
index 92b08947..34c38004 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodSanitizer.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/flow/MethodSanitizer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.flow;
@@ -18,7 +19,7 @@ import org.objectweb.asm.commons.JSRInlinerAdapter;
/**
* This method visitor fixes two potential issues with Java byte code:
- *
+ *
* <ul>
* <li>Remove JSR/RET instructions by inlining subroutines which are deprecated
* since Java 6. The RET statement complicates control flow analysis as the jump
@@ -30,8 +31,8 @@ import org.objectweb.asm.commons.JSRInlinerAdapter;
*/
class MethodSanitizer extends JSRInlinerAdapter {
- MethodSanitizer(final MethodVisitor mv, final int access,
- final String name, final String desc, final String signature,
+ MethodSanitizer(final MethodVisitor mv, final int access, final String name,
+ final String desc, final String signature,
final String[] exceptions) {
super(InstrSupport.ASM_API_VERSION, mv, access, name, desc, signature,
exceptions);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassFieldProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassFieldProbeArrayStrategy.java
index 950be683..7a54b6d8 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassFieldProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassFieldProbeArrayStrategy.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -27,7 +28,8 @@ class ClassFieldProbeArrayStrategy implements IProbeArrayStrategy {
/**
* Frame stack with a single boolean array.
*/
- private static final Object[] FRAME_STACK_ARRZ = new Object[] { InstrSupport.DATAFIELD_DESC };
+ private static final Object[] FRAME_STACK_ARRZ = new Object[] {
+ InstrSupport.DATAFIELD_DESC };
/**
* Empty frame locals.
@@ -107,9 +109,9 @@ class ClassFieldProbeArrayStrategy implements IProbeArrayStrategy {
/**
* Generates the byte code to initialize the static coverage data field
* within this class.
- *
+ *
* The code will push the [Z data array on the operand stack.
- *
+ *
* @param mv
* generator to emit code to
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassInstrumenter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassInstrumenter.java
index 7d5e9759..476c9e34 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassInstrumenter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ClassInstrumenter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -28,7 +29,7 @@ public class ClassInstrumenter extends ClassProbesVisitor {
/**
* Emits a instrumented version of this class to the given class visitor.
- *
+ *
* @param probeArrayStrategy
* this strategy will be used to access the probe array
* @param cv
@@ -58,7 +59,8 @@ public class ClassInstrumenter extends ClassProbesVisitor {
@Override
public MethodProbesVisitor visitMethod(final int access, final String name,
- final String desc, final String signature, final String[] exceptions) {
+ final String desc, final String signature,
+ final String[] exceptions) {
InstrSupport.assertNotInstrumented(name, className);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategy.java
index ca2fb60d..31cc97a9 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/CondyProbeArrayStrategy.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,9 +12,9 @@
*******************************************************************************/
package org.jacoco.core.internal.instr;
+import org.jacoco.core.runtime.IExecutionDataAccessorGenerator;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ConstantDynamic;
-import org.jacoco.core.runtime.IExecutionDataAccessorGenerator;
import org.objectweb.asm.Handle;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/DuplicateFrameEliminator.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/DuplicateFrameEliminator.java
index bc3e54bf..dfc88b44 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/DuplicateFrameEliminator.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/DuplicateFrameEliminator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeArrayStrategy.java
index 5fe0cdca..9b24f9a6 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeArrayStrategy.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -23,7 +24,7 @@ public interface IProbeArrayStrategy {
/**
* Creates code that stores the probe array instance in the given variable.
- *
+ *
* @param mv
* visitor to create code
* @param clinit
@@ -37,7 +38,7 @@ public interface IProbeArrayStrategy {
/**
* Adds additional class members required by this strategy. This method is
* called after all original members of the class has been processed.
- *
+ *
* @param cv
* visitor to create fields and methods
* @param probeCount
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java
index 2f8dab61..9b22ede4 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/IProbeInserter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -19,7 +20,7 @@ interface IProbeInserter {
/**
* Inserts the probe with the given id.
- *
+ *
* @param id
* id of the probe to insert
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
index 4d4e1ba1..c125112d 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/InstrSupport.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -26,7 +27,7 @@ public final class InstrSupport {
}
/** ASM API version */
- public static final int ASM_API_VERSION = Opcodes.ASM7;
+ public static final int ASM_API_VERSION = Opcodes.ASM9;
// === Data Field ===
@@ -212,7 +213,7 @@ public final class InstrSupport {
/**
* Determines whether the given class file version requires stackmap frames.
- *
+ *
* @param version
* class file version
* @return <code>true</code> if frames are required
@@ -226,7 +227,7 @@ public final class InstrSupport {
* Ensures that the given member does not correspond to a internal member
* created by the instrumentation process. This would mean that the class is
* already instrumented.
- *
+ *
* @param member
* name of the member to check
* @param owner
@@ -248,7 +249,7 @@ public final class InstrSupport {
* Generates the instruction to push the given int value on the stack.
* Implementation taken from
* {@link org.objectweb.asm.commons.GeneratorAdapter#push(int)}.
- *
+ *
* @param mv
* visitor to emit the instruction
* @param value
@@ -276,9 +277,9 @@ public final class InstrSupport {
*/
public static ClassReader classReaderFor(final byte[] b) {
final int originalVersion = getMajorVersion(b);
- if (originalVersion == Opcodes.V12 + 1) {
+ if (originalVersion == Opcodes.V16 + 1) {
// temporarily downgrade version to bypass check in ASM
- setMajorVersion(Opcodes.V12, b);
+ setMajorVersion(Opcodes.V16, b);
}
final ClassReader classReader = new ClassReader(b);
setMajorVersion(originalVersion, b);
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/InterfaceFieldProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/InterfaceFieldProbeArrayStrategy.java
index bf855fea..decd234c 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/InterfaceFieldProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/InterfaceFieldProbeArrayStrategy.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -27,7 +28,8 @@ class InterfaceFieldProbeArrayStrategy implements IProbeArrayStrategy {
/**
* Frame stack with a single boolean array.
*/
- private static final Object[] FRAME_STACK_ARRZ = new Object[] { InstrSupport.DATAFIELD_DESC };
+ private static final Object[] FRAME_STACK_ARRZ = new Object[] {
+ InstrSupport.DATAFIELD_DESC };
/**
* Empty frame locals.
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/LocalProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/LocalProbeArrayStrategy.java
index 67068ed7..9e30703e 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/LocalProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/LocalProbeArrayStrategy.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/MethodInstrumenter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/MethodInstrumenter.java
index 396368b5..7fcab58e 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/MethodInstrumenter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/MethodInstrumenter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -28,7 +29,7 @@ class MethodInstrumenter extends MethodProbesVisitor {
/**
* Create a new instrumenter instance for the given method.
- *
+ *
* @param mv
* next method visitor in the chain
* @param probeInserter
@@ -159,7 +160,8 @@ class MethodInstrumenter extends MethodProbesVisitor {
return intermediate;
}
- private void insertIntermediateProbe(final Label label, final IFrame frame) {
+ private void insertIntermediateProbe(final Label label,
+ final IFrame frame) {
final int probeId = LabelInfo.getProbeId(label);
if (probeId != LabelInfo.NO_PROBE && !LabelInfo.isDone(label)) {
mv.visitLabel(LabelInfo.getIntermediateLabel(label));
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java
index b3a4186f..427678bf 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/NoneProbeArrayStrategy.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
index bc957b91..b2223768 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeArrayStrategyFactory.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
index de223265..c41a9b35 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeCounter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -30,7 +31,8 @@ class ProbeCounter extends ClassProbesVisitor {
@Override
public MethodProbesVisitor visitMethod(final int access, final String name,
- final String desc, final String signature, final String[] exceptions) {
+ final String desc, final String signature,
+ final String[] exceptions) {
if (!InstrSupport.CLINIT_NAME.equals(name)
&& (access & Opcodes.ACC_ABSTRACT) == 0) {
methods = true;
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
index 0cac8f8f..20794f60 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/ProbeInserter.java
@@ -1,20 +1,23 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
+import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
+import org.objectweb.asm.TypePath;
/**
* Internal utility to add probes into the control flow of a method. The code
@@ -40,7 +43,7 @@ class ProbeInserter extends MethodVisitor implements IProbeInserter {
/**
* Creates a new {@link ProbeInserter}.
- *
+ *
* @param access
* access flags of the adapted method
* @param name
@@ -53,8 +56,8 @@ class ProbeInserter extends MethodVisitor implements IProbeInserter {
* callback to create the code that retrieves the reference to
* the probe array
*/
- ProbeInserter(final int access, final String name, final String desc, final MethodVisitor mv,
- final IProbeArrayStrategy arrayStrategy) {
+ ProbeInserter(final int access, final String name, final String desc,
+ final MethodVisitor mv, final IProbeArrayStrategy arrayStrategy) {
super(InstrSupport.ASM_API_VERSION, mv);
this.clinit = InstrSupport.CLINIT_NAME.equals(name);
this.arrayStrategy = arrayStrategy;
@@ -107,6 +110,18 @@ class ProbeInserter extends MethodVisitor implements IProbeInserter {
}
@Override
+ public AnnotationVisitor visitLocalVariableAnnotation(final int typeRef,
+ final TypePath typePath, final Label[] start, final Label[] end,
+ final int[] index, final String descriptor, final boolean visible) {
+ final int[] newIndex = new int[index.length];
+ for (int i = 0; i < newIndex.length; i++) {
+ newIndex[i] = map(index[i]);
+ }
+ return mv.visitLocalVariableAnnotation(typeRef, typePath, start, end,
+ newIndex, descriptor, visible);
+ }
+
+ @Override
public void visitMaxs(final int maxStack, final int maxLocals) {
// Max stack size of the probe code is 3 which can add to the
// original stack size depending on the probe locations. The accessor
diff --git a/org.jacoco.core/src/org/jacoco/core/internal/instr/SignatureRemover.java b/org.jacoco.core/src/org/jacoco/core/internal/instr/SignatureRemover.java
index 06994c0d..310dcc88 100644
--- a/org.jacoco.core/src/org/jacoco/core/internal/instr/SignatureRemover.java
+++ b/org.jacoco.core/src/org/jacoco/core/internal/instr/SignatureRemover.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.internal.instr;
@@ -47,7 +48,7 @@ public class SignatureRemover {
/**
* Defines whether this remover should be active. If it is not active it
* will not remove any entries.
- *
+ *
* @param active
* <code>true</code> if it should remove signature related
* entries.
@@ -58,7 +59,7 @@ public class SignatureRemover {
/**
* Checks whether a entry with the provided name should be ignored at all.
- *
+ *
* @param name
* path name of the entry in question
* @return true is the entry should be ignored
@@ -69,7 +70,7 @@ public class SignatureRemover {
/**
* Filters the content of the entry with the provided name if necessary.
- *
+ *
* @param name
* path name of the entry in question
* @param in
@@ -102,7 +103,8 @@ public class SignatureRemover {
}
private void filterManifestEntryAttributes(final Attributes attrs) {
- for (final Iterator<Object> i = attrs.keySet().iterator(); i.hasNext();) {
+ for (final Iterator<Object> i = attrs.keySet().iterator(); i
+ .hasNext();) {
if (String.valueOf(i.next()).endsWith(DIGEST_SUFFIX)) {
i.remove();
}
diff --git a/org.jacoco.core/src/org/jacoco/core/jacoco.properties b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
index e2f9aca6..443b3943 100644
--- a/org.jacoco.core/src/org/jacoco/core/jacoco.properties
+++ b/org.jacoco.core/src/org/jacoco/core/jacoco.properties
@@ -1,6 +1,5 @@
#This file is supposed to be processed by Maven, but Android doesn't run Maven
#So in Android we've filled in the resulting values below
-VERSION=0.7.10.201704181138.android
+VERSION=0.8.7.android
HOMEURL=http://www.jacoco.org/jacoco
RUNTIMEPACKAGE=org.jacoco.agent.rt.internal
-
diff --git a/org.jacoco.core/src/org/jacoco/core/package-info.java b/org.jacoco.core/src/org/jacoco/core/package-info.java
index 84ebdf87..7b84d8d1 100644
--- a/org.jacoco.core/src/org/jacoco/core/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/AbstractRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/AbstractRuntime.java
index 388e3e4f..7d417b2d 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/AbstractRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/AbstractRuntime.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -32,7 +33,7 @@ public abstract class AbstractRuntime implements IRuntime {
/**
* Creates a random session identifier.
- *
+ *
* @return random session identifier
*/
public static String createRandomId() {
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java
index 60f03c0a..2bf1b394 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/AgentOptions.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -26,7 +27,7 @@ import java.util.regex.Pattern;
/**
* Utility to create and parse options for the runtime agent. Options are
* represented as a string in the following format:
- *
+ *
* <pre>
* key1=value1,key2=value2,key3=value3
* </pre>
@@ -53,7 +54,7 @@ public final class AgentOptions {
/**
* Wildcard expression for class names that should be included for code
* coverage. Default is <code>*</code> (all classes included).
- *
+ *
* @see WildcardMatcher
*/
public static final String INCLUDES = "includes";
@@ -61,7 +62,7 @@ public final class AgentOptions {
/**
* Wildcard expression for class names that should be excluded from code
* coverage. Default is the empty string (no exclusions).
- *
+ *
* @see WildcardMatcher
*/
public static final String EXCLUDES = "excludes";
@@ -72,7 +73,7 @@ public final class AgentOptions {
* loader which full qualified name matches this expression will be ignored
* for code coverage regardless of all other filtering settings. Default is
* <code>sun.reflect.DelegatingClassLoader</code>.
- *
+ *
* @see WildcardMatcher
*/
public static final String EXCLCLASSLOADER = "exclclassloader";
@@ -106,7 +107,7 @@ public final class AgentOptions {
/**
* Specifies the output mode. Default is {@link OutputMode#file}.
- *
+ *
* @see OutputMode#file
* @see OutputMode#tcpserver
* @see OutputMode#tcpclient
@@ -204,7 +205,7 @@ public final class AgentOptions {
/**
* New instance parsed from the given option string.
- *
+ *
* @param optionstr
* string to parse or <code>null</code>
*/
@@ -219,8 +220,8 @@ public final class AgentOptions {
}
final String key = entry.substring(0, pos);
if (!VALID_OPTIONS.contains(key)) {
- throw new IllegalArgumentException(format(
- "Unknown agent option \"%s\".", key));
+ throw new IllegalArgumentException(
+ format("Unknown agent option \"%s\".", key));
}
final String value = entry.substring(pos + 1);
@@ -233,7 +234,7 @@ public final class AgentOptions {
/**
* New instance read from the given {@link Properties} object.
- *
+ *
* @param properties
* {@link Properties} object to read configuration options from
*/
@@ -260,7 +261,7 @@ public final class AgentOptions {
/**
* Returns the output file location.
- *
+ *
* @return output file location
*/
public String getDestfile() {
@@ -269,7 +270,7 @@ public final class AgentOptions {
/**
* Sets the output file location.
- *
+ *
* @param destfile
* output file location
*/
@@ -279,7 +280,7 @@ public final class AgentOptions {
/**
* Returns whether the output should be appended to an existing file.
- *
+ *
* @return <code>true</code>, when the output should be appended
*/
public boolean getAppend() {
@@ -288,7 +289,7 @@ public final class AgentOptions {
/**
* Sets whether the output should be appended to an existing file.
- *
+ *
* @param append
* <code>true</code>, when the output should be appended
*/
@@ -298,7 +299,7 @@ public final class AgentOptions {
/**
* Returns the wildcard expression for classes to include.
- *
+ *
* @return wildcard expression for classes to include
* @see WildcardMatcher
*/
@@ -308,7 +309,7 @@ public final class AgentOptions {
/**
* Sets the wildcard expression for classes to include.
- *
+ *
* @param includes
* wildcard expression for classes to include
* @see WildcardMatcher
@@ -319,7 +320,7 @@ public final class AgentOptions {
/**
* Returns the wildcard expression for classes to exclude.
- *
+ *
* @return wildcard expression for classes to exclude
* @see WildcardMatcher
*/
@@ -329,7 +330,7 @@ public final class AgentOptions {
/**
* Sets the wildcard expression for classes to exclude.
- *
+ *
* @param excludes
* wildcard expression for classes to exclude
* @see WildcardMatcher
@@ -340,7 +341,7 @@ public final class AgentOptions {
/**
* Returns the wildcard expression for excluded class loaders.
- *
+ *
* @return expression for excluded class loaders
* @see WildcardMatcher
*/
@@ -350,7 +351,7 @@ public final class AgentOptions {
/**
* Sets the wildcard expression for excluded class loaders.
- *
+ *
* @param expression
* expression for excluded class loaders
* @see WildcardMatcher
@@ -362,7 +363,7 @@ public final class AgentOptions {
/**
* Returns whether classes from the bootstrap classloader should be
* instrumented.
- *
+ *
* @return <code>true</code> if classes from the bootstrap classloader
* should be instrumented
*/
@@ -373,7 +374,7 @@ public final class AgentOptions {
/**
* Sets whether classes from the bootstrap classloader should be
* instrumented.
- *
+ *
* @param include
* <code>true</code> if bootstrap classes should be instrumented
*/
@@ -383,7 +384,7 @@ public final class AgentOptions {
/**
* Returns whether classes without source location should be instrumented.
- *
+ *
* @return <code>true</code> if classes without source location should be
* instrumented
*/
@@ -393,7 +394,7 @@ public final class AgentOptions {
/**
* Sets whether classes without source location should be instrumented.
- *
+ *
* @param include
* <code>true</code> if classes without source location should be
* instrumented
@@ -404,7 +405,7 @@ public final class AgentOptions {
/**
* Returns the session identifier.
- *
+ *
* @return session identifier
*/
public String getSessionId() {
@@ -413,7 +414,7 @@ public final class AgentOptions {
/**
* Sets the session identifier.
- *
+ *
* @param id
* session identifier
*/
@@ -423,7 +424,7 @@ public final class AgentOptions {
/**
* Returns whether coverage data should be dumped on exit.
- *
+ *
* @return <code>true</code> if coverage data will be written on VM exit
*/
public boolean getDumpOnExit() {
@@ -432,7 +433,7 @@ public final class AgentOptions {
/**
* Sets whether coverage data should be dumped on exit.
- *
+ *
* @param dumpOnExit
* <code>true</code> if coverage data should be written on VM
* exit
@@ -445,7 +446,7 @@ public final class AgentOptions {
* Returns the port on which to listen to when the output is
* <code>tcpserver</code> or the port to connect to when output is
* <code>tcpclient</code>.
- *
+ *
* @return port to listen on or connect to
*/
public int getPort() {
@@ -455,7 +456,7 @@ public final class AgentOptions {
/**
* Sets the port on which to listen to when output is <code>tcpserver</code>
* or the port to connect to when output is <code>tcpclient</code>
- *
+ *
* @param port
* port to listen on or connect to
*/
@@ -468,7 +469,7 @@ public final class AgentOptions {
* Gets the hostname or IP address to listen to when output is
* <code>tcpserver</code> or connect to when output is
* <code>tcpclient</code>
- *
+ *
* @return Hostname or IP address
*/
public String getAddress() {
@@ -479,7 +480,7 @@ public final class AgentOptions {
* Sets the hostname or IP address to listen to when output is
* <code>tcpserver</code> or connect to when output is
* <code>tcpclient</code>
- *
+ *
* @param address
* Hostname or IP address
*/
@@ -489,7 +490,7 @@ public final class AgentOptions {
/**
* Returns the output mode
- *
+ *
* @return current output mode
*/
public OutputMode getOutput() {
@@ -502,7 +503,7 @@ public final class AgentOptions {
/**
* Sets the output mode
- *
+ *
* @param output
* Output mode
*/
@@ -512,7 +513,7 @@ public final class AgentOptions {
/**
* Sets the output mode
- *
+ *
* @param output
* Output mode
*/
@@ -523,7 +524,7 @@ public final class AgentOptions {
/**
* Returns the location of the directory where class files should be dumped
* to.
- *
+ *
* @return dump location or <code>null</code> (no dumps)
*/
public String getClassDumpDir() {
@@ -532,7 +533,7 @@ public final class AgentOptions {
/**
* Sets the directory where class files should be dumped to.
- *
+ *
* @param location
* dump location or <code>null</code> (no dumps)
*/
@@ -542,7 +543,7 @@ public final class AgentOptions {
/**
* Returns whether the agent exposes functionality via JMX.
- *
+ *
* @return <code>true</code>, when JMX is enabled
*/
public boolean getJmx() {
@@ -551,7 +552,7 @@ public final class AgentOptions {
/**
* Sets whether the agent should expose functionality via JMX.
- *
+ *
* @param jmx
* <code>true</code> if JMX should be enabled
*/
@@ -589,7 +590,7 @@ public final class AgentOptions {
/**
* Generate required JVM argument based on current configuration and
* supplied agent jar location.
- *
+ *
* @param agentJarFile
* location of the JaCoCo Agent Jar
* @return Argument to pass to create new VM with coverage enabled
@@ -601,7 +602,7 @@ public final class AgentOptions {
/**
* Generate required quoted JVM argument based on current configuration and
* supplied agent jar location.
- *
+ *
* @param agentJarFile
* location of the JaCoCo Agent Jar
* @return Quoted argument to pass to create new VM with coverage enabled
@@ -615,7 +616,7 @@ public final class AgentOptions {
* prepends it to the given argument command line. If a agent with the same
* JAR file is already specified this parameter is removed from the existing
* command line.
- *
+ *
* @param arguments
* existing command line arguments or <code>null</code>
* @param agentJarFile
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/CommandLineSupport.java b/org.jacoco.core/src/org/jacoco/core/runtime/CommandLineSupport.java
index 1f7fafc2..534fb243 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/CommandLineSupport.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/CommandLineSupport.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -25,7 +26,7 @@ final class CommandLineSupport {
/**
* Quotes a single command line argument if necessary.
- *
+ *
* @param arg
* command line argument
* @return quoted argument
@@ -47,7 +48,7 @@ final class CommandLineSupport {
/**
* Builds a single command line string from the given argument list.
* Arguments are quoted when necessary.
- *
+ *
* @param args
* command line arguments
* @return combined command line
@@ -68,7 +69,7 @@ final class CommandLineSupport {
/**
* Splits a command line into single arguments and removes quotes if
* present.
- *
+ *
* @param commandline
* combined command line
* @return list of arguments
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/IExecutionDataAccessorGenerator.java b/org.jacoco.core/src/org/jacoco/core/runtime/IExecutionDataAccessorGenerator.java
index 83df5744..b3dfe225 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/IExecutionDataAccessorGenerator.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/IExecutionDataAccessorGenerator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -28,12 +29,12 @@ public interface IExecutionDataAccessorGenerator {
* process will embed this code into a method that is called on class
* initialization. This method can be called at any time even outside the
* target VM.
- *
+ *
* The generated code must push a <code>boolean[]</code> instance to the
* operand stack. Except this result object the generated code must not make
* any assumptions about the structure of the embedding method or class. The
* generated code must not use or allocate local variables.
- *
+ *
* @param classid
* identifier of the class
* @param classname
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java b/org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java
index 9057a4e4..ce2389ca 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/IRemoteCommandVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -20,7 +21,7 @@ public interface IRemoteCommandVisitor {
/**
* Requests a execution data dump with an optional reset.
- *
+ *
* @param dump
* <code>true</code> if the dump should be executed
* @param reset
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java
index ea055632..2ae60f41 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/IRuntime.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -20,7 +21,7 @@ public interface IRuntime extends IExecutionDataAccessorGenerator {
/**
* Starts the coverage runtime. This method MUST be called before any class
* instrumented for this runtime is loaded.
- *
+ *
* @param data
* the execution data for this runtime
* @throws Exception
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java
index ee7aa1ac..c362fb92 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/InjectedClassRuntime.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/LoggerRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/LoggerRuntime.java
index bef42030..1fc2b70f 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/LoggerRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/LoggerRuntime.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -24,7 +25,7 @@ import org.objectweb.asm.Opcodes;
* This {@link IRuntime} implementation uses the Java logging API to report
* coverage data.
* <p>
- *
+ *
* The implementation uses a dedicated log channel. Instrumented classes call
* {@link Logger#log(Level, String, Object[])} with the class identifier in the
* first slot of the parameter array. The runtime implements a {@link Handler}
@@ -133,9 +134,7 @@ public class LoggerRuntime extends AbstractRuntime {
// Stack[1]: Ljava/util/logging/Logger;
// Stack[0]: [Ljava/lang/Object;
- mv.visitMethodInsn(
- Opcodes.INVOKEVIRTUAL,
- "java/util/logging/Logger",
+ mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/util/logging/Logger",
"log",
"(Ljava/util/logging/Level;Ljava/lang/String;[Ljava/lang/Object;)V",
false);
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java
index 5f2cc497..a7936715 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/ModifiedSystemClassRuntime.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -44,12 +45,12 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
/**
* Creates a new runtime based on the given class and members.
- *
+ *
* @param systemClass
* system class that contains the execution data
* @param accessFieldName
* name of the public static runtime access field
- *
+ *
*/
public ModifiedSystemClassRuntime(final Class<?> systemClass,
final String accessFieldName) {
@@ -85,13 +86,13 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
* Creates a new {@link ModifiedSystemClassRuntime} using the given class as
* the data container. Member is created with internal default name. The
* given class must not have been loaded before by the agent.
- *
+ *
* @param inst
* instrumentation interface
* @param className
* VM name of the class to use
* @return new runtime instance
- *
+ *
* @throws ClassNotFoundException
* id the given class can not be found
*/
@@ -104,7 +105,7 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
* Creates a new {@link ModifiedSystemClassRuntime} using the given class as
* the data container. The given class must not have been loaded before by
* the agent.
- *
+ *
* @param inst
* instrumentation interface
* @param className
@@ -112,7 +113,7 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
* @param accessFieldName
* name of the added runtime access field
* @return new runtime instance
- *
+ *
* @throws ClassNotFoundException
* if the given class can not be found
*/
@@ -120,10 +121,10 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
final String className, final String accessFieldName)
throws ClassNotFoundException {
final ClassFileTransformer transformer = new ClassFileTransformer() {
- public byte[] transform(final ClassLoader loader,
- final String name, final Class<?> classBeingRedefined,
- final ProtectionDomain protectionDomain, final byte[] source)
- throws IllegalClassFormatException {
+ public byte[] transform(final ClassLoader loader, final String name,
+ final Class<?> classBeingRedefined,
+ final ProtectionDomain protectionDomain,
+ final byte[] source) throws IllegalClassFormatException {
if (name.equals(className)) {
return instrument(source, accessFieldName);
}
@@ -136,15 +137,16 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
try {
clazz.getField(accessFieldName);
} catch (final NoSuchFieldException e) {
- throw new RuntimeException(format(
- "Class %s could not be instrumented.", className), e);
+ throw new RuntimeException(
+ format("Class %s could not be instrumented.", className),
+ e);
}
return new ModifiedSystemClassRuntime(clazz, accessFieldName);
}
/**
* Adds the static data field to the given class definition.
- *
+ *
* @param source
* class definition source
* @param accessFieldName
@@ -169,9 +171,10 @@ public class ModifiedSystemClassRuntime extends AbstractRuntime {
private static void createDataField(final ClassVisitor visitor,
final String dataField) {
- visitor.visitField(Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC
- | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_TRANSIENT, dataField,
- ACCESS_FIELD_TYPE, null, null);
+ visitor.visitField(
+ Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC
+ | Opcodes.ACC_TRANSIENT,
+ dataField, ACCESS_FIELD_TYPE, null, null);
}
}
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGenerator.java b/org.jacoco.core/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGenerator.java
index a5e88b60..78ef3064 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGenerator.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/OfflineInstrumentationAccessGenerator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -22,8 +23,8 @@ import org.objectweb.asm.Opcodes;
* obtain probe arrays. This generator is designed for offline instrumentation
* only.
*/
-public class OfflineInstrumentationAccessGenerator implements
- IExecutionDataAccessorGenerator {
+public class OfflineInstrumentationAccessGenerator
+ implements IExecutionDataAccessorGenerator {
private final String runtimeClassName;
@@ -37,7 +38,7 @@ public class OfflineInstrumentationAccessGenerator implements
/**
* Creates a new instance with the given runtime class name for testing
* purposes
- *
+ *
* @param runtimeClassName
* VM name of the runtime class
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java
index 46fb6d2c..0f4b1cb3 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlReader.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -25,7 +26,7 @@ public class RemoteControlReader extends ExecutionDataReader {
/**
* Create a new read based on the given input stream.
- *
+ *
* @param input
* input stream to read commands from
* @throws IOException
@@ -50,7 +51,7 @@ public class RemoteControlReader extends ExecutionDataReader {
/**
* Sets an listener for agent commands.
- *
+ *
* @param visitor
* visitor to retrieve agent commands
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlWriter.java b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlWriter.java
index 8534471f..6e8b5cde 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlWriter.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/RemoteControlWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -19,8 +20,8 @@ import org.jacoco.core.data.ExecutionDataWriter;
/**
* {@link ExecutionDataWriter} with commands added for runtime remote control.
*/
-public class RemoteControlWriter extends ExecutionDataWriter implements
- IRemoteCommandVisitor {
+public class RemoteControlWriter extends ExecutionDataWriter
+ implements IRemoteCommandVisitor {
/** Block identifier to confirm successful command execution. */
public static final byte BLOCK_CMDOK = 0x20;
@@ -30,7 +31,7 @@ public class RemoteControlWriter extends ExecutionDataWriter implements
/**
* Creates a new writer based on the given output stream.
- *
+ *
* @param output
* stream to write commands to
* @throws IOException
@@ -43,7 +44,7 @@ public class RemoteControlWriter extends ExecutionDataWriter implements
/**
* Sends a confirmation that a commands has been successfully executed and
* the response is completed.
- *
+ *
* @throws IOException
* in case of problems with the remote connection
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java b/org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java
index c0fbb654..00fb4b07 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/RuntimeData.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -61,7 +62,7 @@ public class RuntimeData {
* execution data is collected. If no identifier is explicitly set a
* identifier is generated from the host name and a random number. This
* method can be called at any time.
- *
+ *
* @see #collect(IExecutionDataVisitor, ISessionInfoVisitor, boolean)
* @param id
* new session identifier
@@ -72,7 +73,7 @@ public class RuntimeData {
/**
* Get the current a session identifier for this runtime.
- *
+ *
* @see #setSessionId(String)
* @return current session identifier
*/
@@ -83,7 +84,7 @@ public class RuntimeData {
/**
* Collects the current execution data and writes it to the given
* {@link IExecutionDataVisitor} object.
- *
+ *
* @param executionDataVisitor
* handler to write coverage data to
* @param sessionInfoVisitor
@@ -119,7 +120,7 @@ public class RuntimeData {
* Returns the coverage data for the class with the given identifier. If
* there is no data available under the given id a new entry is created.
* This is a synchronized access to the underlying store.
- *
+ *
* @param id
* class identifier
* @param name
@@ -142,19 +143,19 @@ public class RuntimeData {
* Retrieves the execution data for a given class. The passed
* {@link Object} array instance is used for parameters and the return value
* as follows. Call parameters:
- *
+ *
* <ul>
* <li>args[0]: class id ({@link Long})
* <li>args[1]: vm class name ({@link String})
* <li>args[2]: probe count ({@link Integer})
* </ul>
- *
+ *
* Return value:
- *
+ *
* <ul>
* <li>args[0]: execution data ({@link IExecutionData})
* </ul>
- *
+ *
* @param args
* parameter array of length 3
*/
@@ -169,7 +170,7 @@ public class RuntimeData {
/**
* In violation of the regular semantic of {@link Object#equals(Object)}
* this implementation is used as the interface to the execution data store.
- *
+ *
* @param args
* the arguments as an {@link Object} array
* @return has no meaning
@@ -188,7 +189,7 @@ public class RuntimeData {
* Generates code that creates the argument array for the
* {@link #getProbes(Object[])} method. The array instance is left on the
* operand stack. The generated code requires a stack size of 5.
- *
+ *
* @param classid
* class identifier
* @param classname
@@ -199,7 +200,8 @@ public class RuntimeData {
* visitor to emit generated code
*/
public static void generateArgumentArray(final long classid,
- final String classname, final int probecount, final MethodVisitor mv) {
+ final String classname, final int probecount,
+ final MethodVisitor mv) {
mv.visitInsn(Opcodes.ICONST_3);
mv.visitTypeInsn(Opcodes.ANEWARRAY, "java/lang/Object");
@@ -221,8 +223,8 @@ public class RuntimeData {
mv.visitInsn(Opcodes.DUP);
mv.visitInsn(Opcodes.ICONST_2);
InstrSupport.push(mv, probecount);
- mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer",
- "valueOf", "(I)Ljava/lang/Integer;", false);
+ mv.visitMethodInsn(Opcodes.INVOKESTATIC, "java/lang/Integer", "valueOf",
+ "(I)Ljava/lang/Integer;", false);
mv.visitInsn(Opcodes.AASTORE);
}
@@ -232,7 +234,7 @@ public class RuntimeData {
* {@link Object} instance from the stack and pushes the probe array of type
* <code>boolean[]</code> on the operand stack. The generated code requires
* a stack size of 6.
- *
+ *
* @param classid
* class identifier
* @param classname
@@ -243,7 +245,8 @@ public class RuntimeData {
* visitor to emit generated code
*/
public static void generateAccessCall(final long classid,
- final String classname, final int probecount, final MethodVisitor mv) {
+ final String classname, final int probecount,
+ final MethodVisitor mv) {
// stack[0]: Ljava/lang/Object;
generateArgumentArray(classid, classname, probecount, mv);
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/SystemPropertiesRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/SystemPropertiesRuntime.java
index d7c338c8..97ec2af9 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/SystemPropertiesRuntime.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/SystemPropertiesRuntime.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -19,7 +20,7 @@ import org.objectweb.asm.Opcodes;
* through a special entry in the {@link System#getProperties()} hash table. The
* advantage is, that the instrumented classes do not get dependencies to other
* classes than the JRE library itself.
- *
+ *
* This runtime may cause problems in environments with security restrictions,
* in applications that replace the system properties or in applications that
* fail if non-String values are placed in the system properties.
@@ -50,8 +51,8 @@ public class SystemPropertiesRuntime extends AbstractRuntime {
// Stack[1]: Ljava/lang/String;
// Stack[0]: Ljava/util/Properties;
- mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/util/Properties",
- "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
+ mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/util/Properties", "get",
+ "(Ljava/lang/Object;)Ljava/lang/Object;", false);
// Stack[0]: Ljava/lang/Object;
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/URLStreamHandlerRuntime.java b/org.jacoco.core/src/org/jacoco/core/runtime/URLStreamHandlerRuntime.java
deleted file mode 100644
index 55f9c874..00000000
--- a/org.jacoco.core/src/org/jacoco/core/runtime/URLStreamHandlerRuntime.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Marc R. Hoffmann - initial API and implementation
- *
- *******************************************************************************/
-package org.jacoco.core.runtime;
-
-import java.io.IOException;
-import java.lang.reflect.Field;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLStreamHandler;
-import java.util.Map;
-
-import org.jacoco.core.internal.instr.InstrSupport;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Opcodes;
-
-/**
- * This {@link IRuntime} implementation registers a special
- * {@link URLStreamHandler} to process coverage data. The handler is not
- * actually used for opening a URL, but to get access to the runtime object.
- */
-public class URLStreamHandlerRuntime extends AbstractRuntime {
-
- private static final String PROTOCOLPREFIX = "jacoco-";
-
- private final String protocol;
-
- private Map<String, URLStreamHandler> handlers;
-
- /**
- * Creates a new runtime.
- */
- public URLStreamHandlerRuntime() {
- super();
- protocol = PROTOCOLPREFIX + Integer.toHexString(hashCode());
- }
-
- @Override
- public void startup(final RuntimeData data) throws Exception {
- super.startup(data);
- handlers = getHandlersReference();
- handlers.put(protocol, handler);
- }
-
- private Map<String, URLStreamHandler> getHandlersReference()
- throws Exception {
- final Field field = URL.class.getDeclaredField("handlers");
- field.setAccessible(true);
- @SuppressWarnings("unchecked")
- final Map<String, URLStreamHandler> map = (Map<String, URLStreamHandler>) field
- .get(null);
- return map;
- }
-
- public void shutdown() {
- handlers.remove(protocol);
- }
-
- public int generateDataAccessor(final long classid, final String classname,
- final int probecount, final MethodVisitor mv) {
-
- // The data accessor performs the following steps:
- //
- // final URL url = new URL(protocol, null, "");
- // final URLConnection connection = url.openConnection();
- // final Object[] args = new Object[3];
- // args[0] = Long.valueOf(classid);
- // args[1] = classname;
- // args[2] = Integer.valueOf(probecount);
- // connection.equals(args);
- // final byte[] probedata = (byte[]) args[0];
-
- RuntimeData.generateArgumentArray(classid, classname, probecount, mv);
- mv.visitInsn(Opcodes.DUP);
-
- // Stack[1]: [Ljava/lang/Object;
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitTypeInsn(Opcodes.NEW, "java/net/URL");
- mv.visitInsn(Opcodes.DUP);
- mv.visitLdcInsn(protocol);
- mv.visitInsn(Opcodes.ACONST_NULL);
- mv.visitLdcInsn("");
- mv.visitMethodInsn(Opcodes.INVOKESPECIAL, "java/net/URL", "<init>",
- "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V",
- false);
-
- // Stack[2]: [Ljava/net/URL;
- // Stack[1]: [Ljava/lang/Object;
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/net/URL",
- "openConnection", "()Ljava/net/URLConnection;", false);
-
- // Stack[2]: [Ljava/net/URLConnection;
- // Stack[1]: [Ljava/lang/Object;
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitInsn(Opcodes.SWAP);
-
- // Stack[2]: [Ljava/lang/Object;
- // Stack[1]: [Ljava/net/URLConnection;
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitMethodInsn(Opcodes.INVOKEVIRTUAL, "java/lang/Object", "equals",
- "(Ljava/lang/Object;)Z", false);
-
- // Stack[1]: Z;
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitInsn(Opcodes.POP);
-
- // Stack[0]: [Ljava/lang/Object;
-
- mv.visitInsn(Opcodes.ICONST_0);
- mv.visitInsn(Opcodes.AALOAD);
- mv.visitTypeInsn(Opcodes.CHECKCAST, InstrSupport.DATAFIELD_DESC);
-
- return 7;
- }
-
- private final URLStreamHandler handler = new URLStreamHandler() {
- @Override
- protected URLConnection openConnection(final URL u) throws IOException {
- return connection;
- }
- };
-
- private final URLConnection connection = new URLConnection(null) {
- @Override
- public void connect() throws IOException {
- throw new AssertionError();
- }
-
- @Override
- public boolean equals(final Object obj) {
- return data.equals(obj);
- }
- };
-
-}
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/WildcardMatcher.java b/org.jacoco.core/src/org/jacoco/core/runtime/WildcardMatcher.java
index 91feaa66..b12255db 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/WildcardMatcher.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/WildcardMatcher.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.runtime;
@@ -25,7 +26,7 @@ public class WildcardMatcher {
/**
* Creates a new matcher with the given expression.
- *
+ *
* @param expression
* wildcard expressions
*/
@@ -63,7 +64,7 @@ public class WildcardMatcher {
/**
* Matches the given string against the expressions of this matcher.
- *
+ *
* @param s
* string to test
* @return <code>true</code>, if the expression matches
diff --git a/org.jacoco.core/src/org/jacoco/core/runtime/package-info.java b/org.jacoco.core/src/org/jacoco/core/runtime/package-info.java
index 1ac7cccb..85f792a1 100644
--- a/org.jacoco.core/src/org/jacoco/core/runtime/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/runtime/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.core/src/org/jacoco/core/tools/ExecDumpClient.java b/org.jacoco.core/src/org/jacoco/core/tools/ExecDumpClient.java
index 35617b49..420c7680 100644
--- a/org.jacoco.core/src/org/jacoco/core/tools/ExecDumpClient.java
+++ b/org.jacoco.core/src/org/jacoco/core/tools/ExecDumpClient.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.tools;
@@ -43,7 +44,7 @@ public class ExecDumpClient {
/**
* Specifies whether a dump should be requested
- *
+ *
* @param dump
* <code>true</code> if a dump should be requested
*/
@@ -53,7 +54,7 @@ public class ExecDumpClient {
/**
* Specifies whether execution data should be reset.
- *
+ *
* @param reset
* <code>true</code> if execution data should be reset
*/
@@ -64,7 +65,7 @@ public class ExecDumpClient {
/**
* Sets the number of retry attempts to connect to the target socket. This
* allows to wait for a certain time until the target agent has initialized.
- *
+ *
* @param retryCount
* number of retries
*/
@@ -74,7 +75,7 @@ public class ExecDumpClient {
/**
* Sets the delay time before between connection attempts.
- *
+ *
* @param retryDelay
* delay in milliseconds
*/
@@ -84,7 +85,7 @@ public class ExecDumpClient {
/**
* Requests a dump from the given end-point.
- *
+ *
* @param address
* IP-Address to connect to
* @param port
@@ -100,7 +101,7 @@ public class ExecDumpClient {
/**
* Requests a dump from the given end-point.
- *
+ *
* @param address
* host name or IP-Address to connect to
* @param port
@@ -162,7 +163,7 @@ public class ExecDumpClient {
/**
* This method can be overwritten to get an event just before a connection
* is made.
- *
+ *
* @param address
* target address
* @param port
@@ -176,7 +177,7 @@ public class ExecDumpClient {
/**
* This method can be overwritten to get an event for connection failures
* when another retry will be attempted.
- *
+ *
* @param exception
* connection error
*/
diff --git a/org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java b/org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java
index cf7b2e56..d0b4815e 100644
--- a/org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java
+++ b/org.jacoco.core/src/org/jacoco/core/tools/ExecFileLoader.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.core.tools;
@@ -45,7 +46,7 @@ public class ExecFileLoader {
/**
* Reads all data from given input stream.
- *
+ *
* @param stream
* Stream to read data from
* @throws IOException
@@ -61,7 +62,7 @@ public class ExecFileLoader {
/**
* Reads all data from given input stream.
- *
+ *
* @param file
* file to read data from
* @throws IOException
@@ -78,7 +79,7 @@ public class ExecFileLoader {
/**
* Saves the current content into the given output stream.
- *
+ *
* @param stream
* stream to save content to
* @throws IOException
@@ -94,7 +95,7 @@ public class ExecFileLoader {
* Saves the current content into the given file. Parent directories are
* created as needed. Also a files system lock is acquired to avoid
* concurrent write access.
- *
+ *
* @param file
* file to save content to
* @param append
@@ -111,7 +112,8 @@ public class ExecFileLoader {
final FileOutputStream fileStream = new FileOutputStream(file, append);
// Avoid concurrent writes from other processes:
fileStream.getChannel().lock();
- final OutputStream bufferedStream = new BufferedOutputStream(fileStream);
+ final OutputStream bufferedStream = new BufferedOutputStream(
+ fileStream);
try {
save(bufferedStream);
} finally {
@@ -121,7 +123,7 @@ public class ExecFileLoader {
/**
* Returns the session info store with all loaded sessions.
- *
+ *
* @return session info store
*/
public SessionInfoStore getSessionInfoStore() {
@@ -130,7 +132,7 @@ public class ExecFileLoader {
/**
* Returns the execution data store with data for all loaded classes.
- *
+ *
* @return execution data store
*/
public ExecutionDataStore getExecutionDataStore() {
diff --git a/org.jacoco.core/src/org/jacoco/core/tools/package-info.java b/org.jacoco.core/src/org/jacoco/core/tools/package-info.java
index c35c5f9a..dfe00a9c 100644
--- a/org.jacoco.core/src/org/jacoco/core/tools/package-info.java
+++ b/org.jacoco.core/src/org/jacoco/core/tools/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.doc/about.html b/org.jacoco.doc/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.doc/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.doc/docroot/doc/agent.html b/org.jacoco.doc/docroot/doc/agent.html
index 59f0cdd3..719a843a 100644
--- a/org.jacoco.doc/docroot/doc/agent.html
+++ b/org.jacoco.doc/docroot/doc/agent.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Java Agent</span>
</div>
-<div id="content">
+<div id="content">
<h1>Java Agent</h1>
@@ -51,7 +51,7 @@
<p>
The agent <code>jacocoagent.jar</code> is part of the JaCoCo distribution and
includes all required dependencies. A Java agent can be activated with the
- following JVM option:
+ following JVM option:
</p>
<pre>
@@ -59,7 +59,7 @@
</pre>
<p>
- The JaCoCo agent accepts the following options:
+ The JaCoCo agent accepts the following options:
</p>
<table class="coverage">
@@ -83,14 +83,14 @@
<code>false</code>, an existing execution data file will be replaced.
</td>
<td><code>true</code></td>
- </tr>
+ </tr>
<tr>
<td><code>includes</code></td>
<td>A list of class names that should be included in execution analysis.
The list entries are separated by a colon (<code>:</code>) and
may use wildcard characters (<code>*</code> and <code>?</code>).
Except for performance optimization or technical corner cases this
- option is normally not required.
+ option is normally not required.
</td>
<td><code>*</code> (all classes)</td>
</tr>
@@ -100,7 +100,9 @@
The list entries are separated by a colon (<code>:</code>) and
may use wildcard characters (<code>*</code> and <code>?</code>).
Except for performance optimization or technical corner cases this
- option is normally not required.
+ option is normally not required. If you want to exclude classes from
+ the report please configure the respective report generation tool
+ accordingly.
</td>
<td><i>empty</i> (no excluded classes)</td>
</tr>
@@ -112,7 +114,7 @@
<code>?</code>). This option might be required in case of special
frameworks that conflict with JaCoCo code instrumentation, in
particular class loaders that do not have access to the Java runtime
- classes.
+ classes.
</td>
<td><code>sun.reflect.DelegatingClassLoader</code></td>
</tr>
@@ -120,7 +122,7 @@
<td><code>inclbootstrapclasses</code></td>
<td>Specifies whether also classes from the bootstrap classloader should
be instrumented. Use this feature with caution, it needs heavy
- includes/excludes tuning.
+ includes/excludes tuning.
</td>
<td><code>false</code></td>
</tr>
@@ -128,7 +130,7 @@
<td><code>inclnolocationclasses</code></td>
<td>Specifies whether also classes without a source location should be
instrumented. Normally such classes are generated at runtime e.g. by
- mocking frameworks and are therefore excluded by default.
+ mocking frameworks and are therefore excluded by default.
</td>
<td><code>false</code></td>
</tr>
@@ -138,7 +140,7 @@
this parameter a random identifier is created by the agent.
</td>
<td><i>auto-generated</i></td>
- </tr>
+ </tr>
<tr>
<td><code>dumponexit</code></td>
<td>If set to <code>true</code> coverage data will be written on VM
@@ -163,7 +165,7 @@
attribute. Execution data is written to this TCP connection.</li>
<li><code>none</code>: Do not produce any output.</li>
</ul>
- Please see the security considerations below.
+ Please see the security considerations below.
</td>
<td><code>file</code></td>
</tr>
@@ -201,7 +203,7 @@
<td>If set to <code>true</code> the agent exposes
<a href="./api/org/jacoco/agent/rt/IAgent.html">functionality</a> via
JMX under the name <code>org.jacoco:type=Runtime</code>. Please see
- the security considerations below.
+ the security considerations below.
</td>
<td><code>false</code></td>
</tr>
@@ -216,13 +218,13 @@
authentication mechanism. If you run JaCoCo on production systems make sure
that no untrusted sources have access to the TCP server port, or JaCoCo TCP
clients only connect to trusted targets. Otherwise internal information of the
- application might be revealed or DOS attacks are possible.
+ application might be revealed or DOS attacks are possible.
</p>
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/ant.html b/org.jacoco.doc/docroot/doc/ant.html
index af070680..f0ddfd58 100644
--- a/org.jacoco.doc/docroot/doc/ant.html
+++ b/org.jacoco.doc/docroot/doc/ant.html
@@ -16,7 +16,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Ant Tasks</span>
</div>
-<div id="content">
+<div id="content">
<h1>Ant Tasks</h1>
@@ -28,16 +28,16 @@
<a href="#agent"><code>agent</code></a>,
<a href="#dump"><code>dump</code></a> and
<a href="#merge"><code>merge</code></a>. Reports in different formats are
- created with the <a href="#report"><code>report</code></a> task. For
+ created with the <a href="#report"><code>report</code></a> task. For
<a href="offline.html">offline instrumentation</a> the task
<a href="#instrument"><code>instrument</code></a> can be used to prepare class
- files.
+ files.
</p>
<p class="hint">
If you want to have line number information included in the coverage reports
or you want source code highlighting the class files of the test target must
- be compiled with debug information.
+ be compiled with debug information.
</p>
<h2>Example</h2>
@@ -63,10 +63,10 @@
<li>Java 1.5 or higher (for both, the Ant runner and the test executor).</li>
</ul>
-
+
<p>All tasks are defined in <code>jacocoant.jar</code> (which is part of the
distribution) and can be included in your Ant scripts with the usual
- <code>taskdef</code> declaration:
+ <code>taskdef</code> declaration:
</p>
<pre class="source lang-xml linenums">
@@ -75,9 +75,9 @@
&lt;taskdef uri="antlib:org.jacoco.ant" resource="org/jacoco/ant/antlib.xml"&gt;
&lt;classpath path="<i>path_to_jacoco</i>/lib/jacocoant.jar"/&gt;
&lt;/taskdef&gt;
-
+
...
-
+
&lt;/project&gt;
</pre>
@@ -102,7 +102,7 @@
The standard Ant tasks to launch Java programs are <code>java</code>, <code>junit</code> and
<code>testng</code>. To add code coverage recording to these tasks they can
simply be wrapped with the <code>coverage</code> task as shown in the
- following examples:
+ following examples:
</p>
<pre class="source lang-xml linenums">
@@ -128,7 +128,7 @@
<p>
Resulting coverage information is collected during execution and written
to a file when the process terminates. Note the <code>fork</code> attribute
- above in the wrapped <code>java</code> task.
+ above in the wrapped <code>java</code> task.
</p>
<p class="hint">
@@ -145,7 +145,7 @@
<p>
The coverage task must wrap exactly one task. While it typically works without
- any configuration, the behavior can be adjusted with some optional attributes:
+ any configuration, the behavior can be adjusted with some optional attributes:
</p>
<table class="coverage">
@@ -174,14 +174,14 @@
<code>false</code>, an existing execution data file will be replaced.
</td>
<td><code>true</code></td>
- </tr>
+ </tr>
<tr>
<td><code>includes</code></td>
<td>A list of class names that should be included in execution analysis.
The list entries are separated by a colon (<code>:</code>) and
may use wildcard characters (<code>*</code> and <code>?</code>).
Except for performance optimization or technical corner cases this
- option is normally not required.
+ option is normally not required.
</td>
<td><code>*</code> (all classes)</td>
</tr>
@@ -191,7 +191,8 @@
The list entries are separated by a colon (<code>:</code>) and
may use wildcard characters (<code>*</code> and <code>?</code>).
Except for performance optimization or technical corner cases this
- option is normally not required.
+ option is normally not required. If you want to exclude classes from
+ the report please configure the <code>report</code> task accordingly.
</td>
<td><i>empty</i> (no excluded classes)</td>
</tr>
@@ -203,7 +204,7 @@
<code>?</code>). This option might be required in case of special
frameworks that conflict with JaCoCo code instrumentation, in
particular class loaders that do not have access to the Java runtime
- classes.
+ classes.
</td>
<td><code>sun.reflect.DelegatingClassLoader</code></td>
</tr>
@@ -211,7 +212,7 @@
<td><code>inclbootstrapclasses</code></td>
<td>Specifies whether also classes from the bootstrap classloader should
be instrumented. Use this feature with caution, it needs heavy
- includes/excludes tuning.
+ includes/excludes tuning.
</td>
<td><code>false</code></td>
</tr>
@@ -219,7 +220,7 @@
<td><code>inclnolocationclasses</code></td>
<td>Specifies whether also classes without a source location should be
instrumented. Normally such classes are generated at runtime e.g. by
- mocking frameworks and are therefore excluded by default.
+ mocking frameworks and are therefore excluded by default.
</td>
<td><code>false</code></td>
</tr>
@@ -229,7 +230,7 @@
this parameter a random identifier is created by the agent.
</td>
<td><i>auto-generated</i></td>
- </tr>
+ </tr>
<tr>
<td><code>dumponexit</code></td>
<td>If set to <code>true</code> coverage data will be written on VM
@@ -366,7 +367,7 @@
</p>
<p>
- The <code>dump</code> task has the following attributes:
+ The <code>dump</code> task has the following attributes:
</p>
<table class="coverage">
@@ -427,7 +428,7 @@
<p>
This task can be used to merge the execution data from multiple test runs
- into a single data store.
+ into a single data store.
</p>
<pre class="source lang-xml linenums">
@@ -438,7 +439,7 @@
<p>
The task definition can contain any number of resource collection types and
- has the following mandatory attribute:
+ has the following mandatory attribute:
</p>
<table class="coverage">
@@ -464,16 +465,16 @@
<p>
Finally different reports can be created with the <code>report</code> task.
A report task declaration consists of different sections, two specify the
- input data, additional ones specify the output formats:
+ input data, additional ones specify the output formats:
</p>
<pre class="source lang-xml linenums">
&lt;jacoco:report&gt;
-
+
&lt;executiondata&gt;
&lt;file file="jacoco.exec"/&gt;
&lt;/executiondata&gt;
-
+
&lt;structure name="Example Project"&gt;
&lt;classfiles&gt;
&lt;fileset dir="classes"/&gt;
@@ -482,9 +483,9 @@
&lt;fileset dir="src"/&gt;
&lt;/sourcefiles&gt;
&lt;/structure&gt;
-
+
&lt;html destdir="report"/&gt;
-
+
&lt;/jacoco:report&gt;
</pre>
@@ -557,7 +558,7 @@
accept any
<a href="http://ant.apache.org/manual/Types/resources.html#collection">Ant
resource collection</a>. Therefore also filtering the class file set is
- possible and allows to narrow the scope of the report, for example:
+ possible and allows to narrow the scope of the report, for example:
</p>
<pre class="source lang-xml linenums">
@@ -579,7 +580,7 @@
The structure can be refined with a hierarchy of <code>group</code> elements.
This way the coverage report can reflect different modules of a software
project. For each group element the corresponding class and source files can
- be specified separately. For example:
+ be specified separately. For example:
</p>
<pre class="source lang-xml linenums">
@@ -600,9 +601,9 @@
&lt;fileset dir="${workspace.dir}/org.jacoco.example.client/src"/&gt;
&lt;/sourcefiles&gt;
&lt;/group&gt;
-
+
...
-
+
&lt;/structure&gt;
</pre>
@@ -679,7 +680,7 @@
<h3>Element <code>xml</code></h3>
<p>
- Create a single-file report in XML format.
+ Create a single-file report in XML format.
</p>
<table class="coverage">
@@ -707,7 +708,7 @@
<h3>Element <code>csv</code></h3>
<p>
- Create single-file report in CSV format.
+ Create single-file report in CSV format.
</p>
<table class="coverage">
@@ -856,11 +857,11 @@
</tr>
<tr>
<td><code>minimum</code></td>
- <td>Expected minimum value. If the minimum refers to a ratio the range is
- from 0.0 to 1.0 where the number of decimal places will also determine
- the precision in error messages. A limit ratio may optionally be
- declared as a percentage where 0.80 and 80% represent the same value,
- the value must end with %.</td>
+ <td>Expected minimum value. If the minimum refers to a ratio it must be
+ in the range from 0.0 to 1.0 where the number of decimal places will
+ also determine the precision in error messages. A limit ratio may
+ optionally be declared as a percentage where 0.80 and 80% represent
+ the same value.</td>
<td><i>none</i></td>
</tr>
<tr>
@@ -898,7 +899,7 @@
<p>
The task definition can contain any number of resource collection types and
- has the following mandatory attribute:
+ has the following mandatory attribute:
</p>
<table class="coverage">
@@ -917,7 +918,7 @@
</tr>
<tr>
<td><code>removesignatures</code></td>
- <td>If set to <code>true</code> all signature related information is
+ <td>If set to <code>true</code> all signature related information is
stripped from JARs. This is typically necessary as instrumentation
breaks the signatures of the original class files.</td>
<td><code>true</code></td>
@@ -927,8 +928,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/api.html b/org.jacoco.doc/docroot/doc/api.html
index 1cdec7a5..77ce8a95 100644
--- a/org.jacoco.doc/docroot/doc/api.html
+++ b/org.jacoco.doc/docroot/doc/api.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">API Usage Examples</span>
</div>
-<div id="content">
+<div id="content">
<h1>API Usage Examples</h1>
@@ -26,7 +26,7 @@
<p>
To compile and run these example you need
- <a href="http://asm.ow2.org/">ASM</a> @asm.version@ in addition to the JaCoCo
+ <a href="http://asm.ow2.org/">ASM</a> ${asm.version} in addition to the JaCoCo
libraries.
</p>
@@ -42,18 +42,18 @@
<td><a class="el_source" href="examples/java/CoreTutorial.java">CoreTutorial.java</a></td>
<td>This tutorial-like example instruments, executes and analyzes a single
target class. Finally line coverage information is printed to the
- console.
+ console.
</td>
</tr>
<tr>
<td><a class="el_source" href="examples/java/ClassInfo.java">ClassInfo.java</a></td>
<td>This example writes JaCoCo specific information for given Java class
- files.
+ files.
</td>
</tr>
<tr>
<td><a class="el_source" href="examples/java/ExecDump.java">ExecDump.java</a></td>
- <td>Utility to dump the content of execution data files in readable form.
+ <td>Utility to dump the content of execution data files in readable form.
</td>
</tr>
<tr>
@@ -85,8 +85,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/build.html b/org.jacoco.doc/docroot/doc/build.html
index 5764a3c9..5cd0aef3 100644
--- a/org.jacoco.doc/docroot/doc/build.html
+++ b/org.jacoco.doc/docroot/doc/build.html
@@ -6,24 +6,6 @@
<link rel="stylesheet" href="resources/doc.css" charset="UTF-8" type="text/css" />
<link rel="stylesheet" href="../coverage/jacoco-resources/prettify.css" charset="UTF-8" type="text/css" />
<link rel="shortcut icon" href="resources/report.gif" type="image/gif" />
- <style>
- table, th, td {
- border-collapse: collapse;
- padding: 3px;
- }
- table tbody tr td {
- border-left: #b0b0b0 3px solid;
- }
- table tbody tr td:nth-child(2) {
- border-left: none;
- }
- th {
- background-color:#e0e0e0;
- }
- table tbody td:hover {
- background: #f0f0d0;
- }
- </style>
<script type="text/javascript" src="../coverage/jacoco-resources/prettify.js"></script>
<title>JaCoCo - Build</title>
</head>
@@ -34,7 +16,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Build</span>
</div>
-<div id="content">
+<div id="content">
<h1>Build</h1>
@@ -56,7 +38,7 @@
</p>
<pre>
- mvn clean install
+ mvn clean verify
</pre>
<p>
@@ -77,7 +59,7 @@
</p>
<pre>
- mvn clean install -DskipTests
+ mvn clean verify -DskipTests
</pre>
@@ -91,48 +73,118 @@
</p>
<p>
- Following table shows how modules will be compiled depending on version of JDK:
+ Following table shows in which classfile version modules will be compiled to
+ depending on version of JDK (empty cells = no compilation possible):
</p>
-<table>
+<table class="coverage">
<thead>
<tr>
- <th></th>
- <th>JDK 5</th>
- <th>JDK 6</th>
- <th>JDK 7</th>
- <th>JDK 8</th>
- <th>JDK 9</th>
- <th>JDK 10</th>
- <th>JDK 11</th>
- <th>JDK 12</th>
+ <td>Modules</td>
+ <td>JDK 5</td>
+ <td>JDK 6</td>
+ <td>JDK 7</td>
+ <td>JDK 8</td>
+ <td>JDK 9</td>
+ <td>JDK 10</td>
+ <td>JDK 11</td>
+ <td>JDK 12</td>
+ <td>JDK 13</td>
+ <td>JDK 14</td>
+ <td>JDK 15</td>
+ <td>JDK 16</td>
</tr>
</thead>
<tbody>
<tr>
- <th>org.jacoco.core.test.validation.java8</th>
- <td colspan="3">excluded from build</td>
- <td colspan="5">compiled into bytecode version 52 (Java 8)</td>
+ <td>org.jacoco.core.test.validation.java14</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>14</td>
+ <td>14</td>
+ <td>14</td>
</tr>
<tr>
- <th>org.jacoco.core.test.validation.java7</th>
- <td colspan="2">excluded from build</td>
- <td colspan="6" rowspan="2">compiled into bytecode version 51 (Java 7)</td>
+ <td>org.jacoco.core.test.validation.java8</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
</tr>
<tr>
- <th>org.jacoco.core.test.validation.groovy</th>
- <td colspan="2">excluded from build</td>
+ <td>org.jacoco.core.test.validation.java7</td>
+ <td></td>
+ <td></td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
</tr>
<tr>
- <th>org.jacoco.core.test.validation.kotlin</th>
- <td colspan="1">excluded from build</td>
- <td colspan="6">compiled into bytecode version 50 (Java 6)</td>
- <td rowspan="2">compiled into bytecode version 51 (Java 7)</td>
+ <td>org.jacoco.core.test.validation.groovy</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
+ <td>8</td>
</tr>
<tr>
- <th>all other modules</th>
- <td colspan="4">compiled into bytecode version 49 (Java 5)</td>
- <td colspan="3">compiled into bytecode version 50 (Java 6)</td>
+ <td>org.jacoco.core.test.validation.kotlin</td>
+ <td></td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ </tr>
+ <tr>
+ <td>all other modules</td>
+ <td>5</td>
+ <td>5</td>
+ <td>5</td>
+ <td>5</td>
+ <td>6</td>
+ <td>6</td>
+ <td>6</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
+ <td>7</td>
</tr>
</tbody>
</table>
@@ -148,7 +200,7 @@
</p>
<pre>
- mvn clean install -Djdk.version=10 -Dbytecode.version=9
+ mvn clean verify -Djdk.version=10 -Dbytecode.version=9
</pre>
<p>
@@ -156,7 +208,7 @@
</p>
<pre>
- mvn clean install -Decj
+ mvn clean verify -Decj
</pre>
<p>
@@ -164,22 +216,26 @@
</p>
<ul>
- <li><code>mvn clean install -Djdk.version=5 -Dbytecode.version=5</code></li>
- <li><code>mvn clean install -Djdk.version=6 -Dbytecode.version=6</code></li>
- <li><code>mvn clean install -Djdk.version=7 -Dbytecode.version=7</code></li>
- <li><code>mvn clean install -Djdk.version=8 -Dbytecode.version=8</code></li>
- <li><code>mvn clean install -Djdk.version=8 -Dbytecode.version=8 -Decj</code></li>
- <li><code>mvn clean install -Djdk.version=9 -Dbytecode.version=9</code></li>
- <li><code>mvn clean install -Djdk.version=10 -Dbytecode.version=10</code></li>
- <li><code>mvn clean install -Djdk.version=11 -Dbytecode.version=11</code></li>
- <li><code>mvn clean install -Djdk.version=12 -Dbytecode.version=12</code></li>
+ <li><code>mvn clean verify -Djdk.version=5 -Dbytecode.version=5</code></li>
+ <li><code>mvn clean verify -Djdk.version=6 -Dbytecode.version=6</code></li>
+ <li><code>mvn clean verify -Djdk.version=7 -Dbytecode.version=7</code></li>
+ <li><code>mvn clean verify -Djdk.version=8 -Dbytecode.version=8</code></li>
+ <li><code>mvn clean verify -Djdk.version=8 -Dbytecode.version=8 -Decj</code></li>
+ <li><code>mvn clean verify -Djdk.version=9 -Dbytecode.version=9</code></li>
+ <li><code>mvn clean verify -Djdk.version=10 -Dbytecode.version=10</code></li>
+ <li><code>mvn clean verify -Djdk.version=11 -Dbytecode.version=11</code></li>
+ <li><code>mvn clean verify -Djdk.version=12 -Dbytecode.version=12</code></li>
+ <li><code>mvn clean verify -Djdk.version=13 -Dbytecode.version=13</code></li>
+ <li><code>mvn clean verify -Djdk.version=14 -Dbytecode.version=14</code></li>
+ <li><code>mvn clean verify -Djdk.version=15 -Dbytecode.version=15</code></li>
+ <li><code>mvn clean verify -Djdk.version=16 -Dbytecode.version=16</code></li>
</ul>
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/changes.html b/org.jacoco.doc/docroot/doc/changes.html
index 1dfa98d9..730fd303 100644
--- a/org.jacoco.doc/docroot/doc/changes.html
+++ b/org.jacoco.doc/docroot/doc/changes.html
@@ -18,6 +18,163 @@
<h1>Change History</h1>
+<h2>Release 0.8.7 (2020/05/04)</h2>
+
+<h3>New Features</h3>
+<ul>
+ <li>JaCoCo now officially supports Java 15 and 16
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1094">#1094</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1097">#1097</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1176">#1176</a>).</li>
+ <li>Experimental support for Java 17 class files
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1132">#1132</a>).</li>
+ <li>New <code>formats</code> parameter for Maven report goals to specify the
+ generated report formats. Contributed by troosan.
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1175">#1175</a>).</li>
+ <li>Branch added by the Kotlin compiler version 1.4.0 and above for "unsafe" cast
+ operator is filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1143">#1143</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1178">#1178</a>).</li>
+ <li><code>synthetic</code> methods added by the Kotlin compiler version 1.5.0 and
+ above for <code>private</code> suspending functions are filtered out
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1174">#1174</a>).</li>
+ <li>Branches added by the Kotlin compiler version 1.4.20 and above for suspending
+ lambdas are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1149">#1149</a>).</li>
+ <li>Branches added by the Kotlin compiler version 1.5.0 and above for functions
+ with default arguments are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1162">#1162</a>).</li>
+ <li>Branch added by the Kotlin compiler version 1.5.0 and above for reading from
+ <code>lateinit</code> property is filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1166">#1166</a>).</li>
+ <li>Additional bytecode generated by the Kotlin compiler version 1.5.0 and above
+ for <code>when</code> expressions on <code>kotlin.String</code> values
+ is filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1172">#1172</a>).</li>
+ <li>Improved filtering of bytecode generated by Kotlin compiler versions below
+ 1.5.0 for <code>when</code> expressions on <code>kotlin.String</code> values
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1156">#1156</a>).</li>
+</ul>
+
+<h3>Fixed bugs</h3>
+<ul>
+ <li>Fixed parsing of SMAP generated by Kotlin compiler version 1.5.0 and above
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1164">#1164</a>).</li>
+</ul>
+
+<h3>Non-functional Changes</h3>
+<ul>
+ <li>JaCoCo now depends on ASM 9.1
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1094">#1094</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1097">#1097</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1153">#1153</a>).</li>
+ <li>Maven plug-in has no dependency on <code>maven-reporting-impl</code> any more
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1121">#1121</a>).</li>
+</ul>
+
+<h2>Release 0.8.6 (2020/09/15)</h2>
+
+<h3>New Features</h3>
+<ul>
+ <li>JaCoCo now officially supports Java 14.</li>
+ <li>Experimental support for Java 15 class files
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/992">#992</a>).</li>
+ <li>Experimental support for Java 16 class files
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1059">#1059</a>).</li>
+ <li>Methods <code>toString</code>, <code>hashCode</code> and <code>equals</code>
+ generated by compiler for records are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/990">#990</a>).</li>
+ <li>Bridge methods are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1010">#1010</a>).</li>
+ <li>Methods generated by Kotlin compiler for non-overridden non-abstract methods
+ of interfaces are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1012">#1012</a>).</li>
+ <li>Branches added by the Kotlin compiler version 1.3.60 for suspending functions
+ with tail call optimization are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1016">#1016</a>).</li>
+</ul>
+
+<h3>Fixed bugs</h3>
+<ul>
+ <li>Compression method of zip entries is now preserved when instrumenting archives.
+ This allows to use JaCoCo with frameworks that expect uncompressed entries
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1018">#1018</a>).</li>
+</ul>
+
+<h3>Non-functional Changes</h3>
+<ul>
+ <li>Support for Pack200 was removed in JDK 14. JaCoCo will now throw a detailed
+ exception when Pack200 archives are processed with the latest JDKs
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/984">#984</a>).</li>
+ <li>JaCoCo now depends on ASM 8.0.1
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/1032">#1032</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/1043">#1043</a>).</li>
+</ul>
+
+<h3>API Changes</h3>
+<ul>
+ <li><code>URLStreamHandlerRuntime</code> removed
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/471">#471</a>).</li>
+</ul>
+
+<h2>Release 0.8.5 (2019/10/11)</h2>
+
+<h3>New Features</h3>
+<ul>
+ <li>JaCoCo now officially supports Java 13</li>
+ <li>Experimental support for Java 14 class files
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/897">#897</a>).</li>
+ <li>Branches added by the Kotlin compiler for <code>open</code> functions with
+ default arguments are filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/887">#887</a>).</li>
+</ul>
+
+<h3>Fixed bugs</h3>
+<ul>
+ <li><code>synthetic</code> constructors that contain values of default arguments
+ in Kotlin should not be ignored
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/888">#888</a>).</li>
+ <li>Instrumentation should update indexes of local variables in annotations
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/894">#894</a>).</li>
+ <li>Branches added by the Kotlin compiler for functions with default arguments
+ and containing arguments of type <code>long</code> or <code>double</code>
+ should be filtered out during generation of report
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/908">#908</a>).</li>
+ <li><code>synthetic</code> methods that contain bodies of anonymous functions
+ in Scala should not be ignored
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/912">#912</a>).</li>
+ <li>To avoid failures with invalid class files report generation now checks
+ that source references are actually files
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/941">#941</a>).</li>
+ <li><code>NullPointerException</code> during filtering
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/942">#942</a>,
+ <a href="https://github.com/jacoco/jacoco/issues/944">#944</a>).</li>
+</ul>
+
+<h3>Non-functional Changes</h3>
+<ul>
+ <li>JaCoCo now distributed under the terms and conditions of the
+ Eclipse Public License Version 2.0
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/943">#943</a>).</li>
+ <li>Prevent startup when JaCoCo runtime cannot be initialized to avoid
+ subsequent faults
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/910">#910</a>).</li>
+ <li>JaCoCo now depends on ASM 7.2
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/947">#947</a>).</li>
+</ul>
+
+<h3>API Changes</h3>
+<ul>
+ <li>The coverage check API and tools (Ant, Maven) now report an error, when
+ a coverage ratio limit is configured outside the range [0,1] to avoid
+ common configuration mistakes
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/783">#783</a>).</li>
+ <li>Unsupported class file versions are now consistently reported as exceptions
+ by all methods of <code>Analyzer</code> and <code>Instrumenter</code> and
+ thus also during report generation and offline instrumentation
+ (GitHub <a href="https://github.com/jacoco/jacoco/issues/952">#952</a>).</li>
+</ul>
+
<h2>Release 0.8.4 (2019/05/08)</h2>
<h3>New Features</h3>
@@ -222,7 +379,7 @@
<li>JaCoCo now comes with a simple command line interface
(GitHub <a href="https://github.com/jacoco/jacoco/issues/525">#525</a>).</li>
<li>Limit configuration of Maven <code>check</code> goal and Ant
- <code>check</code> element now also supports percentage values
+ <code>check</code> element now also supports percentage values
(GitHub <a href="https://github.com/jacoco/jacoco/issues/534">#534</a>).</li>
<li>Manifests of JAR files now have <code>Automatic-Module-Name</code> for Java 9
(GitHub <a href="https://github.com/jacoco/jacoco/issues/565">#565</a>).</li>
@@ -438,7 +595,7 @@
<h3>API Changes</h3>
<ul>
<li>In case of incompatible execution data formats read from another JaCoCo
- version <code>ExecutionDataReader.read()</code> now throws a
+ version <code>ExecutionDataReader.read()</code> now throws a
<code>IncompatibleExecDataVersionException</code>.</li>
</ul>
@@ -570,7 +727,7 @@
includes removal of the specific skip condition for packages e.g. POMs and
instead checks existence of <tt>target/classes</tt> in appropriate goals
(GitHub <a href="https://github.com/jacoco/jacoco/issues/171">#171</a>).</li>
- <li>GitHub #44: (Regression) Agent Mojo should set empty property, if execution was skipped
+ <li>GitHub #44: (Regression) Agent Mojo should set empty property, if execution was skipped
(GitHub <a href="https://github.com/jacoco/jacoco/issues/192">#192</a>).</li>
</ul>
@@ -896,7 +1053,7 @@
complexity (Trac #129).</li>
<li>XML and CSV report includes new counter type <code>COMPLEXITY</code>
(Trac #129).</li>
- <li>New method <code>getTabWidth()</code> in callback interface
+ <li>New method <code>getTabWidth()</code> in callback interface
<code>ISourceFileLocator</code> instead of
<code>HTMLReportFormatter.setTabWidth()</code> which has been removed.
(Trac #152).</li>
@@ -991,7 +1148,7 @@
<h3>Fixed Bugs</h3>
<ul>
- <li>Better error message when multiple JaCoCo agents are specified
+ <li>Better error message when multiple JaCoCo agents are specified
(Track #103).</li>
<li>Fixed potential NPE at shutdown when running agent in
<code>tcpserver</code> mode (Track #117).</li>
@@ -1024,7 +1181,7 @@
<li>Additional and modified methods in <code>IRuntime</code> to produce
session information (Trac #88).</li>
<li>Coverage element type <code>SESSION</code> removed (Trac #95).</li>
- <li>Removed several internal APIs from package
+ <li>Removed several internal APIs from package
<code>org.jacoco.core.instr</code> used for class instrumentation.</li>
<li>Renamed class <code>org.jacoco.report.csv.CsvFormatter</code> to
<code>CSVFormatter</code> (upper case) for consistency with other
@@ -1130,8 +1287,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/classids.html b/org.jacoco.doc/docroot/doc/classids.html
index 10394eea..6086327b 100644
--- a/org.jacoco.doc/docroot/doc/classids.html
+++ b/org.jacoco.doc/docroot/doc/classids.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Class Ids</span>
</div>
-<div id="content">
+<div id="content">
<h1>Class Ids</h1>
@@ -175,8 +175,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/conventions.html b/org.jacoco.doc/docroot/doc/conventions.html
index a3e71904..e449e283 100644
--- a/org.jacoco.doc/docroot/doc/conventions.html
+++ b/org.jacoco.doc/docroot/doc/conventions.html
@@ -14,13 +14,13 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Development Conventions</span>
</div>
-<div id="content">
+<div id="content">
<h1>Development Conventions</h1>
<p>
Efficient team work that produces high-quality software requires a common set
- of rules.
+ of rules.
</p>
<h2>Consistent Source Tree</h2>
@@ -40,7 +40,7 @@
Documentation is part of the product. Whenever you implement a new feature or
change existing behavior make sure to update all corresponding JavaDoc as well
as other documentation with the same change set. The product should always be
- in a consistent state. For every change the following items should be checked:
+ in a consistent state. For every change the following items should be checked:
</p>
<ul>
@@ -57,12 +57,12 @@
<p>
The primary focus of the JaCoCo project is to provide a code coverage library.
Integrators may want to embed JaCoCo in different tools and environments with
- very different usage scenarios. Therefore following aspects should be considered:
+ very different usage scenarios. Therefore following aspects should be considered:
</p>
<p>
<b>Documentation:</b> All APIs should be properly documented on different
- levels of granularity:
+ levels of granularity:
</p>
<ul>
@@ -107,7 +107,7 @@
<h2>Keep an Eye on License Issues</h2>
<p>
- All code included with JaCoCo must conform to the EPL license.
+ All code included with JaCoCo must conform to the EPL license.
</p>
<ul>
@@ -115,7 +115,7 @@
Every committer and contributor must agree that all code will be published
under EPL. He or she must be the original author and must have the
permission to contribute code to JaCoCo, for example if such a permission
- is required by the employer.
+ is required by the employer.
</li>
<li>
Every third party content must be enlisted in the corresponding
@@ -131,7 +131,7 @@
<a href="http://www.eclipse.org/legal/copyrightandlicensenotice.php">EPL
license notice</a>. The initial contributor should be listed. In case of
significant changes or additions additional contributors should also
- be listed.
+ be listed.
</li>
</ul>
@@ -172,8 +172,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/counters.html b/org.jacoco.doc/docroot/doc/counters.html
index 8e2e219e..cc77cd71 100644
--- a/org.jacoco.doc/docroot/doc/counters.html
+++ b/org.jacoco.doc/docroot/doc/counters.html
@@ -14,14 +14,14 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Coverage Counters</span>
</div>
-<div id="content">
+<div id="content">
<h1>Coverage Counters</h1>
<p>
JaCoCo uses a set of different counters to calculate coverage metrics. All
these counters are derived from information contained in Java class files
- which basically are Java byte code instructions and debug information
+ which basically are Java byte code instructions and debug information
optionally embedded in class files. This approach allows efficient on-the-fly
instrumentation and analysis of applications even when no source code is
available. In most cases the collected information can be mapped back to
@@ -30,7 +30,7 @@
information to calculate line level coverage and provide source highlighting.
Not all Java language constructs can be directly compiled to corresponding
byte code. In such cases the Java compiler creates so called <i>synthetic</i>
- code which sometimes results in unexpected code coverage results.
+ code which sometimes results in unexpected code coverage results.
</p>
<h2>Instructions (C0 Coverage)</h2>
@@ -82,7 +82,7 @@
<p>
The formal definition of the cyclomatic complexity v(G) is based on the
- representation of a method's control flow graph as a directed graph:
+ representation of a method's control flow graph as a directed graph:
</p>
<blockquote>
@@ -123,7 +123,7 @@
<p>
Due to the fact that a single line typically compiles to multiple byte code
instructions the source code highlighting shows three different status for
- each line containing source code:
+ each line containing source code:
</p>
<ul>
@@ -164,10 +164,10 @@
initializers such interfaces are also considered as executable classes.
</p>
-</div>
+</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/empty.html b/org.jacoco.doc/docroot/doc/empty.html
index ad73399e..fbad8caf 100644
--- a/org.jacoco.doc/docroot/doc/empty.html
+++ b/org.jacoco.doc/docroot/doc/empty.html
@@ -13,7 +13,7 @@
<a href="../index.html" class="el_report">JaCoCo</a> &gt;
<span class="el_source">Title</span>
</div>
-<div id="content">
+<div id="content">
<h1>Title</h1>
@@ -23,8 +23,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/environment.html b/org.jacoco.doc/docroot/doc/environment.html
index 77c06a0c..d0788d72 100644
--- a/org.jacoco.doc/docroot/doc/environment.html
+++ b/org.jacoco.doc/docroot/doc/environment.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Development Environment</span>
</div>
-<div id="content">
+<div id="content">
<h1>Development Environment</h1>
@@ -48,7 +48,7 @@
Eclipse projects that can be imported in a Eclipse workspace.
</p>
-<p>
+<p>
Project specific Eclipse settings only exist for the following projects. All
other projects and test projects link to these settings:
</p>
@@ -68,7 +68,7 @@
<p>
The minimum supported JRE version for JaCoCo is Java 5. To guarantee
compatibility JaCoCo release builds should always be executed using JDK 5.
- In addition we run builds with 6, 7, 8, 9, 10, 11 and 12 JDKs.
+ In addition we run builds with 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16 JDKs.
</p>
<h3>Build</h3>
@@ -86,7 +86,7 @@
</p>
<ul>
- <li><a href="https://travis-ci.org/jacoco/jacoco/">Travis CI</a></li>
+ <li><a href="https://dev.azure.com/JaCoCo-org/JaCoCo/_build">Azure Pipelines</a></li>
<li><a href="https://ci.appveyor.com/project/JaCoCo/jacoco">AppVeyor</a></li>
</ul>
@@ -131,8 +131,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/epl-2.0.html b/org.jacoco.doc/docroot/doc/epl-2.0.html
new file mode 100644
index 00000000..d4715f24
--- /dev/null
+++ b/org.jacoco.doc/docroot/doc/epl-2.0.html
@@ -0,0 +1,295 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" href="resources/doc.css" charset="UTF-8" type="text/css" />
+ <link rel="shortcut icon" href="resources/report.gif" type="image/gif" />
+ <title>JaCoCo - Eclipse Public License - Version 2.0</title>
+<style type="text/css">
+ p.list {
+ margin-left: 0.5in;
+ margin-top: 0.05em;
+ margin-bottom: 0.05em;
+ }
+</style>
+</head>
+<body>
+
+<div class="breadcrumb">
+ <a href="../index.html" class="el_report">JaCoCo</a> &gt;
+ <span class="el_source">Eclipse Public License - Version 2.0</span>
+</div>
+<div id="content">
+
+<h1>Eclipse Public License - v 2.0</h1>
+
+<pre>
+ THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
+ PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION
+ OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+ a) in the case of the initial Contributor, the initial content
+ Distributed under this Agreement, and
+
+ b) in the case of each subsequent Contributor:
+ i) changes to the Program, and
+ ii) additions to the Program;
+ where such changes and/or additions to the Program originate from
+ and are Distributed by that particular Contributor. A Contribution
+ "originates" from a Contributor if it was added to the Program by
+ such Contributor itself or anyone acting on such Contributor's behalf.
+ Contributions do not include changes or additions to the Program that
+ are not Modified Works.
+
+"Contributor" means any person or entity that Distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which
+are necessarily infringed by the use or sale of its Contribution alone
+or when combined with the Program.
+
+"Program" means the Contributions Distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement
+or any Secondary License (as applicable), including Contributors.
+
+"Derivative Works" shall mean any work, whether in Source Code or other
+form, that is based on (or derived from) the Program and for which the
+editorial revisions, annotations, elaborations, or other modifications
+represent, as a whole, an original work of authorship.
+
+"Modified Works" shall mean any work in Source Code or other form that
+results from an addition to, deletion from, or modification of the
+contents of the Program, including, for purposes of clarity any new file
+in Source Code form that contains any contents of the Program. Modified
+Works shall not include works that contain only declarations,
+interfaces, types, classes, structures, or files of the Program solely
+in each case in order to link to, bind by name, or subclass the Program
+or Modified Works thereof.
+
+"Distribute" means the acts of a) distributing or b) making available
+in any manner that enables the transfer of a copy.
+
+"Source Code" means the form of a Program preferred for making
+modifications, including but not limited to software source code,
+documentation source, and configuration files.
+
+"Secondary License" means either the GNU General Public License,
+Version 2.0, or any later versions of that license, including any
+exceptions or additional permissions as identified by the initial
+Contributor.
+
+2. GRANT OF RIGHTS
+
+ a) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free copyright
+ license to reproduce, prepare Derivative Works of, publicly display,
+ publicly perform, Distribute and sublicense the Contribution of such
+ Contributor, if any, and such Derivative Works.
+
+ b) Subject to the terms of this Agreement, each Contributor hereby
+ grants Recipient a non-exclusive, worldwide, royalty-free patent
+ license under Licensed Patents to make, use, sell, offer to sell,
+ import and otherwise transfer the Contribution of such Contributor,
+ if any, in Source Code or other form. This patent license shall
+ apply to the combination of the Contribution and the Program if, at
+ the time the Contribution is added by the Contributor, such addition
+ of the Contribution causes such combination to be covered by the
+ Licensed Patents. The patent license shall not apply to any other
+ combinations which include the Contribution. No hardware per se is
+ licensed hereunder.
+
+ c) Recipient understands that although each Contributor grants the
+ licenses to its Contributions set forth herein, no assurances are
+ provided by any Contributor that the Program does not infringe the
+ patent or other intellectual property rights of any other entity.
+ Each Contributor disclaims any liability to Recipient for claims
+ brought by any other entity based on infringement of intellectual
+ property rights or otherwise. As a condition to exercising the
+ rights and licenses granted hereunder, each Recipient hereby
+ assumes sole responsibility to secure any other intellectual
+ property rights needed, if any. For example, if a third party
+ patent license is required to allow Recipient to Distribute the
+ Program, it is Recipient's responsibility to acquire that license
+ before distributing the Program.
+
+ d) Each Contributor represents that to its knowledge it has
+ sufficient copyright rights in its Contribution, if any, to grant
+ the copyright license set forth in this Agreement.
+
+ e) Notwithstanding the terms of any Secondary License, no
+ Contributor makes additional grants to any Recipient (other than
+ those set forth in this Agreement) as a result of such Recipient's
+ receipt of the Program under the terms of a Secondary License
+ (if permitted under the terms of Section 3).
+
+3. REQUIREMENTS
+
+3.1 If a Contributor Distributes the Program in any form, then:
+
+ a) the Program must also be made available as Source Code, in
+ accordance with section 3.2, and the Contributor must accompany
+ the Program with a statement that the Source Code for the Program
+ is available under this Agreement, and informs Recipients how to
+ obtain it in a reasonable manner on or through a medium customarily
+ used for software exchange; and
+
+ b) the Contributor may Distribute the Program under a license
+ different than this Agreement, provided that such license:
+ i) effectively disclaims on behalf of all other Contributors all
+ warranties and conditions, express and implied, including
+ warranties or conditions of title and non-infringement, and
+ implied warranties or conditions of merchantability and fitness
+ for a particular purpose;
+
+ ii) effectively excludes on behalf of all other Contributors all
+ liability for damages, including direct, indirect, special,
+ incidental and consequential damages, such as lost profits;
+
+ iii) does not attempt to limit or alter the recipients' rights
+ in the Source Code under section 3.2; and
+
+ iv) requires any subsequent distribution of the Program by any
+ party to be under a license that satisfies the requirements
+ of this section 3.
+
+3.2 When the Program is Distributed as Source Code:
+
+ a) it must be made available under this Agreement, or if the
+ Program (i) is combined with other material in a separate file or
+ files made available under a Secondary License, and (ii) the initial
+ Contributor attached to the Source Code the notice described in
+ Exhibit A of this Agreement, then the Program may be made available
+ under the terms of such Secondary Licenses, and
+
+ b) a copy of this Agreement must be included with each copy of
+ the Program.
+
+3.3 Contributors may not remove or alter any copyright, patent,
+trademark, attribution notices, disclaimers of warranty, or limitations
+of liability ("notices") contained within the Program from any copy of
+the Program which they Distribute, provided that Contributors may add
+their own appropriate notices.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While this
+license is intended to facilitate the commercial use of the Program,
+the Contributor who includes the Program in a commercial product
+offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes
+the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify every
+other Contributor ("Indemnified Contributor") against any losses,
+damages and costs (collectively "Losses") arising from claims, lawsuits
+and other legal actions brought by a third party against the Indemnified
+Contributor to the extent caused by the acts or omissions of such
+Commercial Contributor in connection with its distribution of the Program
+in a commercial product offering. The obligations in this section do not
+apply to any claims or Losses relating to any actual or alleged
+intellectual property infringement. In order to qualify, an Indemnified
+Contributor must: a) promptly notify the Commercial Contributor in
+writing of such claim, and b) allow the Commercial Contributor to control,
+and cooperate with the Commercial Contributor in, the defense and any
+related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial
+product offering, Product X. That Contributor is then a Commercial
+Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have to
+defend claims against the other Contributors related to those performance
+claims and warranties, and if a court requires any other Contributor to
+pay any damages as a result, the Commercial Contributor must pay
+those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS"
+BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF
+TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
+PURPOSE. Each Recipient is solely responsible for determining the
+appropriateness of using and distributing the Program and assumes all
+risks associated with its exercise of rights under this Agreement,
+including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs
+or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT
+PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS
+SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
+EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under
+applicable law, it shall not affect the validity or enforceability of
+the remainder of the terms of this Agreement, and without further
+action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity
+(including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software
+or hardware) infringes such Recipient's patent(s), then such Recipient's
+rights granted under Section 2(b) shall terminate as of the date such
+litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it
+fails to comply with any of the material terms or conditions of this
+Agreement and does not cure such failure in a reasonable period of
+time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use
+and distribution of the Program as soon as reasonably practicable.
+However, Recipient's obligations under this Agreement and any licenses
+granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted and
+may only be modified in the following manner. The Agreement Steward
+reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement
+Steward has the right to modify this Agreement. The Eclipse Foundation
+is the initial Agreement Steward. The Eclipse Foundation may assign the
+responsibility to serve as the Agreement Steward to a suitable separate
+entity. Each new version of the Agreement will be given a distinguishing
+version number. The Program (including Contributions) may always be
+Distributed subject to the version of the Agreement under which it was
+received. In addition, after a new version of the Agreement is published,
+Contributor may elect to Distribute the Program (including its
+Contributions) under the new version.
+
+Except as expressly stated in Sections 2(a) and 2(b) above, Recipient
+receives no rights or licenses to the intellectual property of any
+Contributor under this Agreement, whether expressly, by implication,
+estoppel or otherwise. All rights in the Program not expressly granted
+under this Agreement are reserved. Nothing in this Agreement is intended
+to be enforceable by any entity that is not a Contributor or Recipient.
+No third-party beneficiary rights are created under this Agreement.
+</pre>
+
+</div>
+<div class="footer">
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
+</div>
+
+</body>
+</html>
diff --git a/org.jacoco.doc/docroot/doc/epl-v10.html b/org.jacoco.doc/docroot/doc/epl-v10.html
deleted file mode 100644
index c6a49b53..00000000
--- a/org.jacoco.doc/docroot/doc/epl-v10.html
+++ /dev/null
@@ -1,262 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="resources/doc.css" charset="UTF-8" type="text/css" />
- <link rel="shortcut icon" href="resources/report.gif" type="image/gif" />
- <title>JaCoCo - Eclipse Public License - Version 1.0</title>
-<style type="text/css">
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
-</style>
-</head>
-<body>
-
-<div class="breadcrumb">
- <a href="../index.html" class="el_report">JaCoCo</a> &gt;
- <span class="el_source">Eclipse Public License - Version 1.0</span>
-</div>
-<div id="content">
-
-<h1>Eclipse Public License - v 1.0</h1>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<h3>1. DEFINITIONS</h3>
-
-<p>&quot;Contribution&quot; means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>&quot;Contributor&quot; means any person or entity that distributes
-the Program.</p>
-
-<p>&quot;Licensed Patents&quot; mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>&quot;Program&quot; means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>&quot;Recipient&quot; means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<h3>2. GRANT OF RIGHTS</h3>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<h3>3. REQUIREMENTS</h3>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<h3>4. COMMERCIAL DISTRIBUTION</h3>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-(&quot;Commercial Contributor&quot;) hereby agrees to defend and
-indemnify every other Contributor (&quot;Indemnified Contributor&quot;)
-against any losses, damages and costs (collectively &quot;Losses&quot;)
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<h3>5. NO WARRANTY</h3>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<h3>6. DISCLAIMER OF LIABILITY</h3>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<h3>7. GENERAL</h3>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</div>
-<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
-</div>
-
-</body>
-</html>
diff --git a/org.jacoco.doc/docroot/doc/faq.html b/org.jacoco.doc/docroot/doc/faq.html
index 2e48734e..b24177d7 100644
--- a/org.jacoco.doc/docroot/doc/faq.html
+++ b/org.jacoco.doc/docroot/doc/faq.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">FAQ</span>
</div>
-<div id="content">
+<div id="content">
<h1>FAQ</h1>
@@ -29,10 +29,10 @@
guarantee free capacity, we do not commit to particular release dates.
Typically, you can expect a couple of releases every year.
</p>
-<p>
+<p>
In the <a href="changes.html">change log</a>, you can see all features
- that have been been implemented in master branch and will be available
- with the next release. And in the meantime you can test latest build of
+ that have been implemented in master branch and will be available
+ with the next release. And in the meantime you can test latest build
of master branch (<a href="repo.html">Maven SNAPSHOT</a>) and provide
<a href="support.html">feedback</a> to us.
</p>
@@ -45,7 +45,7 @@
<h3>What Java versions are supported by JaCoCo?</h3>
<p>
- JaCoCo supports Java class files from version 1.0 to 12. However the minimum
+ JaCoCo supports Java class files from version 1.0 to 16. However the minimum
JRE version required by the JaCoCo runtime (e.g. the agent) and the JaCoCo
tools is 1.5. Also note that class files under test from version 1.6 and above
have to contain valid stackmap frames.
@@ -166,7 +166,7 @@
If you use <a href="offline.html">offline instrumentation</a> the instrumented
classes get a direct dependency on the JaCoCo runtime. Therefore
<code>jacocoagent.jar</code> of the same JaCoCo version must be on the
- classpath and accessible from by the instrumented classes.
+ classpath and accessible from by the instrumented classes.
</p>
<h3>Why do I get a <code>StackOverflowError</code> during code coverage analysis?</h3>
@@ -184,10 +184,31 @@
the <code>-Xss</code> JVM option.</li>
</ul>
+<h3>Why do I see classes in the coverage report although I excluded them in the JaCoCo agent configuration?</h3>
+<p>
+ The <code>includes</code> and <code>excludes</code> options of the
+ <a href="agent.html">JaCoCo agent</a> determine for which classes execution
+ data is collected. Except for technical corner cases these options are
+ normally not required. If you exclude classes, no execution data is collected
+ for them.
+</p>
+<p>
+ Report creation is a separate step where all class files which should show up
+ in the report are explicitly provided. Coverage is determined from the
+ provided execution data. If execution data is missing for a particular class,
+ this class is shown as not covered because the report generator cannot
+ distinguish whether the class was excluded from instrumentation or not executed.
+</p>
+
+<p>
+ If you want to exclude classes from the report please configure the
+ respective report generation tool accordingly.
+</p>
+
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/flow.html b/org.jacoco.doc/docroot/doc/flow.html
index b73c070a..59bbd6f7 100644
--- a/org.jacoco.doc/docroot/doc/flow.html
+++ b/org.jacoco.doc/docroot/doc/flow.html
@@ -16,7 +16,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Control Flow Analysis</span>
</div>
-<div id="content">
+<div id="content">
<h1>Control Flow Analysis for Java Methods</h1>
@@ -31,7 +31,7 @@
<h2>Control Flow Graphs for Java Bytecode</h2>
-<p>
+<p>
As an starting point we take the following example method that contains a
single branching point:
</p>
@@ -55,7 +55,7 @@ public static void example() {
<code>IFEQ</code> or the unconditional <code>GOTO</code> opcode. The jump
targets are technically relative offsets to the target instruction. For better
readability we use symbolic labels (<code>L1</code>, <code>L2</code>) instead
- (also the ASM API uses such symbolic labels):
+ (also the ASM API uses such symbolic labels):
</p>
<pre class="source linenums">
@@ -87,7 +87,7 @@ public static example()V
the following Edges. Each edge connects a source instruction with a target
instruction. In some cases the source instruction or the target instruction
does not exist (virtual edges for method entry and exit) or cannot be
- exactly specified (exception handlers).
+ exactly specified (exception handlers).
</p>
<table class="coverage">
@@ -108,7 +108,7 @@ public static example()V
</tr>
<tr>
<td>SEQUENCE</td>
- <td>Instruction, except <code>GOTO</code>, <code>xRETURN</code>,
+ <td>Instruction, except <code>GOTO</code>, <code>xRETURN</code>,
<code>THROW</code>, <code>TABLESWITCH</code> and <code>LOOKUPSWITCH</code></td>
<td>Subsequent instruction</td>
<td></td>
@@ -167,7 +167,7 @@ public static example()V
<p>
If a probe has been executed we know that the corresponding edge has been
- visited. From this edge we can conclude to other preceding nodes and edges:
+ visited. From this edge we can conclude to other preceding nodes and edges:
</p>
<ul>
@@ -180,7 +180,7 @@ public static example()V
<p>
Recursively applying these rules allows to determine the execution status of
all instructions of a method &ndash; given that we have probes at the right
- positions. Therefore JaCoCo inserts probes
+ positions. Therefore JaCoCo inserts probes
</p>
<ul>
@@ -212,7 +212,7 @@ public static example()V
<td><img src="resources/flow-sequence-probe.png" alt="Sequence with Probe"/></td>
<td>
In case of a simple sequence the probe is simply inserted between the
- two instructions.
+ two instructions.
</td>
</tr>
<tr>
@@ -335,9 +335,9 @@ BASTORE
</pre>
<p>
- Note that this probe code is thread safe, does not modify the operand stack
- or modify local variables and is also thread safe. It does also not leave the
- method though an external call. The only prerequisite is that the probe array
+ Note that this probe code is thread safe and does not modify the operand stack
+ or modify local variables. It does also not leave the
+ method through an external call. The only prerequisite is that the probe array
is available as a local variable. For this at the beginning of each method
additional instrumentation code needs to be added to obtain the array instance
associated with the belonging class. To avoid code duplication the
@@ -349,7 +349,7 @@ BASTORE
The size of the probe code above depends on the position of the probe array
variable and the value of the probe identifier as different opcodes can be
used. As calculated in the table below the overhead per probe ranges between 4
- and 7 bytes of additional bytecode:
+ and 7 bytes of additional bytecode:
</p>
<table class="coverage">
@@ -409,7 +409,7 @@ BASTORE
total classes instrumented with JaCoCo increase their size by about 30%. Due
to the fact that probe execution does not require any method calls, only local
instructions, the observed execution time overhead for instrumented
- applications typically is less than 10%.
+ applications typically is less than 10%.
</p>
<h2>References</h2>
@@ -422,8 +422,8 @@ BASTORE
</div>
<div class="footer">
- <div class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</div>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <div class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</div>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/implementation.html b/org.jacoco.doc/docroot/doc/implementation.html
index 668b7dd4..fda79e6f 100644
--- a/org.jacoco.doc/docroot/doc/implementation.html
+++ b/org.jacoco.doc/docroot/doc/implementation.html
@@ -16,7 +16,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Implementation Design</span>
</div>
-<div id="content">
+<div id="content">
<h1>Implementation Design</h1>
@@ -38,7 +38,7 @@
Coverage information has to be collected at runtime. For this purpose JaCoCo
creates instrumented versions of the original class definitions. The
instrumentation process happens on-the-fly during class loading using so
- called Java agents.
+ called Java agents.
</p>
<p>
@@ -71,12 +71,12 @@
The Java agent is loaded by the application class loader. Therefore the
classes of the agent live in the same name space like the application classes
which can result in clashes especially with the third party library ASM. The
- JoCoCo build therefore moves all agent classes into a unique package.
+ JoCoCo build therefore moves all agent classes into a unique package.
</p>
<p>
The JaCoCo build renames all classes contained in the
- <code>jacocoagent.jar</code> into classes with a
+ <code>jacocoagent.jar</code> into classes with a
<code>org.jacoco.agent.rt_&lt;randomid&gt;</code> prefix, including the
required ASM library classes. The identifier is created from a random number.
As the agent does not provide any API, no one should be affected by this
@@ -131,7 +131,7 @@
the presented figures are extracted from a valid test target. A hash code of
the class definitions allows to differentiate between classes and versions of
classes. The CRC64 hash computation is simple and fast resulting in a small 64
- bit identifier.
+ bit identifier.
</p>
<p>
@@ -144,7 +144,7 @@
results. The CRC64 code might produce so called <i>collisions</i>, i.e.
creating the same hash code for two different classes. Although CRC64 is not
cryptographically strong and collision examples can be easily computed, for
- regular class files the collision probability is very low.
+ regular class files the collision probability is very low.
</p>
<h2>Coverage Runtime Dependency</h2>
@@ -152,19 +152,19 @@
<p class="intro">
Instrumented code typically gets a dependency to a coverage runtime which is
responsible for collecting and storing execution data. JaCoCo uses JRE types
- only in generated instrumentation code.
+ only in generated instrumentation code.
</p>
<p>
Making a runtime library available to all instrumented classes can be a
painful or impossible task in frameworks that use their own class loading
mechanisms. Since Java 1.6 <code>java.lang.instrument.Instrumentation</code>
- has an API to extends the bootsstrap loader. As our minimum target is Java 1.5
+ has an API to extends the bootsstrap loader. As our minimum target is Java 1.5
JaCoCo decouples the instrumented classes and the coverage runtime through
official JRE API types only. The instrumented classes communicate through the
<code>Object.equals(Object)</code> method with the runtime. A instrumented
class can retrieve its probe array instance with the following code. Note
- that only JRE APIs are used:
+ that only JRE APIs are used:
</p>
@@ -172,7 +172,7 @@
Object access = ... // Retrieve instance
Object[] args = new Object[3];
-args[0] = Long.valueOf(8060044182221863588); // class id
+args[0] = Long.valueOf(8060044182221863588); // class id
args[1] = "com/example/MyClass"; // class name
args[2] = Integer.valueOf(24); // probe count
@@ -199,17 +199,11 @@ boolean[] probes = (boolean[]) args[0];
parameter array instead of a <code>equals()</code> method. The coverage
runtime registers a custom <code>Handler</code> to receive the parameter
array. This approach might break environments that install their own log
- managers (e.g. Glassfish).</li>
- <li><b><code>URLStreamHandlerRuntime</code></b>: This runtime registers a
- <code>URLStreamHandler</code> for a "jacoco-xxxxx" protocol. Instrumented
- classes open a connection on this protocol. The returned connection object
- is the one that provides access to the coverage runtime through its
- <code>equals()</code> method. However to register the protocol the runtime
- needs to access internal members of the <code>java.net.URL</code> class.</li>
+ managers (e.g. Glassfish).</li>
<li><b><code>ModifiedSystemClassRuntime</code></b>: This approach adds a
public static field to an existing JRE class through instrumentation. Unlike
the other methods above this is only possible for environments where a Java
- agent is active.</li>
+ agent is active.</li>
<li><b><code>InjectedClassRuntime</code></b>: This approach defines a new class
using <code>java.lang.invoke.MethodHandles.Lookup.defineClass</code>
introduced in Java 9.</li>
@@ -233,14 +227,14 @@ boolean[] probes = (boolean[]) args[0];
Coverage analysis for huge projects with several thousand classes or hundred
thousand lines of code should be possible. To allow this with reasonable
memory usage the coverage analysis is based on streaming patterns and
- "depth first" traversals.
+ "depth first" traversals.
</p>
<p>
The complete data tree of a huge coverage report is too big to fit into a
reasonable heap memory configuration. Therefore the coverage analysis and
report generation is implemented as "depth first" traversals. Which means that
- at any point in time only the following data has to be held in working memory:
+ at any point in time only the following data has to be held in working memory:
</p>
<ul>
@@ -252,7 +246,7 @@ boolean[] probes = (boolean[]) args[0];
<p class="intro">
The Java language and the Java VM use different String representation formats
- for Java elements. For example while a type reference in Java reads like
+ for Java elements. For example while a type reference in Java reads like
<code>java.lang.Object</code>, the VM references the same type as
<code>Ljava/lang/Object;</code>. The JaCoCo API is based on VM identifiers only.
</p>
@@ -275,13 +269,13 @@ boolean[] probes = (boolean[]) args[0];
<p>
Using OSGi bundles allows well defined dependencies at development time and
at runtime in OSGi containers. As there are no dependencies on OSGi, the
- bundles can also be used like regular JAR files.
+ bundles can also be used like regular JAR files.
</p>
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/index.html b/org.jacoco.doc/docroot/doc/index.html
index e17a3491..10129346 100644
--- a/org.jacoco.doc/docroot/doc/index.html
+++ b/org.jacoco.doc/docroot/doc/index.html
@@ -13,7 +13,7 @@
<a href="../index.html" class="el_report">JaCoCo</a> &gt;
<span class="el_group">Documentation</span>
</div>
-<div id="content">
+<div id="content">
<h1>Documentation</h1>
@@ -88,8 +88,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/integrations.html b/org.jacoco.doc/docroot/doc/integrations.html
index 60188915..56ed9cb7 100644
--- a/org.jacoco.doc/docroot/doc/integrations.html
+++ b/org.jacoco.doc/docroot/doc/integrations.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Integration Matrix</span>
</div>
-<div id="content">
+<div id="content">
<h1>Integration Matrix</h1>
@@ -65,7 +65,7 @@
</tr>
</tbody>
</table>
-
+
<h3>Third-Party Integrations</h3>
<table class="coverage">
@@ -81,6 +81,14 @@
<td>Java EE testing framework, <a href="http://arquillian.org/modules/jacoco-extension/">JaCoCo extension</a></td>
</tr>
<tr>
+ <td><a href="https://azure.microsoft.com/services/devops/">Azure DevOps</a></td>
+ <td>Cloud-powered collaboration tools by Microsoft, see <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/test/publish-code-coverage-results">documentation</a></td>
+ </tr>
+ <tr>
+ <td><a href="https://www.codacy.com/">Codacy</a></td>
+ <td>Platform to track code coverage and code quality, see <a href="https://support.codacy.com/hc/en-us/articles/207279819-Coverage">documentation</a></td>
+ </tr>
+ <tr>
<td><a href="https://codecov.io/">Codecov</a></td>
<td>Web service to track code coverage, see <a href="https://github.com/codecov/example-java">example</a></td>
</tr>
@@ -89,12 +97,12 @@
<td>Web service to track code coverage, see <a href="https://github.com/trautonen/coveralls-maven-plugin">coveralls-maven-plugin</a></td>
</tr>
<tr>
- <td><a href="http://www.gradle.org/">Gradle</a></td>
- <td>Build System with JaCoCo plug-in, see <a href="http://www.gradle.org/docs/current/userguide/jacoco_plugin.html">documentation</a></td>
+ <td><a href="https://www.stamp-project.eu/">STAMP</a></td>
+ <td>EU research project with test generation tool for JUnit, see <a href="https://github.com/STAMP-project/dspot">DSpot project page</a></td>
</tr>
<tr>
- <td><a href="http://www.bredex.de/web/index.php/guidancer_jubula_en.html">GUIdancer</a></td>
- <td>Commercial GUI testing tool by BREDEX GmbH</td>
+ <td><a href="http://www.gradle.org/">Gradle</a></td>
+ <td>Build System with JaCoCo plug-in, see <a href="http://www.gradle.org/docs/current/userguide/jacoco_plugin.html">documentation</a></td>
</tr>
<tr>
<td><a href="http://www.jetbrains.com/idea/">IntelliJ IDEA</a></td>
@@ -109,8 +117,8 @@
<td>GSoC project of Ognjen Bubalo, see <a href="https://wiki.jenkins-ci.org/display/JENKINS/JaCoCo+Plugin">documentation</a></td>
</tr>
<tr>
- <td><a href="http://java.visualstudio.com/">Visual Studio Team Services</a></td>
- <td>Cloud-powered collaboration tools by Microsoft, see <a href="https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/24/testing-java-applications-with-visual-studio-team-services/">blog entry</a></td>
+ <td><a href="https://www.eclipse.org/jubula/">Jubula</a></td>
+ <td>Functional GUI testing tool</td>
</tr>
<tr>
<td><a href="http://netbeans.org/">NetBeans</a></td>
@@ -118,8 +126,8 @@
<a href="http://plugins.netbeans.org/plugin/48570/tikione-jacocoverage">plug-in</a> for Ant based projects</td>
</tr>
<tr>
- <td><a href="https://github.com/harrah/xsbt/wiki">sbt</a></td>
- <td>Simple Build Tool, <a href="https://bitbucket.org/jmhofer/jacoco4sbt">jacoco4sbt</a> by Joachim Hofer</td>
+ <td><a href="https://www.scala-sbt.org/">sbt</a></td>
+ <td>Scala Build Tool, see <a href="https://www.scala-sbt.org/sbt-jacoco/">JaCoCo plug-in</a></td>
</tr>
<tr>
<td><a href="http://www.shippable.com/">Shippable</a></td>
@@ -127,11 +135,11 @@
</tr>
<tr>
<td><a href="http://www.sonarqube.org/">SonarQube</a></td>
- <td>Continuous inspection platform with JaCoCo support, see <a href="http://docs.sonarqube.org/display/PLUG/Code+Coverage+by+Unit+Tests+for+Java+Project">documentation</a></td>
+ <td>Continuous inspection platform with JaCoCo support, see <a href="https://docs.sonarqube.org/latest/analysis/coverage/">documentation</a></td>
</tr>
<tr>
<td><a href="http://www.jetbrains.com/teamcity/">TeamCity</a></td>
- <td>Continuous integration server with JaCoCo support since version 8.1, see <a href="http://confluence.jetbrains.com/display/TCD8/JaCoCo">documentation</a></td>
+ <td>Continuous integration server with JaCoCo support since version 8.1, see <a href="https://www.jetbrains.com/help/teamcity/jacoco.html">documentation</a></td>
</tr>
<tr>
<td><a href="https://developer.ibm.com/urbancode/">Urban Code</a></td>
@@ -147,8 +155,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/license.html b/org.jacoco.doc/docroot/doc/license.html
index d7a5e8f0..4159b442 100644
--- a/org.jacoco.doc/docroot/doc/license.html
+++ b/org.jacoco.doc/docroot/doc/license.html
@@ -13,21 +13,21 @@
<a href="../index.html" class="el_report">JaCoCo</a> &gt;
<span class="el_source">License</span>
</div>
-<div id="content">
+<div id="content">
<h1>License</h1>
<p>
- Copyright &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
-</p>
+ Copyright &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
+</p>
<p>
The JaCoCo Java Code Coverage Library and all included documentation is made
available by Mountainminds GmbH &amp; Co. KG, Munich. Except indicated below,
the Content is provided to you under the terms and conditions of the Eclipse
- Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is
- <a href="epl-v10.html">provided</a> with this Content and is also available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ Public License Version 2.0 (&quot;EPL&quot;). A copy of the EPL is
+ <a href="epl-2.0.html">provided</a> with this Content and is also available at
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
</p>
<h2>Trademarks</h2>
@@ -39,7 +39,7 @@
trademark, registered trademark, or service mark of The OSGi Alliance in the
US and other countries. Apache Ant and Apache Maven are trademarks of the
Apache Software Foundation. Android and Dalvik are trademarks of Google Inc.
- All other trademarks are the property of their respective owners.
+ All other trademarks are the property of their respective owners.
</p>
@@ -50,243 +50,14 @@
out below.
</p>
-
-<h3>ASM</h3>
-
-<p>
- <a href="http://asm.objectweb.org/">ASM</a> is subject to the terms and
- conditions of the following license:
-</p>
-
-<pre>
-Copyright (c) 2012 France Télécom
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-3. Neither the name of the copyright holders nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGE.
-</pre>
-
-
-<h3>Google Code Prettify</h3>
-
-<p>
- <a href="http://code.google.com/p/google-code-prettify/">Google Code Prettify</a>
- is subject to the terms and conditions of the following license:
-</p>
-
-<pre>
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-</pre>
-
-<h3>args4j</h3>
-
-<p>
- <a href="http://args4j.kohsuke.org/">args4j</a> is subject to the terms and
- conditions of
- <a href="http://www.opensource.org/licenses/mit-license.php">the MIT license</a>.
-</p>
+${args4j.license}
+${asm.license}
+${googlecodeprettify.license}
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/maven.html b/org.jacoco.doc/docroot/doc/maven.html
index 5284978e..4e41e4d4 100644
--- a/org.jacoco.doc/docroot/doc/maven.html
+++ b/org.jacoco.doc/docroot/doc/maven.html
@@ -16,7 +16,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Maven Plug-in</span>
</div>
-<div id="content">
+<div id="content">
<h1>Maven Plug-in</h1>
@@ -45,7 +45,7 @@
<ul>
<li>
- The JaCoCo distribution contains a simple example how code coverage
+ The JaCoCo distribution contains a simple example how code coverage
can be added to a Maven project.</li>
<li>
This <a href="examples/build/pom.xml">POM file</a>
@@ -91,7 +91,7 @@
&lt;plugin&gt;
&lt;groupId&gt;org.jacoco&lt;/groupId&gt;
&lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
- &lt;version&gt;@project.version@&lt;/version&gt;
+ &lt;version&gt;${project.version}&lt;/version&gt;
&lt;/plugin&gt;
</pre>
@@ -152,8 +152,8 @@ mvn help:describe -Dplugin=org.jacoco:jacoco-maven-plugin -Ddetail
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/mission.html b/org.jacoco.doc/docroot/doc/mission.html
index d4ce1469..f5098ec1 100644
--- a/org.jacoco.doc/docroot/doc/mission.html
+++ b/org.jacoco.doc/docroot/doc/mission.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Mission</span>
</div>
-<div id="content">
+<div id="content">
<h1>Mission</h1>
@@ -22,7 +22,7 @@
JaCoCo should provide the standard technology for code coverage analysis in
Java VM based environments. The focus is providing a lightweight, flexible and
well documented library for integration with various build and development
- tools.
+ tools.
</p>
<p>
@@ -43,7 +43,7 @@
Therefore we started the JaCoCo project to provide a new standard technology
for code coverage analysis in Java VM based environments. The focus is
providing a lightweight, flexible and well documented library for integration
- with various build and development tools. <a href="ant.html">Ant tasks</a>, a
+ with various build and development tools. <a href="ant.html">Ant tasks</a>, a
<a href="maven.html">Maven plug-in</a> and the
<a href="http://www.eclemma.org/">EclEmma Eclipse plug-in</a> are provided as
reference usage scenarios. Also many other tool vendors and Open Source
@@ -93,8 +93,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/offline.html b/org.jacoco.doc/docroot/doc/offline.html
index 16211375..b1f184bd 100644
--- a/org.jacoco.doc/docroot/doc/offline.html
+++ b/org.jacoco.doc/docroot/doc/offline.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Offline Instrumentation</span>
</div>
-<div id="content">
+<div id="content">
<h1>Offline Instrumentation</h1>
@@ -64,7 +64,7 @@
<p>
In both cases configuration values may contain variables in the format
<code>${<i>name</i>}</code> which are resolved with system property values
- at runtime. For example:
+ at runtime. For example:
</p>
<pre class="source">
@@ -79,7 +79,7 @@ destfile=${user.home}/jacoco.exec
instrumented classes. The proper location for <code>jacocoagent.jar</code>
might depend on your deployment scenario. The first instrumented class loaded
will trigger the initialization of the JaCoCo runtime. If no instrumented
- class is loaded the JaCoCo runtime will not get started at all.
+ class is loaded the JaCoCo runtime will not get started at all.
</p>
<h2>Using Pre-Instrumented Classes With the Java Agent</h2>
@@ -88,7 +88,7 @@ destfile=${user.home}/jacoco.exec
agent. In this case the configuration is taken from the agent options. The
agent must be configured in a way that pre-instrumented classes are excluded,
e.g. with "<code>excludes=*</code>". Otherwise it will result in error
- messages on the console if the agent instruments such classes again.
+ messages on the console if the agent instruments such classes again.
</p>
<h2>Execution Data Collection</h2>
@@ -111,8 +111,8 @@ destfile=${user.home}/jacoco.exec
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/repo.html b/org.jacoco.doc/docroot/doc/repo.html
index 3fa16e57..be517de1 100644
--- a/org.jacoco.doc/docroot/doc/repo.html
+++ b/org.jacoco.doc/docroot/doc/repo.html
@@ -16,14 +16,14 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Maven Repository</span>
</div>
-<div id="content">
+<div id="content">
<h1>Maven Repository</h1>
<p>
If you want to integrate JaCoCo within your tools you might directly retrieve
it from the Maven repository. There are two repositories, one for JaCoCo
- releases, one for regular snapshot builds.
+ releases, one for regular snapshot builds.
</p>
<table class="coverage">
@@ -126,8 +126,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/resources/doc.css b/org.jacoco.doc/docroot/doc/resources/doc.css
index ec89c32a..592be8ab 100644
--- a/org.jacoco.doc/docroot/doc/resources/doc.css
+++ b/org.jacoco.doc/docroot/doc/resources/doc.css
@@ -43,7 +43,7 @@ div#content a[href^='http://'], a[href^='https://'] {
background:transparent url(extern.gif) center left no-repeat;
}
-/* === Definitions from report.css start here: === */
+/* === Definitions from report.css start here: === */
body, td {
font-family:sans-serif;
@@ -148,7 +148,7 @@ pre.source span.pc {
table.coverage {
empty-cells:show;
- border-collapse:collapse;
+ border-collapse:collapse;
}
table.coverage thead {
@@ -178,7 +178,7 @@ table.coverage tbody td {
border-bottom:#d6d3ce 1px solid;
}
-table.coverage tbody tr:hover {
+table.coverage tbody tr:hover {
background: #f0f0d0 !important;
}
diff --git a/org.jacoco.doc/docroot/doc/support.html b/org.jacoco.doc/docroot/doc/support.html
index 4655c010..f705250f 100644
--- a/org.jacoco.doc/docroot/doc/support.html
+++ b/org.jacoco.doc/docroot/doc/support.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Support and Feedback</span>
</div>
-<div id="content">
+<div id="content">
<h1>Support and Feedback</h1>
@@ -36,8 +36,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/doc/team.html b/org.jacoco.doc/docroot/doc/team.html
index 8edc3ce8..6f3d5e76 100644
--- a/org.jacoco.doc/docroot/doc/team.html
+++ b/org.jacoco.doc/docroot/doc/team.html
@@ -14,7 +14,7 @@
<a href="index.html" class="el_group">Documentation</a> &gt;
<span class="el_source">Team</span>
</div>
-<div id="content">
+<div id="content">
<h1>Team</h1>
@@ -29,9 +29,9 @@
</ul>
<p>
- To keep the development process open please use the
+ To keep the development process open please use the
<a href="support.html">public communication channels</a> and do not contact
- individual team members.
+ individual team members.
</p>
<h2>Former Developers</h2>
@@ -49,8 +49,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/docroot/index.html b/org.jacoco.doc/docroot/index.html
index f9f082c8..e7a6cbe7 100644
--- a/org.jacoco.doc/docroot/index.html
+++ b/org.jacoco.doc/docroot/index.html
@@ -12,20 +12,20 @@
<div class="breadcrumb">
<span class="el_report">JaCoCo</span>
</div>
-<div id="content">
+<div id="content">
<h1>JaCoCo - Java Code Coverage Library</h1>
<p>
JaCoCo is a free Java code coverage library distributed under the
<a href="doc/license.html">Eclipse Public License</a>. Check
- <a href="@jacoco.home.url@">@jacoco.home.url@</a> for updates and feedback.
+ <a href="${jacoco.home.url}">${jacoco.home.url}</a> for updates and feedback.
</p>
<p>
- This is the distribution of version @qualified.bundle.version@ created on
- @build.date@ based on commit
- <a href="https://github.com/jacoco/jacoco/tree/@buildNumber@">@buildNumber@</a>.
+ This is the distribution of version ${qualified.bundle.version} created on
+ ${build.date} based on commit
+ <a href="https://github.com/jacoco/jacoco/tree/${buildNumber}">${buildNumber}</a>.
</p>
<h2>Contents</h2>
@@ -74,25 +74,25 @@
<td>- <i>(all dependencies included)</i></td>
</tr>
<tr>
- <td><span class="el_jar">org.jacoco.agent_@qualified.bundle.version@.jar</span></td>
+ <td><span class="el_jar">org.jacoco.agent_${qualified.bundle.version}.jar</span></td>
<td>yes</td>
<td>JaCoCo agent</td>
<td>-</td>
</tr>
<tr>
- <td><span class="el_jar">org.jacoco.core_@qualified.bundle.version@.jar</span></td>
+ <td><span class="el_jar">org.jacoco.core_${qualified.bundle.version}.jar</span></td>
<td>yes</td>
<td>JaCoCo core</td>
<td>ASM</td>
</tr>
<tr>
- <td><span class="el_jar">org.jacoco.report_@qualified.bundle.version@.jar</span></td>
+ <td><span class="el_jar">org.jacoco.report_${qualified.bundle.version}.jar</span></td>
<td>yes</td>
<td>JaCoCo reporting</td>
<td>org.jacoco.core, ASM</td>
</tr>
<tr>
- <td><span class="el_jar">org.jacoco.ant_@qualified.bundle.version@.jar</span></td>
+ <td><span class="el_jar">org.jacoco.ant_${qualified.bundle.version}.jar</span></td>
<td>yes</td>
<td>JaCoCo Ant tasks</td>
<td>org.jacoco.core, org.jacoco.agent, org.jacoco.report, ASM, Ant</td>
@@ -107,8 +107,8 @@
</div>
<div class="footer">
- <span class="right"><a href="@jacoco.home.url@">JaCoCo</a> @qualified.bundle.version@</span>
- <a href="doc/license.html">Copyright</a> &copy; @copyright.years@ Mountainminds GmbH &amp; Co. KG and Contributors
+ <span class="right"><a href="${jacoco.home.url}">JaCoCo</a> ${qualified.bundle.version}</span>
+ <a href="doc/license.html">Copyright</a> &copy; ${copyright.years} Mountainminds GmbH &amp; Co. KG and Contributors
</div>
</body>
diff --git a/org.jacoco.doc/javadoc/overview.html b/org.jacoco.doc/javadoc/overview.html
index 4c5db610..fd6ff25f 100644
--- a/org.jacoco.doc/javadoc/overview.html
+++ b/org.jacoco.doc/javadoc/overview.html
@@ -1,39 +1,39 @@
-<html>
-<body>
-
-<p>
- This is the public JaCoCo API that can be used for integration. JaCoCo is
- packed as several bundles. While the bundles formally fulfill the OSGi
- specification, there is no dependency on OSGi. They can also be used as
- regular JARs in your classpath.
-</p>
-
-<h2>Bundle org.jacoco.core</h2>
-
-<p>
- The core bundle implements the code coverage technology itself. It provides
- APIs and implementation for
-</p>
-
-<ul>
- <li>class file instrumentation,</li>
- <li>collecting execution data at runtime and</li>
- <li>analyzing coverage data.</li>
-</ul>
-
-<h2>Bundle org.jacoco.agent</h2>
-
-<p>
- Provides the runtime Java agent (JAR file) as a resource.
-</p>
-
-
-<h2>Bundle org.jacoco.report</h2>
-
-<p>
- APIs and implementation to create coverage reports in several formats.
-</p>
-
-
-</body>
-</html> \ No newline at end of file
+<html>
+<body>
+
+<p>
+ This is the public JaCoCo API that can be used for integration. JaCoCo is
+ packed as several bundles. While the bundles formally fulfill the OSGi
+ specification, there is no dependency on OSGi. They can also be used as
+ regular JARs in your classpath.
+</p>
+
+<h1>Bundle org.jacoco.core</h1>
+
+<p>
+ The core bundle implements the code coverage technology itself. It provides
+ APIs and implementation for
+</p>
+
+<ul>
+ <li>class file instrumentation,</li>
+ <li>collecting execution data at runtime and</li>
+ <li>analyzing coverage data.</li>
+</ul>
+
+<h1>Bundle org.jacoco.agent</h1>
+
+<p>
+ Provides the runtime Java agent (JAR file) as a resource.
+</p>
+
+
+<h1>Bundle org.jacoco.report</h1>
+
+<p>
+ APIs and implementation to create coverage reports in several formats.
+</p>
+
+
+</body>
+</html>
diff --git a/org.jacoco.doc/javadoc/stylesheet.css b/org.jacoco.doc/javadoc/stylesheet.css
index a45a6f59..7cf502ce 100644
--- a/org.jacoco.doc/javadoc/stylesheet.css
+++ b/org.jacoco.doc/javadoc/stylesheet.css
@@ -1,72 +1,72 @@
-body {
- font-family:sans-serif;
- font-size:10pt;
- background-color:#FFFFFF;
-}
-
-h1 {
- font-weight:bold;
- font-size:18pt;
-}
-
-.TableHeadingColor {
- background:#E0E0E0
-}
-
-.TableSubHeadingColor {
- background: #EEEEEE
-}
-
-.TableRowColor {
- background: #FFFFFF
-}
-
-.FrameTitleFont {
- font-weight:bold;
- font-size:10pt;
-}
-
-.FrameHeadingFont {
- font-weight:bold;
- font-size:14pt;
-}
-
-.FrameItemFont {
-}
-
-.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */
-.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */
-.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
-.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
-
-.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
-
-a[href^='http://'], a[href^='https://'] {
- display:inline-block;
- padding-left:15px;
- background:transparent url(../resources/extern.gif) center left no-repeat;
-}
-
-hr {
- border:none;
- border-top:#d6d3ce 1px solid;
- height:1px;
-}
-
-.footer {
- padding-top:2px;
- font-size:8pt;
- color:#a0a0a0;
-}
-
-.right {
- width:30%;
- float:right;
- text-align:right;
-}
-
-.footer a {
- color:#a0a0a0;
- background-image:none;
-} \ No newline at end of file
+body {
+ font-family:sans-serif;
+ font-size:10pt;
+ background-color:#FFFFFF;
+}
+
+h1 {
+ font-weight:bold;
+ font-size:18pt;
+}
+
+.TableHeadingColor {
+ background:#E0E0E0
+}
+
+.TableSubHeadingColor {
+ background: #EEEEEE
+}
+
+.TableRowColor {
+ background: #FFFFFF
+}
+
+.FrameTitleFont {
+ font-weight:bold;
+ font-size:10pt;
+}
+
+.FrameHeadingFont {
+ font-weight:bold;
+ font-size:14pt;
+}
+
+.FrameItemFont {
+}
+
+.NavBarCell1 { background-color:#EEEEFF;} /* Light mauve */
+.NavBarCell1Rev { background-color:#00008B;} /* Dark Blue */
+.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;}
+.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;}
+
+.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;}
+
+a[href^='http://'], a[href^='https://'] {
+ display:inline-block;
+ padding-left:15px;
+ background:transparent url(../resources/extern.gif) center left no-repeat;
+}
+
+hr {
+ border:none;
+ border-top:#d6d3ce 1px solid;
+ height:1px;
+}
+
+.footer {
+ padding-top:2px;
+ font-size:8pt;
+ color:#a0a0a0;
+}
+
+.right {
+ width:30%;
+ float:right;
+ text-align:right;
+}
+
+.footer a {
+ color:#a0a0a0;
+ background-image:none;
+}
diff --git a/org.jacoco.doc/pom.xml b/org.jacoco.doc/pom.xml
index 740b0ca4..027282d8 100644
--- a/org.jacoco.doc/pom.xml
+++ b/org.jacoco.doc/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
@@ -181,7 +182,7 @@
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-junit</artifactId>
- <version>1.8.2</version>
+ <version>${ant.version}</version>
</dependency>
</dependencies>
</plugin>
diff --git a/org.jacoco.doc/xsl/cli.xsl b/org.jacoco.doc/xsl/cli.xsl
index b506ac0d..d1a7b167 100644
--- a/org.jacoco.doc/xsl/cli.xsl
+++ b/org.jacoco.doc/xsl/cli.xsl
@@ -1,12 +1,13 @@
<?xml version="1.0"?>
-<!--
+<!--
Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Marc R. Hoffmann - initial API and implementation
-->
@@ -40,9 +41,9 @@
<span class="el_source">Command Line Interface</span>
</div>
<div id="content">
-
+
<h1>Command Line Interface</h1>
-
+
<p>
JaCoCo comes with a command line interface to perform
basic operations from the command line. The command line
@@ -51,20 +52,20 @@
JaCoCo download. Java 1.5 or greater is required for
execution.
</p>
-
+
<p>
For more sophisticated usage especially with larger
projects please use our
<a href="integrations.html">integrations</a> with various
- build tools.
+ build tools.
</p>
-
+
<p>
The following commands are available. Each command has a
list of optional and required parameters. Some parameters
- can be specified multiple times to provide multiple values.
+ can be specified multiple times to provide multiple values.
</p>
-
+
<p class="hint">
<b>Warning:</b> Although a <code>instrument</code> command
is provided the preferred way for code coverage analysis
@@ -75,7 +76,7 @@
Please consult <a href="offline.html">documentation</a>
about offline instrumentation before using this mode.
</p>
-
+
<xsl:apply-templates select="documentation" />
</div>
<div class="footer">
@@ -92,7 +93,7 @@
</body>
</html>
</xsl:template>
-
+
<xsl:template match="command">
<h2><xsl:value-of select="@name" /></h2>
<pre class="source" style="white-space: pre-wrap">
@@ -120,6 +121,5 @@
</tbody>
</table>
</xsl:template>
-
-</xsl:stylesheet>
+</xsl:stylesheet>
diff --git a/org.jacoco.doc/xsl/junit-noframes.xsl b/org.jacoco.doc/xsl/junit-noframes.xsl
index 24ee1301..dcb47311 100644
--- a/org.jacoco.doc/xsl/junit-noframes.xsl
+++ b/org.jacoco.doc/xsl/junit-noframes.xsl
@@ -1,382 +1,379 @@
-<?xml version="1.0"?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
- exclude-result-prefixes="stringutils">
-<xsl:output method="xml" indent="yes" encoding="UTF-8"
- doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
-<xsl:decimal-format decimal-separator="." grouping-separator="," />
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
-
-<xsl:param name="qualified.bundle.version"/>
-<xsl:param name="jacoco.home.url"/>
-<xsl:param name="copyright.years"/>
-
-<!--
-
- JaCoCo test report stylesheet.
-
--->
-<xsl:template match="testsuites">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <link rel="stylesheet" href="../doc/resources/doc.css" charset="UTF-8" type="text/css" />
- <link rel="shortcut icon" href="../doc/resources/report.gif" type="image/gif" />
- <title>JaCoCo - JUnit Test Results</title>
-
- <style type="text/css">
- .Error {
- font-weight:bold; color:red;
- }
- .Failure {
- font-weight:bold; color:purple;
- }
- </style>
- </head>
- <body>
- <div id="content">
- <a name="top"></a>
- <xsl:call-template name="pageHeader"/>
-
- <!-- Summary part -->
- <xsl:call-template name="summary"/>
-
- <!-- Package List part -->
- <xsl:call-template name="packagelist"/>
-
- <!-- For each package create its part -->
- <xsl:call-template name="packages"/>
-
- <!-- For each class create the part -->
- <xsl:call-template name="classes"/>
-
- </div>
- <div class="footer">
- <span class="right"><a href="{$jacoco.home.url}">JaCoCo</a>&#160;<xsl:value-of select="$qualified.bundle.version"/></span>
- <a href="../doc/license.html">Copyright</a> &#169; <xsl:value-of select="$copyright.years"/> Mountainminds GmbH &amp; Co. KG and Contributors
- </div>
- </body>
- </html>
-</xsl:template>
-
-
-
-<!-- ================================================================== -->
-<!-- Write a list of all packages with an hyperlink to the anchor of -->
-<!-- of the package name. -->
-<!-- ================================================================== -->
-<xsl:template name="packagelist">
- <h2>Packages</h2>
- <table class="coverage">
- <xsl:call-template name="testsuite.test.header"/>
- <tbody>
- <!-- list all packages recursively -->
- <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
- <xsl:sort select="@package"/>
- <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/>
- <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/>
- <xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/>
- <xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/>
- <xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/>
-
- <!-- write a summary for the package -->
- <tr valign="top">
- <!-- set a nice color depending if there is an error/failure -->
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
- <xsl:when test="$errorCount &gt; 0">Error</xsl:when>
- </xsl:choose>
- </xsl:attribute>
- <td style="width:24em"><a href="#{@package}" class="el_testsuite"><xsl:value-of select="@package"/></a></td>
- <td><xsl:value-of select="$testCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
- <td><xsl:value-of select="$failureCount"/></td>
- <td>
- <xsl:call-template name="display-time">
- <xsl:with-param name="value" select="$timeCount"/>
- </xsl:call-template>
- </td>
- <td><xsl:value-of select="$testsuites-in-package/@timestamp"/></td>
- </tr>
- </xsl:for-each>
- </tbody>
- </table>
- <p class="hint">
- Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
- </p>
-</xsl:template>
-
-
- <!-- ================================================================== -->
- <!-- Write a package level report -->
- <!-- It creates a table with values from the document: -->
- <!-- Name | Tests | Errors | Failures | Time -->
- <!-- ================================================================== -->
- <xsl:template name="packages">
- <!-- create an anchor to this package name -->
- <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
- <xsl:sort select="@package"/>
- <a name="{@package}"></a>
- <h3>Package <xsl:value-of select="@package"/></h3>
-
- <table class="coverage">
- <xsl:call-template name="testsuite.test.header"/>
-
- <!-- match the testsuites of this package -->
- <xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/>
- </table>
- <p>
- <a href="#top">Back to top</a>
- </p>
- </xsl:for-each>
- </xsl:template>
-
- <xsl:template name="classes">
- <xsl:for-each select="testsuite">
- <xsl:sort select="@name"/>
- <!-- create an anchor to this class name -->
- <a name="{@name}"></a>
- <h3>TestCase <xsl:value-of select="@name"/></h3>
-
- <table class="coverage">
- <xsl:call-template name="testcase.test.header"/>
- <!--
- test can even not be started at all (failure to load the class)
- so report the error directly
- -->
- <xsl:if test="./error">
- <tr class="Error">
- <td colspan="4"><xsl:apply-templates select="./error"/></td>
- </tr>
- </xsl:if>
- <xsl:apply-templates select="./testcase" mode="print.test"/>
- </table>
- <p>
- <a href="#top">Back to top</a>
- </p>
- </xsl:for-each>
- </xsl:template>
-
-<xsl:template name="summary">
- <h2>Summary</h2>
- <xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
- <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
- <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
- <xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
- <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
- <table class="coverage">
- <thead>
- <tr valign="top">
- <td>Tests</td>
- <td>Failures</td>
- <td>Errors</td>
- <td>Success rate</td>
- <td>Time</td>
- </tr>
- </thead>
- <tbody>
- <tr valign="top">
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
- <xsl:when test="$errorCount &gt; 0">Error</xsl:when>
- </xsl:choose>
- </xsl:attribute>
- <td><xsl:value-of select="$testCount"/></td>
- <td><xsl:value-of select="$failureCount"/></td>
- <td><xsl:value-of select="$errorCount"/></td>
- <td>
- <xsl:call-template name="display-percent">
- <xsl:with-param name="value" select="$successRate"/>
- </xsl:call-template>
- </td>
- <td>
- <xsl:call-template name="display-time">
- <xsl:with-param name="value" select="$timeCount"/>
- </xsl:call-template>
- </td>
- </tr>
- </tbody>
- </table>
- <p class="hint">
- Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated.
- </p>
-</xsl:template>
-
-<!-- Page HEADER -->
-<xsl:template name="pageHeader">
- <div class="breadcrumb">
- <a href="../index.html" class="el_report">JaCoCo</a> &gt;
- <span class="el_testsuite">JUnit Test Results</span>
- </div>
- <h1>JUnit Test Results</h1>
-</xsl:template>
-
-<xsl:template match="testsuite" mode="header">
- <thead>
- <tr valign="top">
- <td>Name</td>
- <td>Tests</td>
- <td>Errors</td>
- <td>Failures</td>
- <td nowrap="nowrap">Time(s)</td>
- </tr>
- </thead>
-</xsl:template>
-
-<!-- class header -->
-<xsl:template name="testsuite.test.header">
- <thead>
- <tr>
- <td>Name</td>
- <td>Tests</td>
- <td>Errors</td>
- <td>Failures</td>
- <td>Time(s)</td>
- <td>Time Stamp</td>
- </tr>
- </thead>
-</xsl:template>
-
-<!-- method header -->
-<xsl:template name="testcase.test.header">
- <thead>
- <tr>
- <td>Name</td>
- <td>Status</td>
- <td>Type</td>
- <td>Time(s)</td>
- </tr>
- </thead>
-</xsl:template>
-
-
-<!-- class information -->
-<xsl:template match="testsuite" mode="print.test">
- <tr valign="top">
- <!-- set a nice color depending if there is an error/failure -->
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
- <xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
- </xsl:choose>
- </xsl:attribute>
-
- <!-- print testsuite information -->
- <td style="width:24em"><a href="#{@name}" class="el_testsuite"><xsl:value-of select="@name"/></a></td>
- <td><xsl:value-of select="@tests"/></td>
- <td><xsl:value-of select="@errors"/></td>
- <td><xsl:value-of select="@failures"/></td>
- <td>
- <xsl:call-template name="display-time">
- <xsl:with-param name="value" select="@time"/>
- </xsl:call-template>
- </td>
- <td><xsl:apply-templates select="@timestamp"/></td>
- </tr>
-</xsl:template>
-
-<xsl:template match="testcase" mode="print.test">
- <tr valign="top">
- <xsl:attribute name="class">
- <xsl:choose>
- <xsl:when test="failure | error">Error</xsl:when>
- </xsl:choose>
- </xsl:attribute>
- <td style="width:24em"><span class="el_test"><xsl:value-of select="@name"/></span></td>
- <xsl:choose>
- <xsl:when test="failure">
- <td>Failure</td>
- <td><xsl:apply-templates select="failure"/></td>
- </xsl:when>
- <xsl:when test="error">
- <td>Error</td>
- <td><xsl:apply-templates select="error"/></td>
- </xsl:when>
- <xsl:otherwise>
- <td>Success</td>
- <td></td>
- </xsl:otherwise>
- </xsl:choose>
- <td>
- <xsl:call-template name="display-time">
- <xsl:with-param name="value" select="@time"/>
- </xsl:call-template>
- </td>
- </tr>
-</xsl:template>
-
-
-<xsl:template match="failure">
- <xsl:call-template name="display-failures"/>
-</xsl:template>
-
-<xsl:template match="error">
- <xsl:call-template name="display-failures"/>
-</xsl:template>
-
-<!-- Style for the error and failure in the tescase template -->
-<xsl:template name="display-failures">
- <xsl:choose>
- <xsl:when test="not(@message)">N/A</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@message"/>
- </xsl:otherwise>
- </xsl:choose>
- <!-- display the stacktrace -->
- <code>
- <br/><br/>
- <xsl:call-template name="br-replace">
- <xsl:with-param name="word" select="."/>
- </xsl:call-template>
- </code>
- <!-- the later is better but might be problematic for non-21" monitors... -->
- <!--pre><xsl:value-of select="."/></pre-->
-</xsl:template>
-
-<xsl:template name="JS-escape">
- <xsl:param name="string"/>
- <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
- <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
- <xsl:value-of select="$tmp2"/>
-</xsl:template>
-
-
-<!--
- template that will convert a carriage return into a br tag
- @param word the text from which to convert CR to BR tag
--->
-<xsl:template name="br-replace">
- <xsl:param name="word"/>
- <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"&#xA;","&lt;br/>")'/>
-</xsl:template>
-
-<xsl:template name="display-time">
- <xsl:param name="value"/>
- <xsl:value-of select="format-number($value,'0.000')"/>
-</xsl:template>
-
-<xsl:template name="display-percent">
- <xsl:param name="value"/>
- <xsl:value-of select="format-number($value,'0.00%')"/>
-</xsl:template>
-
-</xsl:stylesheet>
+<?xml version="1.0"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
+ exclude-result-prefixes="stringutils">
+<xsl:output method="xml" indent="yes" encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>
+<xsl:decimal-format decimal-separator="." grouping-separator="," />
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<xsl:param name="qualified.bundle.version"/>
+<xsl:param name="jacoco.home.url"/>
+<xsl:param name="copyright.years"/>
+
+<!--
+
+ JaCoCo test report stylesheet.
+
+-->
+<xsl:template match="testsuites">
+ <html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" href="../doc/resources/doc.css" charset="UTF-8" type="text/css" />
+ <link rel="shortcut icon" href="../doc/resources/report.gif" type="image/gif" />
+ <title>JaCoCo - JUnit Test Results</title>
+
+ <style type="text/css">
+ .Error {
+ font-weight:bold; color:red;
+ }
+ .Failure {
+ font-weight:bold; color:purple;
+ }
+ </style>
+ </head>
+ <body>
+ <div id="content">
+ <a name="top"></a>
+ <xsl:call-template name="pageHeader"/>
+
+ <!-- Summary part -->
+ <xsl:call-template name="summary"/>
+
+ <!-- Package List part -->
+ <xsl:call-template name="packagelist"/>
+
+ <!-- For each package create its part -->
+ <xsl:call-template name="packages"/>
+
+ <!-- For each class create the part -->
+ <xsl:call-template name="classes"/>
+
+ </div>
+ <div class="footer">
+ <span class="right"><a href="{$jacoco.home.url}">JaCoCo</a>&#160;<xsl:value-of select="$qualified.bundle.version"/></span>
+ <a href="../doc/license.html">Copyright</a> &#169; <xsl:value-of select="$copyright.years"/> Mountainminds GmbH &amp; Co. KG and Contributors
+ </div>
+ </body>
+ </html>
+</xsl:template>
+
+
+
+<!-- ================================================================== -->
+<!-- Write a list of all packages with an hyperlink to the anchor of -->
+<!-- of the package name. -->
+<!-- ================================================================== -->
+<xsl:template name="packagelist">
+ <h2>Packages</h2>
+ <table class="coverage">
+ <xsl:call-template name="testsuite.test.header"/>
+ <tbody>
+ <!-- list all packages recursively -->
+ <xsl:for-each select="./testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
+ <xsl:sort select="@package"/>
+ <xsl:variable name="testsuites-in-package" select="/testsuites/testsuite[./@package = current()/@package]"/>
+ <xsl:variable name="testCount" select="sum($testsuites-in-package/@tests)"/>
+ <xsl:variable name="errorCount" select="sum($testsuites-in-package/@errors)"/>
+ <xsl:variable name="failureCount" select="sum($testsuites-in-package/@failures)"/>
+ <xsl:variable name="timeCount" select="sum($testsuites-in-package/@time)"/>
+
+ <!-- write a summary for the package -->
+ <tr valign="top">
+ <!-- set a nice color depending if there is an error/failure -->
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
+ <xsl:when test="$errorCount &gt; 0">Error</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <td style="width:24em"><a href="#{@package}" class="el_testsuite"><xsl:value-of select="@package"/></a></td>
+ <td><xsl:value-of select="$testCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ <td><xsl:value-of select="$failureCount"/></td>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="$timeCount"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ <p class="hint">
+ Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.
+ </p>
+</xsl:template>
+
+
+ <!-- ================================================================== -->
+ <!-- Write a package level report -->
+ <!-- It creates a table with values from the document: -->
+ <!-- Name | Tests | Errors | Failures | Time -->
+ <!-- ================================================================== -->
+ <xsl:template name="packages">
+ <!-- create an anchor to this package name -->
+ <xsl:for-each select="/testsuites/testsuite[not(./@package = preceding-sibling::testsuite/@package)]">
+ <xsl:sort select="@package"/>
+ <a name="{@package}"></a>
+ <h3>Package <xsl:value-of select="@package"/></h3>
+
+ <table class="coverage">
+ <xsl:call-template name="testsuite.test.header"/>
+
+ <!-- match the testsuites of this package -->
+ <xsl:apply-templates select="/testsuites/testsuite[./@package = current()/@package]" mode="print.test"/>
+ </table>
+ <p>
+ <a href="#top">Back to top</a>
+ </p>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template name="classes">
+ <xsl:for-each select="testsuite">
+ <xsl:sort select="@name"/>
+ <!-- create an anchor to this class name -->
+ <a name="{@name}"></a>
+ <h3>TestCase <xsl:value-of select="@name"/></h3>
+
+ <table class="coverage">
+ <xsl:call-template name="testcase.test.header"/>
+ <!--
+ test can even not be started at all (failure to load the class)
+ so report the error directly
+ -->
+ <xsl:if test="./error">
+ <tr class="Error">
+ <td colspan="4"><xsl:apply-templates select="./error"/></td>
+ </tr>
+ </xsl:if>
+ <xsl:apply-templates select="./testcase" mode="print.test"/>
+ </table>
+ <p>
+ <a href="#top">Back to top</a>
+ </p>
+ </xsl:for-each>
+ </xsl:template>
+
+<xsl:template name="summary">
+ <h2>Summary</h2>
+ <xsl:variable name="testCount" select="sum(testsuite/@tests)"/>
+ <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/>
+ <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/>
+ <xsl:variable name="timeCount" select="sum(testsuite/@time)"/>
+ <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/>
+ <table class="coverage">
+ <thead>
+ <tr valign="top">
+ <td>Tests</td>
+ <td>Failures</td>
+ <td>Errors</td>
+ <td>Success rate</td>
+ <td>Time</td>
+ </tr>
+ </thead>
+ <tbody>
+ <tr valign="top">
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="$failureCount &gt; 0">Failure</xsl:when>
+ <xsl:when test="$errorCount &gt; 0">Error</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <td><xsl:value-of select="$testCount"/></td>
+ <td><xsl:value-of select="$failureCount"/></td>
+ <td><xsl:value-of select="$errorCount"/></td>
+ <td>
+ <xsl:call-template name="display-percent">
+ <xsl:with-param name="value" select="$successRate"/>
+ </xsl:call-template>
+ </td>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="$timeCount"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <p class="hint">
+ Note: <i>failures</i> are anticipated and checked for with assertions while <i>errors</i> are unanticipated.
+ </p>
+</xsl:template>
+
+<!-- Page HEADER -->
+<xsl:template name="pageHeader">
+ <div class="breadcrumb">
+ <a href="../index.html" class="el_report">JaCoCo</a> &gt;
+ <span class="el_testsuite">JUnit Test Results</span>
+ </div>
+ <h1>JUnit Test Results</h1>
+</xsl:template>
+
+<xsl:template match="testsuite" mode="header">
+ <thead>
+ <tr valign="top">
+ <td>Name</td>
+ <td>Tests</td>
+ <td>Errors</td>
+ <td>Failures</td>
+ <td nowrap="nowrap">Time(s)</td>
+ </tr>
+ </thead>
+</xsl:template>
+
+<!-- class header -->
+<xsl:template name="testsuite.test.header">
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Tests</td>
+ <td>Errors</td>
+ <td>Failures</td>
+ <td>Time(s)</td>
+ </tr>
+ </thead>
+</xsl:template>
+
+<!-- method header -->
+<xsl:template name="testcase.test.header">
+ <thead>
+ <tr>
+ <td>Name</td>
+ <td>Status</td>
+ <td>Type</td>
+ <td>Time(s)</td>
+ </tr>
+ </thead>
+</xsl:template>
+
+
+<!-- class information -->
+<xsl:template match="testsuite" mode="print.test">
+ <tr valign="top">
+ <!-- set a nice color depending if there is an error/failure -->
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="@failures[.&gt; 0]">Failure</xsl:when>
+ <xsl:when test="@errors[.&gt; 0]">Error</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+
+ <!-- print testsuite information -->
+ <td style="width:24em"><a href="#{@name}" class="el_testsuite"><xsl:value-of select="@name"/></a></td>
+ <td><xsl:value-of select="@tests"/></td>
+ <td><xsl:value-of select="@errors"/></td>
+ <td><xsl:value-of select="@failures"/></td>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="@time"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+</xsl:template>
+
+<xsl:template match="testcase" mode="print.test">
+ <tr valign="top">
+ <xsl:attribute name="class">
+ <xsl:choose>
+ <xsl:when test="failure | error">Error</xsl:when>
+ </xsl:choose>
+ </xsl:attribute>
+ <td style="width:24em"><span class="el_test"><xsl:value-of select="@name"/></span></td>
+ <xsl:choose>
+ <xsl:when test="failure">
+ <td>Failure</td>
+ <td><xsl:apply-templates select="failure"/></td>
+ </xsl:when>
+ <xsl:when test="error">
+ <td>Error</td>
+ <td><xsl:apply-templates select="error"/></td>
+ </xsl:when>
+ <xsl:otherwise>
+ <td>Success</td>
+ <td></td>
+ </xsl:otherwise>
+ </xsl:choose>
+ <td>
+ <xsl:call-template name="display-time">
+ <xsl:with-param name="value" select="@time"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+</xsl:template>
+
+
+<xsl:template match="failure">
+ <xsl:call-template name="display-failures"/>
+</xsl:template>
+
+<xsl:template match="error">
+ <xsl:call-template name="display-failures"/>
+</xsl:template>
+
+<!-- Style for the error and failure in the tescase template -->
+<xsl:template name="display-failures">
+ <xsl:choose>
+ <xsl:when test="not(@message)">N/A</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="@message"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <!-- display the stacktrace -->
+ <code>
+ <br/><br/>
+ <xsl:call-template name="br-replace">
+ <xsl:with-param name="word" select="."/>
+ </xsl:call-template>
+ </code>
+ <!-- the later is better but might be problematic for non-21" monitors... -->
+ <!--pre><xsl:value-of select="."/></pre-->
+</xsl:template>
+
+<xsl:template name="JS-escape">
+ <xsl:param name="string"/>
+ <xsl:param name="tmp1" select="stringutils:replace(string($string),'\','\\')"/>
+ <xsl:param name="tmp2" select="stringutils:replace(string($tmp1),&quot;'&quot;,&quot;\&apos;&quot;)"/>
+ <xsl:value-of select="$tmp2"/>
+</xsl:template>
+
+
+<!--
+ template that will convert a carriage return into a br tag
+ @param word the text from which to convert CR to BR tag
+-->
+<xsl:template name="br-replace">
+ <xsl:param name="word"/>
+ <xsl:value-of disable-output-escaping="yes" select='stringutils:replace(string($word),"&#xA;","&lt;br/>")'/>
+</xsl:template>
+
+<xsl:template name="display-time">
+ <xsl:param name="value"/>
+ <xsl:value-of select="format-number($value,'0.000')"/>
+</xsl:template>
+
+<xsl:template name="display-percent">
+ <xsl:param name="value"/>
+ <xsl:value-of select="format-number($value,'0.00%')"/>
+</xsl:template>
+
+</xsl:stylesheet>
diff --git a/org.jacoco.doc/xsl/maven-goal.xsl b/org.jacoco.doc/xsl/maven-goal.xsl
index 1cef056c..ae06df38 100644
--- a/org.jacoco.doc/xsl/maven-goal.xsl
+++ b/org.jacoco.doc/xsl/maven-goal.xsl
@@ -1,12 +1,13 @@
<?xml version="1.0"?>
-<!--
+<!--
Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Marc R. Hoffmann - initial API and implementation
Kyle Lieber - implementation of CheckMojo
@@ -120,7 +121,7 @@
<xsl:apply-templates />
</code>
</xsl:template>
-
+
<xsl:template match="xdoc:pre">
<pre>
<xsl:apply-templates />
@@ -169,4 +170,3 @@
</xsl:template>
</xsl:stylesheet>
-
diff --git a/org.jacoco.examples.test/about.html b/org.jacoco.examples.test/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.examples.test/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.examples.test/pom.xml b/org.jacoco.examples.test/pom.xml
index 73358642..2ebc88f3 100644
--- a/org.jacoco.examples.test/pom.xml
+++ b/org.jacoco.examples.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.examples.test/src/org/jacoco/examples/ClassInfoTest.java b/org.jacoco.examples.test/src/org/jacoco/examples/ClassInfoTest.java
index baed329d..070ed456 100644
--- a/org.jacoco.examples.test/src/org/jacoco/examples/ClassInfoTest.java
+++ b/org.jacoco.examples.test/src/org/jacoco/examples/ClassInfoTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -35,15 +36,17 @@ public class ClassInfoTest {
final String[] args = new String[] { createClassFile() };
new ClassInfo(console.stream).execute(args);
- console.expect(containsLine("class name: org/jacoco/examples/ClassInfoTest"));
+ console.expect(containsLine(
+ "class name: org/jacoco/examples/ClassInfoTest"));
console.expect(containsLine("methods: 3"));
console.expect(containsLine("branches: 2"));
console.expect(containsLine("complexity: 4"));
}
private String createClassFile() throws IOException {
- InputStream in = getClass().getResource(
- getClass().getSimpleName() + ".class").openStream();
+ InputStream in = getClass()
+ .getResource(getClass().getSimpleName() + ".class")
+ .openStream();
File f = File.createTempFile("Example", ".class");
FileOutputStream out = new FileOutputStream(f);
int b;
diff --git a/org.jacoco.examples.test/src/org/jacoco/examples/ConsoleOutput.java b/org.jacoco.examples.test/src/org/jacoco/examples/ConsoleOutput.java
index 7908116b..273d61f4 100644
--- a/org.jacoco.examples.test/src/org/jacoco/examples/ConsoleOutput.java
+++ b/org.jacoco.examples.test/src/org/jacoco/examples/ConsoleOutput.java
@@ -1,20 +1,21 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail;
-import static org.junit.matchers.JUnitMatchers.containsString;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
diff --git a/org.jacoco.examples.test/src/org/jacoco/examples/CoreTutorialTest.java b/org.jacoco.examples.test/src/org/jacoco/examples/CoreTutorialTest.java
index 462d17e2..e95f544a 100644
--- a/org.jacoco.examples.test/src/org/jacoco/examples/CoreTutorialTest.java
+++ b/org.jacoco.examples.test/src/org/jacoco/examples/CoreTutorialTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -30,9 +31,9 @@ public class CoreTutorialTest {
console.expect(containsLine("0 of 3 methods missed"));
console.expect(containsLine("1 of 5 complexity missed"));
- console.expect(containsLine("Line 46: "));
- console.expect(containsLine("Line 47: green"));
- console.expect(containsLine("Line 48: yellow"));
- console.expect(containsLine("Line 49: red"));
+ console.expect(containsLine("Line 47: "));
+ console.expect(containsLine("Line 48: green"));
+ console.expect(containsLine("Line 49: yellow"));
+ console.expect(containsLine("Line 50: red"));
}
}
diff --git a/org.jacoco.examples.test/src/org/jacoco/examples/ExecDumpTest.java b/org.jacoco.examples.test/src/org/jacoco/examples/ExecDumpTest.java
index 348b43f7..0486628e 100644
--- a/org.jacoco.examples.test/src/org/jacoco/examples/ExecDumpTest.java
+++ b/org.jacoco.examples.test/src/org/jacoco/examples/ExecDumpTest.java
@@ -1,18 +1,19 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
+import static org.hamcrest.CoreMatchers.containsString;
import static org.jacoco.examples.ConsoleOutput.containsLine;
-import static org.junit.matchers.JUnitMatchers.containsString;
import java.io.File;
import java.io.FileOutputStream;
@@ -40,9 +41,11 @@ public class ExecDumpTest {
new ExecDump(console.stream).execute(args);
console.expect(containsLine("exec file: " + file));
- console.expect(containsLine("CLASS ID HITS/PROBES CLASS NAME"));
+ console.expect(
+ containsLine("CLASS ID HITS/PROBES CLASS NAME"));
console.expect(containsString("Session \"testid\":"));
- console.expect(containsLine("0000000000001234 2 of 3 foo/MyClass"));
+ console.expect(
+ containsLine("0000000000001234 2 of 3 foo/MyClass"));
}
private String createExecFile() throws IOException {
diff --git a/org.jacoco.examples.test/src/org/jacoco/examples/MBeanClientTest.java b/org.jacoco.examples.test/src/org/jacoco/examples/MBeanClientTest.java
index dcd905de..a5aaecc3 100644
--- a/org.jacoco.examples.test/src/org/jacoco/examples/MBeanClientTest.java
+++ b/org.jacoco.examples.test/src/org/jacoco/examples/MBeanClientTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
diff --git a/org.jacoco.examples.test/src/test/resources/verify-it.bsh b/org.jacoco.examples.test/src/test/resources/verify-it.bsh
new file mode 100644
index 00000000..a53465d1
--- /dev/null
+++ b/org.jacoco.examples.test/src/test/resources/verify-it.bsh
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Mirko Friedenhagen - initial API and implementation
+ *
+ *******************************************************************************/
+File realBaseDir = new File(basedir, "../../../target/it-it/build");
+if (!new File(realBaseDir, "target/site/jacoco/index.html").exists()) {
+ throw new RuntimeException();
+}
+if (!new File(realBaseDir, "target/site/jacoco-it/index.html").exists()) {
+ throw new RuntimeException();
+}
diff --git a/org.jacoco.examples.test/src/test/resources/verify-it.groovy b/org.jacoco.examples.test/src/test/resources/verify-it.groovy
deleted file mode 100644
index a1b346aa..00000000
--- a/org.jacoco.examples.test/src/test/resources/verify-it.groovy
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mirko Friedenhagen - initial API and implementation
- *
- *******************************************************************************/
-File realBaseDir = new File(basedir, "../../../target/it-it/build");
-assert new File(realBaseDir, "target/site/jacoco/index.html").exists();
-assert new File(realBaseDir, "target/site/jacoco-it/index.html").exists();
-return true;
diff --git a/org.jacoco.examples.test/src/test/resources/verify-offline.bsh b/org.jacoco.examples.test/src/test/resources/verify-offline.bsh
new file mode 100644
index 00000000..49a098f3
--- /dev/null
+++ b/org.jacoco.examples.test/src/test/resources/verify-offline.bsh
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Mirko Friedenhagen - initial API and implementation
+ *
+ *******************************************************************************/
+import org.codehaus.plexus.util.*;
+
+File realBaseDir = new File(basedir, "../../../target/it-offline/build");
+if (!new File(realBaseDir, "target/site/jacoco/index.html").exists()) {
+ throw new RuntimeException();
+}
+if (new File(realBaseDir, "target/site/jacoco-it/index.html").exists()) {
+ throw new RuntimeException();
+}
+if (!FileUtils.fileRead(new File(realBaseDir, "build.log")).contains(":restore-instrumented-classes")) {
+ throw new RuntimeException();
+}
diff --git a/org.jacoco.examples.test/src/test/resources/verify-offline.groovy b/org.jacoco.examples.test/src/test/resources/verify-offline.groovy
deleted file mode 100644
index 0f00234b..00000000
--- a/org.jacoco.examples.test/src/test/resources/verify-offline.groovy
+++ /dev/null
@@ -1,16 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mirko Friedenhagen - initial API and implementation
- *
- *******************************************************************************/
-File realBaseDir = new File(basedir, "../../../target/it-offline/build");
-assert new File(realBaseDir, "target/site/jacoco/index.html").exists();
-assert !new File(realBaseDir, "target/site/jacoco-it/index.html").exists();
-assert new File(realBaseDir, "build.log").getText().contains(":restore-instrumented-classes");
-return true;
diff --git a/org.jacoco.examples.test/src/test/resources/verify.bsh b/org.jacoco.examples.test/src/test/resources/verify.bsh
new file mode 100644
index 00000000..793317d6
--- /dev/null
+++ b/org.jacoco.examples.test/src/test/resources/verify.bsh
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Mirko Friedenhagen - initial API and implementation
+ *
+ *******************************************************************************/
+File realBaseDir = new File(basedir, "../../../target/it/build");
+if (!new File(realBaseDir, "target/site/jacoco/index.html").exists()) {
+ throw new RuntimeException();
+}
+if (new File(realBaseDir, "target/site/jacoco-it/index.html").exists()) {
+ throw new RuntimeException();
+}
diff --git a/org.jacoco.examples.test/src/test/resources/verify.groovy b/org.jacoco.examples.test/src/test/resources/verify.groovy
deleted file mode 100644
index a181e3cf..00000000
--- a/org.jacoco.examples.test/src/test/resources/verify.groovy
+++ /dev/null
@@ -1,15 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mirko Friedenhagen - initial API and implementation
- *
- *******************************************************************************/
-File realBaseDir = new File(basedir, "../../../target/it/build");
-assert new File(realBaseDir, "target/site/jacoco/index.html").exists();
-assert !new File(realBaseDir, "target/site/jacoco-it/index.html").exists();
-return true;
diff --git a/org.jacoco.examples/about.html b/org.jacoco.examples/about.html
deleted file mode 100644
index d31112db..00000000
--- a/org.jacoco.examples/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.examples/assembly.xml b/org.jacoco.examples/assembly.xml
index d712e106..057311e7 100644
--- a/org.jacoco.examples/assembly.xml
+++ b/org.jacoco.examples/assembly.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.examples/build/build-offline.xml b/org.jacoco.examples/build/build-offline.xml
index 9a999081..fc72ee89 100644
--- a/org.jacoco.examples/build/build-offline.xml
+++ b/org.jacoco.examples/build/build-offline.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Marc R. Hoffmann - initial API and implementation
-->
<project name="Example Ant Build with JaCoCo Offline Instrumentation" default="rebuild" xmlns:jacoco="antlib:org.jacoco.ant">
-
+
<description>
Example Ant build file that demonstrates how JaCoCo can be used with
offline instrumentation. This requires preprocessing of the class files
@@ -47,11 +48,11 @@
</jacoco:instrument>
</target>
-
+
<target name="test" depends="instrument">
<!-- Step 3: Run tests with instrumented classes -->
<java classname="org.jacoco.examples.parser.Main" fork="true">
- <!-- jacocoagent.jar must be on the classpath -->
+ <!-- jacocoagent.jar must be on the classpath -->
<classpath>
<pathelement path="../../../lib/jacocoagent.jar"/>
<pathelement path="${result.classes.instr.dir}" />
diff --git a/org.jacoco.examples/build/build.xml b/org.jacoco.examples/build/build.xml
index a148b4bb..d108f8e2 100644
--- a/org.jacoco.examples/build/build.xml
+++ b/org.jacoco.examples/build/build.xml
@@ -1,18 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Marc R. Hoffmann - initial API and implementation
-->
<project name="Example Ant Build with JaCoCo" default="rebuild" xmlns:jacoco="antlib:org.jacoco.ant">
-
+
<description>
Example Ant build file that demonstrates how a JaCoCo coverage report
can be itegrated into an existing build in three simple steps.
diff --git a/org.jacoco.examples/build/pom-it.xml b/org.jacoco.examples/build/pom-it.xml
index e66ad4a2..b8623da7 100644
--- a/org.jacoco.examples/build/pom-it.xml
+++ b/org.jacoco.examples/build/pom-it.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/pom-offline.xml b/org.jacoco.examples/build/pom-offline.xml
index b008b964..4bc64e30 100644
--- a/org.jacoco.examples/build/pom-offline.xml
+++ b/org.jacoco.examples/build/pom-offline.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
diff --git a/org.jacoco.examples/build/pom.xml b/org.jacoco.examples/build/pom.xml
index 66ad9b36..8e4932bd 100644
--- a/org.jacoco.examples/build/pom.xml
+++ b/org.jacoco.examples/build/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Marc R. Hoffmann - initial API and implementation
@@ -26,7 +27,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.10</version>
+ <version>@junit.version@</version>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java
index be17f50c..5a509c74 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Add.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java
index 7676760f..cf50885a 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Const.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java
index 67c13ce7..c5071ea7 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Div.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java
index 81be56a1..b7e26d6d 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/IExpression.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java
index 6342112b..2ed3ff7e 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Mul.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java
index 5b23fcc2..78867245 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/expressions/Sub.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/ExpressionParser.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/ExpressionParser.java
index 496d860e..e1e92746 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/ExpressionParser.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/ExpressionParser.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java
index c28767d2..2eec19b9 100644
--- a/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java
+++ b/org.jacoco.examples/build/src/main/java/org/jacoco/examples/parser/Main.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java b/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java
index e446018c..732e773b 100644
--- a/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java
+++ b/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserIT.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mirko Friedenhagen - initial
diff --git a/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java b/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java
index 88b2c844..080b010a 100755
--- a/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java
+++ b/org.jacoco.examples/build/src/test/java/org/jacoco/examples/parser/ExpressionParserTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.examples/pom.xml b/org.jacoco.examples/pom.xml
index f942c770..1e35dfe1 100644
--- a/org.jacoco.examples/pom.xml
+++ b/org.jacoco.examples/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java b/org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java
index 690293ff..07f7e515 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/ClassInfo.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -31,7 +32,7 @@ public final class ClassInfo implements ICoverageVisitor {
/**
* Creates a new example instance printing to the given stream.
- *
+ *
* @param out
* stream for outputs
*/
@@ -42,7 +43,7 @@ public final class ClassInfo implements ICoverageVisitor {
/**
* Run this example with the given parameters.
- *
+ *
* @param args
* command line parameters
* @throws IOException
@@ -57,21 +58,21 @@ public final class ClassInfo implements ICoverageVisitor {
public void visitCoverage(final IClassCoverage coverage) {
out.printf("class name: %s%n", coverage.getName());
out.printf("class id: %016x%n", Long.valueOf(coverage.getId()));
- out.printf("instructions: %s%n", Integer.valueOf(coverage
- .getInstructionCounter().getTotalCount()));
+ out.printf("instructions: %s%n", Integer
+ .valueOf(coverage.getInstructionCounter().getTotalCount()));
out.printf("branches: %s%n",
Integer.valueOf(coverage.getBranchCounter().getTotalCount()));
out.printf("lines: %s%n",
Integer.valueOf(coverage.getLineCounter().getTotalCount()));
out.printf("methods: %s%n",
Integer.valueOf(coverage.getMethodCounter().getTotalCount()));
- out.printf("complexity: %s%n%n", Integer.valueOf(coverage
- .getComplexityCounter().getTotalCount()));
+ out.printf("complexity: %s%n%n", Integer
+ .valueOf(coverage.getComplexityCounter().getTotalCount()));
}
/**
* Entry point to run this examples as a Java application.
- *
+ *
* @param args
* list of program arguments
* @throws IOException
diff --git a/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java b/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java
index 708955f1..e1016851 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/CoreTutorial.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -63,7 +64,7 @@ public final class CoreTutorial {
/**
* Add a in-memory representation of a class.
- *
+ *
* @param name
* name of the class
* @param bytes
@@ -89,7 +90,7 @@ public final class CoreTutorial {
/**
* Creates a new example instance printing to the given stream.
- *
+ *
* @param out
* stream for outputs
*/
@@ -99,7 +100,7 @@ public final class CoreTutorial {
/**
* Run this example.
- *
+ *
* @throws Exception
* in case of errors
*/
@@ -189,7 +190,7 @@ public final class CoreTutorial {
/**
* Entry point to run this examples as a Java application.
- *
+ *
* @param args
* list of program arguments
* @throws Exception
diff --git a/org.jacoco.examples/src/org/jacoco/examples/ExecDump.java b/org.jacoco.examples/src/org/jacoco/examples/ExecDump.java
index 1a0342f0..76fb00d9 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/ExecDump.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/ExecDump.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -32,7 +33,7 @@ public final class ExecDump {
/**
* Creates a new example instance printing to the given stream.
- *
+ *
* @param out
* stream for outputs
*/
@@ -42,7 +43,7 @@ public final class ExecDump {
/**
* Run this example with the given parameters.
- *
+ *
* @param args
* command line parameters
* @throws IOException
@@ -62,8 +63,8 @@ public final class ExecDump {
final ExecutionDataReader reader = new ExecutionDataReader(in);
reader.setSessionInfoVisitor(new ISessionInfoVisitor() {
public void visitSessionInfo(final SessionInfo info) {
- out.printf("Session \"%s\": %s - %s%n", info.getId(), new Date(
- info.getStartTimeStamp()),
+ out.printf("Session \"%s\": %s - %s%n", info.getId(),
+ new Date(info.getStartTimeStamp()),
new Date(info.getDumpTimeStamp()));
}
});
@@ -93,7 +94,7 @@ public final class ExecDump {
/**
* Entry point to run this examples as a Java application.
- *
+ *
* @param args
* list of program arguments
* @throws IOException
diff --git a/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java b/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java
index 0db3f598..bafdbe63 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataClient.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -35,7 +36,7 @@ public final class ExecutionDataClient {
/**
* Starts the execution data request.
- *
+ *
* @param args
* @throws IOException
*/
diff --git a/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataServer.java b/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataServer.java
index 9fb2dcdd..187a6eb1 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataServer.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/ExecutionDataServer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -40,7 +41,7 @@ public final class ExecutionDataServer {
/**
* Start the server as a standalone program.
- *
+ *
* @param args
* @throws IOException
*/
@@ -55,8 +56,8 @@ public final class ExecutionDataServer {
}
}
- private static class Handler implements Runnable, ISessionInfoVisitor,
- IExecutionDataVisitor {
+ private static class Handler
+ implements Runnable, ISessionInfoVisitor, IExecutionDataVisitor {
private final Socket socket;
diff --git a/org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java b/org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java
index c45becec..8abedc46 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/MBeanClient.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -33,7 +34,7 @@ public final class MBeanClient {
/**
* Execute the example.
- *
+ *
* @param args
* @throws Exception
*/
@@ -45,8 +46,9 @@ public final class MBeanClient {
.getMBeanServerConnection();
final IProxy proxy = (IProxy) MBeanServerInvocationHandler
- .newProxyInstance(connection, new ObjectName(
- "org.jacoco:type=Runtime"), IProxy.class, false);
+ .newProxyInstance(connection,
+ new ObjectName("org.jacoco:type=Runtime"), IProxy.class,
+ false);
// Retrieve JaCoCo version and session id:
System.out.println("Version: " + proxy.getVersion());
diff --git a/org.jacoco.examples/src/org/jacoco/examples/ReportGenerator.java b/org.jacoco.examples/src/org/jacoco/examples/ReportGenerator.java
index 13a97069..b785da82 100644
--- a/org.jacoco.examples/src/org/jacoco/examples/ReportGenerator.java
+++ b/org.jacoco.examples/src/org/jacoco/examples/ReportGenerator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.examples;
@@ -27,7 +28,7 @@ import org.jacoco.report.html.HTMLFormatter;
* This example creates a HTML report for eclipse like projects based on a
* single execution data store called jacoco.exec. The report contains no
* grouping information.
- *
+ *
* The class files under test must be compiled with debug information, otherwise
* source highlighting will not work.
*/
@@ -44,7 +45,7 @@ public class ReportGenerator {
/**
* Create a new generator based for the given project.
- *
+ *
* @param projectDirectory
*/
public ReportGenerator(final File projectDirectory) {
@@ -57,7 +58,7 @@ public class ReportGenerator {
/**
* Create the report.
- *
+ *
* @throws IOException
*/
public void create() throws IOException {
@@ -95,8 +96,8 @@ public class ReportGenerator {
// Populate the report structure with the bundle coverage information.
// Call visitGroup if you need groups in your report.
- visitor.visitBundle(bundleCoverage, new DirectorySourceFileLocator(
- sourceDirectory, "utf-8", 4));
+ visitor.visitBundle(bundleCoverage,
+ new DirectorySourceFileLocator(sourceDirectory, "utf-8", 4));
// Signal end of structure information to allow report to write all
// information out
@@ -121,7 +122,7 @@ public class ReportGenerator {
/**
* Starts the report generation process
- *
+ *
* @param args
* Arguments to the application. This will be the location of the
* eclipse projects that will be used to generate reports for
@@ -129,8 +130,8 @@ public class ReportGenerator {
*/
public static void main(final String[] args) throws IOException {
for (int i = 0; i < args.length; i++) {
- final ReportGenerator generator = new ReportGenerator(new File(
- args[i]));
+ final ReportGenerator generator = new ReportGenerator(
+ new File(args[i]));
generator.create();
}
}
diff --git a/org.jacoco.report.test/about.html b/org.jacoco.report.test/about.html
deleted file mode 100644
index 971d897c..00000000
--- a/org.jacoco.report.test/about.html
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
-<head>
-<title>About</title>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>
- @build.date@
-</p>
-
-<h3>License</h3>
-
-<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
- KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.
-</p>
-
-<h3>Third Party Content</h3>
-
-<p>
- The Content includes items that have been sourced from third parties as set
- out below.
-</p>
-
-<h4>XHTML 1.0 DTD</h4>
-
-<p>
- This plug-in contains the
- <a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">XHTML 1.0 DTD</a>
- which is subject to the terms and conditions of the following license:
-</p>
-
-<p>
- <b>W3C<sup>&reg;</sup> SOFTWARE NOTICE AND LICENSE</b><br/>
- <a href="http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231">http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231</a>
-</p>
-
-<p>This work (and included software, documentation such as READMEs, or other
-related items) is being provided by the copyright holders under the following
-license. By obtaining, using and/or copying this work, you (the licensee)
-agree that you have read, understood, and will comply with the following
-terms and conditions.</p>
-
-<p>Permission to copy, modify, and distribute this software and its
-documentation, with or without modification,&nbsp;for any purpose and without
-fee or royalty is hereby granted, provided that you include the following on
-ALL copies of the software and documentation or portions thereof, including
-modifications:</p>
-<ol>
- <li>The full text of this NOTICE in a location viewable to users of the
- redistributed or derivative work.</li>
- <li>Any pre-existing intellectual property disclaimers, notices, or terms
- and conditions. If none exist, the <a
- href="copyright-software-short-notice-20021231.html">W3C Software Short
- Notice</a> should be included (hypertext is preferred, text is permitted)
- within the body of any redistributed or derivative code.</li>
-
- <li>Notice of any changes or modifications to the files, including the date
- changes were made. (We recommend you provide URIs to the location from
- which the code is derived.)</li>
-</ol>
-
-<p>THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
-MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
-LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
-PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
-ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.</p>
-
-<p>COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
-DOCUMENTATION.</p>
-
-<p>The name and trademarks of copyright holders may NOT be used in
-advertising or publicity pertaining to the software without specific, written
-prior permission. Title to copyright in this software and any associated
-documentation will at all times remain with copyright holders.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/org.jacoco.report.test/pom.xml b/org.jacoco.report.test/pom.xml
index 64c0cfa0..478e9e2f 100644
--- a/org.jacoco.report.test/pom.xml
+++ b/org.jacoco.report.test/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.tests</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.tests</relativePath>
</parent>
diff --git a/org.jacoco.report.test/src/org/jacoco/report/DirectorySourceFileLocatorTest.java b/org.jacoco.report.test/src/org/jacoco/report/DirectorySourceFileLocatorTest.java
index a93e5c3a..b8eea850 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/DirectorySourceFileLocatorTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/DirectorySourceFileLocatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -45,13 +46,24 @@ public class DirectorySourceFileLocatorTest {
}
@Test
- public void testGetSourceFileNegative() throws IOException {
+ public void getSourceFile_should_return_null_when_source_does_not_exist()
+ throws IOException {
assertNull(locator.getSourceFile("org/jacoco/example",
"DoesNotExist.java"));
}
@Test
- public void testGetSourceFile() throws IOException {
+ public void getSourceFile_should_return_null_when_source_is_folder()
+ throws IOException {
+ final File file = new File(sourceFolder.getRoot(),
+ "org/jacoco/example");
+ file.mkdirs();
+ assertNull(locator.getSourceFile("org/jacoco", "example"));
+ }
+
+ @Test
+ public void getSourceFile_should_return_content_when_file_exists()
+ throws IOException {
createFile("org/jacoco/example/Test.java");
final Reader source = locator.getSourceFile("org/jacoco/example",
"Test.java");
@@ -61,8 +73,8 @@ public class DirectorySourceFileLocatorTest {
private void createFile(String path) throws IOException {
final File file = new File(sourceFolder.getRoot(), path);
file.getParentFile().mkdirs();
- final Writer writer = new OutputStreamWriter(
- new FileOutputStream(file), "UTF-8");
+ final Writer writer = new OutputStreamWriter(new FileOutputStream(file),
+ "UTF-8");
writer.write("Source");
writer.close();
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/FileMultiReportOutputTest.java b/org.jacoco.report.test/src/org/jacoco/report/FileMultiReportOutputTest.java
index c78df555..7e1409b5 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/FileMultiReportOutputTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/FileMultiReportOutputTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -42,8 +43,8 @@ public class FileMultiReportOutputTest {
stream.close();
output.close();
- final InputStream actual = new FileInputStream(new File(
- folder.getRoot(), "a/b/c/test"));
+ final InputStream actual = new FileInputStream(
+ new File(folder.getRoot(), "a/b/c/test"));
assertEquals(1, actual.read());
assertEquals(2, actual.read());
assertEquals(3, actual.read());
diff --git a/org.jacoco.report.test/src/org/jacoco/report/InputStreamSourceFileLocatorTest.java b/org.jacoco.report.test/src/org/jacoco/report/InputStreamSourceFileLocatorTest.java
index 2225d6d7..394ae928 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/InputStreamSourceFileLocatorTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/InputStreamSourceFileLocatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/JavaNamesTest.java b/org.jacoco.report.test/src/org/jacoco/report/JavaNamesTest.java
index 8c9e4a2b..64692e1c 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/JavaNamesTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/JavaNamesTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -63,9 +64,9 @@ public class JavaNamesTest {
@Test
public void testGetClassName5() {
- assertEquals("Bar.new ISample() {...}", names.getClassName(
- "com/foo/Bar$1", null, "java/lang/Object",
- new String[] { "org/foo/ISample" }));
+ assertEquals("Bar.new ISample() {...}",
+ names.getClassName("com/foo/Bar$1", null, "java/lang/Object",
+ new String[] { "org/foo/ISample" }));
}
@Test
@@ -142,9 +143,9 @@ public class JavaNamesTest {
@Test
public void testGetMethodName8() {
- assertEquals("update(Map.Entry)", names.getMethodName(
- "com/example/SomeClass", "update", "(Ljava/util/Map$Entry;)V",
- null));
+ assertEquals("update(Map.Entry)",
+ names.getMethodName("com/example/SomeClass", "update",
+ "(Ljava/util/Map$Entry;)V", null));
}
@Test
diff --git a/org.jacoco.report.test/src/org/jacoco/report/MemoryMultiReportOutput.java b/org.jacoco.report.test/src/org/jacoco/report/MemoryMultiReportOutput.java
index e687db17..1af76cc8 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/MemoryMultiReportOutput.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/MemoryMultiReportOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java b/org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java
index d099babf..39a10377 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/MemoryOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/MultiReportVisitorTest.java b/org.jacoco.report.test/src/org/jacoco/report/MultiReportVisitorTest.java
index 9f532282..54e6e863 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/MultiReportVisitorTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/MultiReportVisitorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -33,8 +34,8 @@ import org.junit.Test;
*/
public class MultiReportVisitorTest {
- private static class MockVisitor extends MockGroupVisitor implements
- IReportVisitor {
+ private static class MockVisitor extends MockGroupVisitor
+ implements IReportVisitor {
MockVisitor() {
super("Report");
diff --git a/org.jacoco.report.test/src/org/jacoco/report/MultiSourceFileLocatorTest.java b/org.jacoco.report.test/src/org/jacoco/report/MultiSourceFileLocatorTest.java
index f91e1a44..f2090d50 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/MultiSourceFileLocatorTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/MultiSourceFileLocatorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/ReportStructureTestDriver.java b/org.jacoco.report.test/src/org/jacoco/report/ReportStructureTestDriver.java
index d2aace0a..56295d81 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/ReportStructureTestDriver.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/ReportStructureTestDriver.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -47,7 +48,7 @@ public class ReportStructureTestDriver {
public Reader getSourceFile(String packageName, String fileName)
throws IOException {
- return new StringReader("");
+ return new StringReader("");
}
public int getTabWidth() {
diff --git a/org.jacoco.report.test/src/org/jacoco/report/ZipMultiReportOutputTest.java b/org.jacoco.report.test/src/org/jacoco/report/ZipMultiReportOutputTest.java
index 388ddce4..0ad5c4cf 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/ZipMultiReportOutputTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/ZipMultiReportOutputTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -108,8 +109,9 @@ public class ZipMultiReportOutputTest {
final Map<String, byte[]> entries = readEntries();
assertEquals(
- new HashSet<String>(Arrays.asList("dir/index.html",
- "readme.txt")), entries.keySet());
+ new HashSet<String>(
+ Arrays.asList("dir/index.html", "readme.txt")),
+ entries.keySet());
assertArrayEquals(content1, entries.get("dir/index.html"));
assertArrayEquals(content2, entries.get("readme.txt"));
}
@@ -130,8 +132,9 @@ public class ZipMultiReportOutputTest {
final Map<String, byte[]> entries = readEntries();
assertEquals(
- new HashSet<String>(Arrays.asList("dir/index.html",
- "readme.txt")), entries.keySet());
+ new HashSet<String>(
+ Arrays.asList("dir/index.html", "readme.txt")),
+ entries.keySet());
assertArrayEquals(content1, entries.get("dir/index.html"));
assertArrayEquals(content2, entries.get("readme.txt"));
}
@@ -183,8 +186,8 @@ public class ZipMultiReportOutputTest {
while ((b = input.read()) != -1) {
entryBuffer.write(b);
}
- byte[] old = entries
- .put(entry.getName(), entryBuffer.toByteArray());
+ byte[] old = entries.put(entry.getName(),
+ entryBuffer.toByteArray());
assertNull("Duplicate entry " + entry.getName(), old);
}
return entries;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/check/BundleCheckerTest.java b/org.jacoco.report.test/src/org/jacoco/report/check/BundleCheckerTest.java
index 0761f743..22672716 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/check/BundleCheckerTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/check/BundleCheckerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -55,7 +56,8 @@ public class BundleCheckerTest implements IViolationsOutput {
addRule(ElementType.BUNDLE);
final BundleChecker checker = new BundleChecker(rules, names, this);
checker.checkBundle(createBundle());
- assertMessage("Rule violated for bundle Test: instructions covered ratio is 0.50, but expected minimum is 0.75");
+ assertMessage(
+ "Rule violated for bundle Test: instructions covered ratio is 0.50, but expected minimum is 0.75");
}
@Test
@@ -63,7 +65,8 @@ public class BundleCheckerTest implements IViolationsOutput {
addRule(ElementType.PACKAGE);
final BundleChecker checker = new BundleChecker(rules, names, this);
checker.checkBundle(createBundle());
- assertMessage("Rule violated for package org.jacoco.example: instructions covered ratio is 0.50, but expected minimum is 0.75");
+ assertMessage(
+ "Rule violated for package org.jacoco.example: instructions covered ratio is 0.50, but expected minimum is 0.75");
}
@Test
@@ -71,7 +74,8 @@ public class BundleCheckerTest implements IViolationsOutput {
addRule(ElementType.SOURCEFILE);
final BundleChecker checker = new BundleChecker(rules, names, this);
checker.checkBundle(createBundle());
- assertMessage("Rule violated for source file org/jacoco/example/FooClass.java: instructions covered ratio is 0.50, but expected minimum is 0.75");
+ assertMessage(
+ "Rule violated for source file org/jacoco/example/FooClass.java: instructions covered ratio is 0.50, but expected minimum is 0.75");
}
@Test
@@ -79,7 +83,8 @@ public class BundleCheckerTest implements IViolationsOutput {
addRule(ElementType.CLASS);
final BundleChecker checker = new BundleChecker(rules, names, this);
checker.checkBundle(createBundle());
- assertMessage("Rule violated for class org.jacoco.example.FooClass: instructions covered ratio is 0.50, but expected minimum is 0.75");
+ assertMessage(
+ "Rule violated for class org.jacoco.example.FooClass: instructions covered ratio is 0.50, but expected minimum is 0.75");
}
@Test
@@ -87,7 +92,8 @@ public class BundleCheckerTest implements IViolationsOutput {
addRule(ElementType.METHOD);
final BundleChecker checker = new BundleChecker(rules, names, this);
checker.checkBundle(createBundle());
- assertMessage("Rule violated for method org.jacoco.example.FooClass.fooMethod(): instructions covered ratio is 0.50, but expected minimum is 0.75");
+ assertMessage(
+ "Rule violated for method org.jacoco.example.FooClass.fooMethod(): instructions covered ratio is 0.50, but expected minimum is 0.75");
}
@Test
diff --git a/org.jacoco.report.test/src/org/jacoco/report/check/LimitTest.java b/org.jacoco.report.test/src/org/jacoco/report/check/LimitTest.java
index 07ecdc23..eb7882a5 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/check/LimitTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/check/LimitTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -34,15 +35,19 @@ public class LimitTest {
}
@Test
- public void testDefaults() {
+ public void default_should_define_no_limits() {
assertNull(limit.getMinimum());
assertNull(limit.getMaximum());
+ }
+
+ @Test
+ public void default_should_check_coverageratio_on_instructions() {
assertEquals(CounterEntity.INSTRUCTION, limit.getEntity());
assertEquals(CounterValue.COVEREDRATIO, limit.getValue());
}
@Test
- public void testTotalCount() {
+ public void check_should_fail_on_value_totalcount() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setMaximum("-1");
assertEquals(CounterValue.TOTALCOUNT, limit.getValue());
@@ -52,7 +57,7 @@ public class LimitTest {
}
@Test
- public void testMissedCount() {
+ public void check_should_fail_on_value_missedcount() {
limit.setValue(CounterValue.MISSEDCOUNT.name());
limit.setMaximum("-1");
assertEquals(CounterValue.MISSEDCOUNT, limit.getValue());
@@ -62,7 +67,7 @@ public class LimitTest {
}
@Test
- public void testCoveredCount() {
+ public void check_should_fail_on_value_coveredcount() {
limit.setValue(CounterValue.COVEREDCOUNT.name());
limit.setMaximum("-1");
assertEquals(CounterValue.COVEREDCOUNT, limit.getValue());
@@ -72,35 +77,35 @@ public class LimitTest {
}
@Test
- public void testMissedRatio() {
+ public void check_should_fail_on_value_missedratio() {
limit.setValue(CounterValue.MISSEDRATIO.name());
- limit.setMaximum("-1");
+ limit.setMaximum("0.5");
assertEquals(CounterValue.MISSEDRATIO, limit.getValue());
assertEquals(
- "instructions missed ratio is 0, but expected maximum is -1",
+ "instructions missed ratio is 1.0, but expected maximum is 0.5",
limit.check(new TestNode() {
{
- instructionCounter = CounterImpl.COUNTER_0_1;
+ instructionCounter = CounterImpl.COUNTER_1_0;
}
}));
}
@Test
- public void testCoveredRatio() {
+ public void check_should_fail_on_value_coveredratio() {
limit.setValue(CounterValue.COVEREDRATIO.name());
- limit.setMaximum("-1");
+ limit.setMaximum("0.5");
assertEquals(CounterValue.COVEREDRATIO, limit.getValue());
assertEquals(
- "instructions covered ratio is 0, but expected maximum is -1",
+ "instructions covered ratio is 1.0, but expected maximum is 0.5",
limit.check(new TestNode() {
{
- instructionCounter = CounterImpl.COUNTER_1_0;
+ instructionCounter = CounterImpl.COUNTER_0_1;
}
}));
}
@Test
- public void testInstruction() {
+ public void check_should_fail_on_counter_instruction() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.INSTRUCTION.name());
limit.setMaximum("-1");
@@ -111,7 +116,7 @@ public class LimitTest {
}
@Test
- public void testBranch() {
+ public void check_should_fail_on_check_counter_branch() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.BRANCH.name());
limit.setMaximum("-1");
@@ -121,7 +126,7 @@ public class LimitTest {
}
@Test
- public void testLine() {
+ public void check_should_fail_on_counter_line() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.LINE.name());
limit.setMaximum("-1");
@@ -131,7 +136,7 @@ public class LimitTest {
}
@Test
- public void testComlexity() {
+ public void check_should_fail_on_counter_complexity() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.COMPLEXITY.name());
limit.setMaximum("-1");
@@ -141,7 +146,7 @@ public class LimitTest {
}
@Test
- public void testClass() {
+ public void check_should_fail_on_counter_class() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.CLASS.name());
limit.setMaximum("-1");
@@ -151,7 +156,7 @@ public class LimitTest {
}
@Test
- public void testMethod() {
+ public void check_should_fail_on_counter_method() {
limit.setValue(CounterValue.TOTALCOUNT.name());
limit.setCounter(CounterEntity.METHOD.name());
limit.setMaximum("-1");
@@ -161,7 +166,7 @@ public class LimitTest {
}
@Test
- public void testNoRatio() {
+ public void check_should_pass_with_NaN_ratio() {
assertNull(limit.check(new TestNode() {
{
instructionCounter = CounterImpl.COUNTER_0_0;
@@ -170,7 +175,7 @@ public class LimitTest {
}
@Test
- public void testNoLimits() {
+ public void check_should_pass_when_no_limits_given() {
assertNull(limit.check(new TestNode() {
{
instructionCounter = CounterImpl.getInstance(1000, 0);
@@ -179,14 +184,14 @@ public class LimitTest {
}
@Test
- public void testMin0() {
+ public void setMinimum_should_allow_null() {
limit.setMinimum("0");
limit.setMinimum((String) null);
assertNull(limit.getMinimum());
}
@Test
- public void testMin1() {
+ public void check_should_pass_when_minimum_is_fulfilled() {
limit.setMinimum("0.35");
assertEquals("0.35", limit.getMinimum());
assertNull(limit.check(new TestNode() {
@@ -197,18 +202,7 @@ public class LimitTest {
}
@Test
- public void testMin2() {
- limit.setMinimum("0.35");
- assertEquals("0.35", limit.getMinimum());
- assertNull(limit.check(new TestNode() {
- {
- instructionCounter = CounterImpl.getInstance(64, 36);
- }
- }));
- }
-
- @Test
- public void testMin3() {
+ public void check_should_fail_when_minimum_is_not_met() {
limit.setMinimum("0.3500");
assertEquals("0.3500", limit.getMinimum());
assertEquals(
@@ -221,7 +215,7 @@ public class LimitTest {
}
@Test
- public void testMin4() {
+ public void check_should_report_actual_ratio_rounded_down_when_minimum_is_not_met() {
limit.setMinimum("0.35");
assertEquals("0.35", limit.getMinimum());
assertEquals(
@@ -235,7 +229,7 @@ public class LimitTest {
}
@Test
- public void testMin5() {
+ public void check_should_report_counter_with_given_precision() {
limit.setMinimum("10000");
limit.setValue(CounterValue.MISSEDCOUNT.name());
assertEquals("10000", limit.getMinimum());
@@ -249,20 +243,25 @@ public class LimitTest {
}
@Test
- public void testMin6() {
- limit.setMinimum("12345");
- assertEquals("12345", limit.getMinimum());
+ public void check_should_fail_when_minimum_ratio_is_smaller_than_0() {
+ limit.setMinimum("-3");
+ assertEquals("-3", limit.getMinimum());
assertEquals(
- "instructions covered ratio is 0, but expected minimum is 12345",
- limit.check(new TestNode() {
- {
- instructionCounter = CounterImpl.getInstance(1, 999);
- }
- }));
+ "given minimum ratio is -3, but must be between 0.0 and 1.0",
+ limit.check(new TestNode()));
+ }
+
+ @Test
+ public void check_should_fail_when_minimum_ratio_is_bigger_than_1() {
+ limit.setMinimum("80");
+ assertEquals("80", limit.getMinimum());
+ assertEquals(
+ "given minimum ratio is 80, but must be between 0.0 and 1.0",
+ limit.check(new TestNode()));
}
@Test
- public void testMinPercent() {
+ public void setMinimum_should_accept_percentage_string() {
limit.setMinimum("1.55%");
assertEquals("0.0155", limit.getMinimum());
@@ -277,14 +276,14 @@ public class LimitTest {
}
@Test
- public void testMax0() {
+ public void setMaximum_should_allow_null() {
limit.setMaximum("0");
limit.setMaximum((String) null);
assertNull(limit.getMaximum());
}
@Test
- public void testMax1() {
+ public void check_should_pass_when_maximum_counter_is_fulfilled() {
limit.setMaximum("12345678");
limit.setValue(CounterValue.MISSEDCOUNT.name());
assertEquals("12345678", limit.getMaximum());
@@ -296,7 +295,7 @@ public class LimitTest {
}
@Test
- public void testMax2() {
+ public void check_should_pass_when_maximum_ratio_is_fulfilled() {
limit.setMaximum("0.999");
assertEquals("0.999", limit.getMaximum());
assertNull(limit.check(new TestNode() {
@@ -307,7 +306,7 @@ public class LimitTest {
}
@Test
- public void testMax3() {
+ public void check_should_fail_when_maximum_is_not_met() {
limit.setMaximum("0.999");
assertEquals("0.999", limit.getMaximum());
assertEquals(
@@ -320,7 +319,7 @@ public class LimitTest {
}
@Test
- public void testMax4() {
+ public void check_should_report_actual_ratio_rounded_up_when_maximum_is_not_met() {
limit.setMaximum("0.999");
assertEquals("0.999", limit.getMaximum());
assertEquals(
@@ -334,7 +333,25 @@ public class LimitTest {
}
@Test
- public void testMaxPercent() {
+ public void check_should_fail_when_maximum_ratio_is_smaller_than_0() {
+ limit.setMaximum("-3");
+ assertEquals("-3", limit.getMaximum());
+ assertEquals(
+ "given maximum ratio is -3, but must be between 0.0 and 1.0",
+ limit.check(new TestNode()));
+ }
+
+ @Test
+ public void check_should_fail_when_maximum_ratio_is_bigger_than_1() {
+ limit.setMaximum("80");
+ assertEquals("80", limit.getMaximum());
+ assertEquals(
+ "given maximum ratio is 80, but must be between 0.0 and 1.0",
+ limit.check(new TestNode()));
+ }
+
+ @Test
+ public void setMaximum_should_accept_percentage_string() {
limit.setMaximum("1.55%");
assertEquals("0.0155", limit.getMaximum());
diff --git a/org.jacoco.report.test/src/org/jacoco/report/check/RuleTest.java b/org.jacoco.report.test/src/org/jacoco/report/check/RuleTest.java
index 076bfdef..a8c53eda 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/check/RuleTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/check/RuleTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/check/RulesCheckerTest.java b/org.jacoco.report.test/src/org/jacoco/report/check/RulesCheckerTest.java
index de4cd8ad..fe354d23 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/check/RulesCheckerTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/check/RulesCheckerTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -50,8 +51,8 @@ public class RulesCheckerTest implements IViolationsOutput {
limit.setMaximum("5");
checker.setRules(Arrays.asList(rule));
driver.sendGroup(checker.createVisitor(this));
- assertEquals(
- Arrays.asList("Rule violated for bundle bundle: instructions missed count is 10, but expected maximum is 5"),
+ assertEquals(Arrays.asList(
+ "Rule violated for bundle bundle: instructions missed count is 10, but expected maximum is 5"),
messages);
}
@@ -78,8 +79,8 @@ public class RulesCheckerTest implements IViolationsOutput {
return null;
}
- public String getMethodName(String vmclassname,
- String vmmethodname, String vmdesc, String vmsignature) {
+ public String getMethodName(String vmclassname, String vmmethodname,
+ String vmdesc, String vmsignature) {
return null;
}
@@ -90,8 +91,8 @@ public class RulesCheckerTest implements IViolationsOutput {
});
driver.sendGroup(checker.createVisitor(this));
- assertEquals(
- Arrays.asList("Rule violated for class MyClass: instructions missed count is 10, but expected maximum is 5"),
+ assertEquals(Arrays.asList(
+ "Rule violated for class MyClass: instructions missed count is 10, but expected maximum is 5"),
messages);
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/csv/CSVFormatterTest.java b/org.jacoco.report.test/src/org/jacoco/report/csv/CSVFormatterTest.java
index 8b16200d..5e14b237 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/csv/CSVFormatterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/csv/CSVFormatterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -116,8 +117,8 @@ public class CSVFormatterTest {
return null;
}
- public String getMethodName(String vmclassname,
- String vmmethodname, String vmdesc, String vmsignature) {
+ public String getMethodName(String vmclassname, String vmmethodname,
+ String vmdesc, String vmsignature) {
return null;
}
@@ -136,8 +137,8 @@ public class CSVFormatterTest {
}
private List<String> getLines(String encoding) throws IOException {
- final BufferedReader reader = new BufferedReader(new InputStreamReader(
- output.getContentsAsStream(), encoding));
+ final BufferedReader reader = new BufferedReader(
+ new InputStreamReader(output.getContentsAsStream(), encoding));
final List<String> lines = new ArrayList<String>();
String line;
while ((line = reader.readLine()) != null) {
diff --git a/org.jacoco.report.test/src/org/jacoco/report/csv/CSVGroupHandlerTest.java b/org.jacoco.report.test/src/org/jacoco/report/csv/CSVGroupHandlerTest.java
index 4e7a1476..08d47d91 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/csv/CSVGroupHandlerTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/csv/CSVGroupHandlerTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -48,8 +49,7 @@ public class CSVGroupHandlerTest {
driver.sendBundle(handler);
final BufferedReader reader = getResultReader();
reader.readLine();
- assertEquals(
- "bundle,org.jacoco.example,FooClass,10,15,1,2,0,3,1,2,0,1",
+ assertEquals("bundle,org.jacoco.example,FooClass,10,15,1,2,0,3,1,2,0,1",
reader.readLine());
assertEquals("no more lines expected", null, reader.readLine());
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/csv/ClassRowWriterTest.java b/org.jacoco.report.test/src/org/jacoco/report/csv/ClassRowWriterTest.java
index e231be45..ac05a2ab 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/csv/ClassRowWriterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/csv/ClassRowWriterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -49,8 +50,8 @@ public class ClassRowWriterTest {
throw new AssertionError();
}
- public String getMethodName(String vmclassname,
- String vmmethodname, String vmdesc, String vmsignature) {
+ public String getMethodName(String vmclassname, String vmmethodname,
+ String vmdesc, String vmsignature) {
throw new AssertionError();
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/csv/DelimitedWriterTest.java b/org.jacoco.report.test/src/org/jacoco/report/csv/DelimitedWriterTest.java
index a45f5067..d09f33ca 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/csv/DelimitedWriterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/csv/DelimitedWriterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/html/HTMLFormatterTest.java b/org.jacoco.report.test/src/org/jacoco/report/html/HTMLFormatterTest.java
index a26c9095..234f0fcd 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/html/HTMLFormatterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/html/HTMLFormatterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.html;
@@ -134,8 +135,8 @@ public class HTMLFormatterTest {
return null;
}
- public String getMethodName(String vmclassname,
- String vmmethodname, String vmdesc, String vmsignature) {
+ public String getMethodName(String vmclassname, String vmmethodname,
+ String vmdesc, String vmsignature) {
return null;
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/NormalizedFileNamesTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/NormalizedFileNamesTest.java
index c0396d8e..658002b8 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/NormalizedFileNamesTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/NormalizedFileNamesTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/ReportOutputFolderTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/ReportOutputFolderTest.java
index 905fe646..7e88b233 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/ReportOutputFolderTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/ReportOutputFolderTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal;
@@ -86,7 +87,8 @@ public class ReportOutputFolderTest {
public void testRelativeLinkInSibling1() throws IOException {
final ReportOutputFolder folder = root.subFolder("f1").subFolder("f2");
final ReportOutputFolder base = root.subFolder("g1").subFolder("g2");
- assertEquals("../../f1/f2/test.html", folder.getLink(base, "test.html"));
+ assertEquals("../../f1/f2/test.html",
+ folder.getLink(base, "test.html"));
}
@Test
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLElementTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLElementTest.java
index 89a04ec9..d60c9129 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLElementTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLElementTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java
index ae3a2976..02ad3d72 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/HTMLSupport.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/LinkableStub.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/LinkableStub.java
index b80b5acb..243d9395 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/LinkableStub.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/LinkableStub.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/BundlePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/BundlePageTest.java
index 716249cf..d5c5f3c2 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/BundlePageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/BundlePageTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Evgeny Mandrikov - initial API and implementation
@@ -11,6 +12,11 @@
*******************************************************************************/
package org.jacoco.report.internal.html.page;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Arrays;
+import java.util.Collections;
+
import org.jacoco.core.analysis.IBundleCoverage;
import org.jacoco.core.analysis.IClassCoverage;
import org.jacoco.core.analysis.IPackageCoverage;
@@ -24,11 +30,6 @@ import org.junit.Before;
import org.junit.Test;
import org.w3c.dom.Document;
-import java.util.Arrays;
-import java.util.Collections;
-
-import static org.junit.Assert.assertEquals;
-
/**
* Unit tests for {@link BundlePage}.
*/
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ClassPageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ClassPageTest.java
index 732d1c0e..1b3946f9 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ClassPageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ClassPageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/MethodItemTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/MethodItemTest.java
index e9a030eb..1d3e1ef5 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/MethodItemTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/MethodItemTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -60,14 +61,16 @@ public class MethodItemTest {
@Test
public void testGetLink() {
- final MethodItem item = new MethodItem(node, "test()", new SourceLink());
+ final MethodItem item = new MethodItem(node, "test()",
+ new SourceLink());
assertEquals("../Source.java", item.getLink(null));
}
@Test
public void testGetLinkWithLine() {
node.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 15);
- final MethodItem item = new MethodItem(node, "test()", new SourceLink());
+ final MethodItem item = new MethodItem(node, "test()",
+ new SourceLink());
assertEquals("../Source.java#L15", item.getLink(null));
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java
index 65affac6..f69e7267 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/NodePageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackagePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackagePageTest.java
index 828f5f51..6a761f1f 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackagePageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackagePageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -116,12 +117,12 @@ public class PackagePageTest extends PageTestBase {
support.findStr(doc, "/html/body/div[1]/span[1]/a"));
assertEquals("el_class", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[1]/a/@class"));
- assertEquals("Foo1",
- support.findStr(doc, "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
+ assertEquals("Foo1", support.findStr(doc,
+ "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
assertEquals("el_class", support.findStr(doc,
"/html/body/table[1]/tbody/tr[2]/td[1]/a/@class"));
- assertEquals("Foo2",
- support.findStr(doc, "/html/body/table[1]/tbody/tr[2]/td[1]/a"));
+ assertEquals("Foo2", support.findStr(doc,
+ "/html/body/table[1]/tbody/tr[2]/td[1]/a"));
output.assertFile("index.source.html");
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackageSourcePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackageSourcePageTest.java
index 96db3a59..860475a3 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackageSourcePageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PackageSourcePageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -51,15 +52,13 @@ public class PackageSourcePageTest extends PageTestBase {
super.setup();
SourceFileCoverageImpl src1 = new SourceFileCoverageImpl("Src1.java",
"org/jacoco/example");
- src1.increment(CounterImpl.COUNTER_1_0,
- CounterImpl.COUNTER_0_0, 1);
+ src1.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 1);
SourceFileCoverageImpl src2 = new SourceFileCoverageImpl("Src2.java",
"org/jacoco/example");
- src2.increment(CounterImpl.COUNTER_1_0,
- CounterImpl.COUNTER_0_0, 1);
+ src2.increment(CounterImpl.COUNTER_1_0, CounterImpl.COUNTER_0_0, 1);
node = new PackageCoverageImpl("org/jacoco/example",
- Collections.<IClassCoverage> emptyList(), Arrays.<ISourceFileCoverage>asList(src1,
- src2));
+ Collections.<IClassCoverage> emptyList(),
+ Arrays.<ISourceFileCoverage> asList(src1, src2));
sourceLocator = new ISourceFileLocator() {
public int getTabWidth() {
@@ -105,8 +104,8 @@ public class PackageSourcePageTest extends PageTestBase {
support.findStr(doc, "/html/body/div[1]/span[1]/a"));
assertEquals("el_source", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[1]/a/@class"));
- assertEquals("Src1.java",
- support.findStr(doc, "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
+ assertEquals("Src1.java", support.findStr(doc,
+ "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
assertEquals("el_source", support.findStr(doc,
"/html/body/table[1]/tbody/tr[2]/td[1]/span/@class"));
assertEquals("Src2.java", support.findStr(doc,
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PageTestBase.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PageTestBase.java
index 8a5574d0..4c0e56d7 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PageTestBase.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/PageTestBase.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ReportPageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ReportPageTest.java
index 0f42bb48..7d2bef67 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ReportPageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/ReportPageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -38,7 +39,8 @@ public class ReportPageTest extends PageTestBase {
private final String label;
private final String style;
- protected TestReportPage(String label, String style, ReportPage parent) {
+ protected TestReportPage(String label, String style,
+ ReportPage parent) {
super(parent, rootFolder, ReportPageTest.this.context);
this.label = label;
this.style = style;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SessionsPageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SessionsPageTest.java
index 2380d572..613f8bca 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SessionsPageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SessionsPageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -72,8 +73,8 @@ public class SessionsPageTest extends PageTestBase {
final SessionsPage page = new SessionsPage(noSessions, noExecutionData,
index, null, rootFolder, context);
page.render();
- final Document doc = support.parse(output
- .getFile("jacoco-sessions.html"));
+ final Document doc = support
+ .parse(output.getFile("jacoco-sessions.html"));
assertEquals("No session information available.",
support.findStr(doc, "/html/body/p[1]"));
assertEquals("No execution data available.",
@@ -89,8 +90,8 @@ public class SessionsPageTest extends PageTestBase {
final SessionsPage page = new SessionsPage(sessions, noExecutionData,
index, null, rootFolder, context);
page.render();
- final Document doc = support.parse(output
- .getFile("jacoco-sessions.html"));
+ final Document doc = support
+ .parse(output.getFile("jacoco-sessions.html"));
assertEquals("el_session", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[1]/span/@class"));
assertEquals("Session-A", support.findStr(doc,
@@ -130,14 +131,14 @@ public class SessionsPageTest extends PageTestBase {
final SessionsPage page = new SessionsPage(noSessions, data, index,
null, rootFolder, context);
page.render();
- final Document doc = support.parse(output
- .getFile("jacoco-sessions.html"));
+ final Document doc = support
+ .parse(output.getFile("jacoco-sessions.html"));
assertEquals("el_class", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[1]/a/@class"));
assertEquals("Foo.html", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[1]/a/@href"));
- assertEquals("ClassA",
- support.findStr(doc, "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
+ assertEquals("ClassA", support.findStr(doc,
+ "/html/body/table[1]/tbody/tr[1]/td[1]/a"));
assertEquals("0000000000001002", support.findStr(doc,
"/html/body/table[1]/tbody/tr[1]/td[2]/code"));
assertEquals("ClassB",
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceFilePageTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceFilePageTest.java
index da433542..c1f6b4e1 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceFilePageTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceFilePageTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -34,9 +35,8 @@ public class SourceFilePageTest extends PageTestBase {
@Override
public void setup() throws Exception {
super.setup();
- sourceReader = new InputStreamReader(
- new FileInputStream(
- "./src/org/jacoco/report/internal/html/page/SourceFilePageTest.java"),
+ sourceReader = new InputStreamReader(new FileInputStream(
+ "./src/org/jacoco/report/internal/html/page/SourceFilePageTest.java"),
"UTF-8");
}
@@ -48,8 +48,8 @@ public class SourceFilePageTest extends PageTestBase {
null, rootFolder, context);
page.render();
- final Document result = support.parse(output
- .getFile("SourceFilePageTest.java.html"));
+ final Document result = support
+ .parse(output.getFile("SourceFilePageTest.java.html"));
// additional style sheet
assertEquals("jacoco-resources/report.css", support.findStr(result,
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceHighlighterTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceHighlighterTest.java
index 3ef347de..5c271e1d 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceHighlighterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/page/SourceHighlighterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/ResourcesTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/ResourcesTest.java
index 1e61cebc..5e355306 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/ResourcesTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/ResourcesTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.resources;
@@ -74,13 +75,15 @@ public class ResourcesTest {
@Test
public void testGetElementStyle() {
assertEquals("el_group", Resources.getElementStyle(ElementType.GROUP));
- assertEquals("el_bundle", Resources.getElementStyle(ElementType.BUNDLE));
+ assertEquals("el_bundle",
+ Resources.getElementStyle(ElementType.BUNDLE));
assertEquals("el_package",
Resources.getElementStyle(ElementType.PACKAGE));
assertEquals("el_source",
Resources.getElementStyle(ElementType.SOURCEFILE));
assertEquals("el_class", Resources.getElementStyle(ElementType.CLASS));
- assertEquals("el_method", Resources.getElementStyle(ElementType.METHOD));
+ assertEquals("el_method",
+ Resources.getElementStyle(ElementType.METHOD));
}
}
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/StylesTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/StylesTest.java
index fdf54756..47b96653 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/StylesTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/resources/StylesTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.resources;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/BarColumnTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/BarColumnTest.java
index 8623eee7..b638daa6 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/BarColumnTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/BarColumnTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
@@ -171,8 +172,11 @@ public class BarColumnTest {
col.item(td, i1, resources, root);
final Document doc = parseDoc();
- assertEquals("123\u00a0456",
- support.findStr(doc, "/html/body/table/tr[1]/td/img[1]/@alt"));
+ // Prior to integration of JDK-8221432 in JDK 13
+ // formatting of a below number was using non-breaking space,
+ // after - narrow non-breaking space:
+ assertTrue(support.findStr(doc, "/html/body/table/tr[1]/td/img[1]/@alt")
+ .matches("123[\u00A0\u202F]456"));
}
@Test
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/CounterColumnTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/CounterColumnTest.java
index 8311128f..f0327fe4 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/CounterColumnTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/CounterColumnTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/LabelColumnTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/LabelColumnTest.java
index f13ef470..ea493213 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/LabelColumnTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/LabelColumnTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java
index 3028e005..589f04ba 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/PercentageColumnTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/SortIndexTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/SortIndexTest.java
index 7ca47226..f2e52404 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/SortIndexTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/SortIndexTest.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/TableTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/TableTest.java
index eed6923d..b17f6d22 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/TableTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/table/TableTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/html/xhtml1-strict.dtd b/org.jacoco.report.test/src/org/jacoco/report/internal/html/xhtml1-strict.dtd
index 2927b9ec..e48fbea6 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/html/xhtml1-strict.dtd
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/html/xhtml1-strict.dtd
@@ -9,7 +9,7 @@
For further information, see: http://www.w3.org/TR/xhtml1
Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
- All Rights Reserved.
+ All Rights Reserved.
This DTD module is identified by the PUBLIC and SYSTEM identifiers:
@@ -263,7 +263,7 @@
window title. Exactly one title is required per document.
-->
<!ELEMENT title (#PCDATA)>
-<!ATTLIST title
+<!ATTLIST title
%i18n;
id ID #IMPLIED
>
@@ -801,7 +801,7 @@
<!--
Content is %Flow; excluding a, form and form controls
--->
+-->
<!ELEMENT button %button.content;> <!-- push button -->
<!ATTLIST button
%attrs;
@@ -834,7 +834,7 @@
-->
<!ENTITY % TRules "(none | groups | rows | cols | all)">
-
+
<!-- horizontal alignment attributes for cell contents
char alignment char, e.g. char=':'
@@ -975,4 +975,3 @@ several semantically related columns together.
%cellhalign;
%cellvalign;
>
-
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/LocalEntityResolver.java b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/LocalEntityResolver.java
index ae6fc91e..028188d6 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/LocalEntityResolver.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/LocalEntityResolver.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLElementTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLElementTest.java
index 5ed161c2..0705e44b 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLElementTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLElementTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLGroupVisitorTest.java b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLGroupVisitorTest.java
index 92f5c28f..0ede8a89 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLGroupVisitorTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLGroupVisitorTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLSupport.java b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLSupport.java
index fbf4af41..49ce7598 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLSupport.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/internal/xml/XMLSupport.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
diff --git a/org.jacoco.report.test/src/org/jacoco/report/xml/XMLFormatterTest.java b/org.jacoco.report.test/src/org/jacoco/report/xml/XMLFormatterTest.java
index 43157f6a..09341a87 100644
--- a/org.jacoco.report.test/src/org/jacoco/report/xml/XMLFormatterTest.java
+++ b/org.jacoco.report.test/src/org/jacoco/report/xml/XMLFormatterTest.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.xml;
@@ -191,8 +192,7 @@ public class XMLFormatterTest {
assertPathMatches("1", "count(/report/package[@name='empty']/class)");
assertPathMatches("empty/Empty",
"/report/package[@name='empty']/class/@name");
- assertPathMatches("0",
- "count(report/package[@name='empty']/class/*)");
+ assertPathMatches("0", "count(report/package[@name='empty']/class/*)");
assertPathMatches("1",
"count(/report/package[@name='empty']/sourcefile)");
diff --git a/org.jacoco.report/about.html b/org.jacoco.report/about.html
index 4b8733b1..3b21510b 100644
--- a/org.jacoco.report/about.html
+++ b/org.jacoco.report/about.html
@@ -9,17 +9,17 @@
<h2>About This Content</h2>
<p>
- @build.date@
+ ${build.date}
</p>
<h3>License</h3>
<p>
- All Content in this plug-in is made available by Mountainminds GmbH &amp; Co.
+ All Content in this distribution is made available by Mountainminds GmbH &amp; Co.
KG, Munich. Unless otherwise indicated below, the Content is provided to you
- under the terms and conditions of the Eclipse Public License Version 1.0
+ under the terms and conditions of the Eclipse Public License Version 2.0
(&quot;EPL&quot;). A copy of the EPL is available at
- <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ <a href="https://www.eclipse.org/legal/epl-2.0/">https://www.eclipse.org/legal/epl-2.0/</a>.
For purposes of the EPL, "Program" will mean the Content.
</p>
@@ -28,190 +28,7 @@
out below.
</p>
-<h4>Google Code Prettify, Version 2010/07/21</h4>
-
-<p>
- This plug-in contains
- <a href="http://code.google.com/p/google-code-prettify/">Google Code Prettify</a>
- which is subject to the terms and conditions of the following license:
-</p>
-
-<pre>
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-</pre>
+${googlecodeprettify.license}
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/org.jacoco.report/pom.xml b/org.jacoco.report/pom.xml
index 9b834523..463adf2e 100644
--- a/org.jacoco.report/pom.xml
+++ b/org.jacoco.report/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -15,7 +16,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/org.jacoco.report/src/org/jacoco/report/DirectorySourceFileLocator.java b/org.jacoco.report/src/org/jacoco/report/DirectorySourceFileLocator.java
index 79881a72..dec20f44 100644
--- a/org.jacoco.report/src/org/jacoco/report/DirectorySourceFileLocator.java
+++ b/org.jacoco.report/src/org/jacoco/report/DirectorySourceFileLocator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -27,7 +28,7 @@ public class DirectorySourceFileLocator extends InputStreamSourceFileLocator {
/**
* Creates a new locator that searches for source files in the given
* directory.
- *
+ *
* @param directory
* directory to search for source file
* @param encoding
@@ -35,7 +36,6 @@ public class DirectorySourceFileLocator extends InputStreamSourceFileLocator {
* default encoding
* @param tabWidth
* tab width in source files as number of blanks
- *
*/
public DirectorySourceFileLocator(final File directory,
final String encoding, final int tabWidth) {
@@ -44,9 +44,10 @@ public class DirectorySourceFileLocator extends InputStreamSourceFileLocator {
}
@Override
- protected InputStream getSourceStream(final String path) throws IOException {
+ protected InputStream getSourceStream(final String path)
+ throws IOException {
final File file = new File(directory, path);
- if (file.exists()) {
+ if (file.isFile()) {
return new FileInputStream(file);
} else {
return null;
diff --git a/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java b/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java
index 436db743..c1d082a4 100644
--- a/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java
+++ b/org.jacoco.report/src/org/jacoco/report/FileMultiReportOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -29,7 +30,7 @@ public class FileMultiReportOutput implements IMultiReportOutput {
/**
* Creates a new instance for document output in the given base directory.
- *
+ *
* @param basedir
* base directory
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/ILanguageNames.java b/org.jacoco.report/src/org/jacoco/report/ILanguageNames.java
index 68a51b5a..f083752c 100644
--- a/org.jacoco.report/src/org/jacoco/report/ILanguageNames.java
+++ b/org.jacoco.report/src/org/jacoco/report/ILanguageNames.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -18,7 +19,7 @@ public interface ILanguageNames {
/**
* Calculates the language specific name of a package.
- *
+ *
* @param vmname
* vm name of a package
* @return language specific notation for the package
@@ -27,7 +28,7 @@ public interface ILanguageNames {
/**
* Calculates the language specific name of a class.
- *
+ *
* @param vmname
* vm name of a class
* @param vmsignature
@@ -44,7 +45,7 @@ public interface ILanguageNames {
/**
* Calculates the language specific qualified name of a class.
- *
+ *
* @param vmname
* vm name of a class
* @return language specific qualified notation of the class
@@ -53,7 +54,7 @@ public interface ILanguageNames {
/**
* Calculates the language specific name of a method.
- *
+ *
* @param vmclassname
* vm name of a containing class
* @param vmmethodname
@@ -69,7 +70,7 @@ public interface ILanguageNames {
/**
* Calculates the language specific fully qualified name of a method.
- *
+ *
* @param vmclassname
* vm name of a containing class
* @param vmmethodname
diff --git a/org.jacoco.report/src/org/jacoco/report/IMultiReportOutput.java b/org.jacoco.report/src/org/jacoco/report/IMultiReportOutput.java
index e40d36bd..4d743a69 100644
--- a/org.jacoco.report/src/org/jacoco/report/IMultiReportOutput.java
+++ b/org.jacoco.report/src/org/jacoco/report/IMultiReportOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -22,7 +23,7 @@ public interface IMultiReportOutput {
/**
* Creates a file at the given local path. The returned {@link OutputStream}
* has to be closed before the next document is created.
- *
+ *
* @param path
* local path to the new document
* @return output for the content
@@ -33,7 +34,7 @@ public interface IMultiReportOutput {
/**
* Closes the underlying resource container.
- *
+ *
* @throws IOException
* if closing fails
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/IReportGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/IReportGroupVisitor.java
index 96867e03..eb78a0ed 100644
--- a/org.jacoco.report/src/org/jacoco/report/IReportGroupVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/IReportGroupVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -17,12 +18,13 @@ import org.jacoco.core.analysis.IBundleCoverage;
/**
* Output-Interface for hierarchical report structures. To allow sequential
- * processing and save memory the group structure has to be traversed in a
- * "deep first" fashion. The interface is implemented by the report formatters
- * and can be used to emit coverage report structures.
- *
- * The following constraints apply in using {@link IReportGroupVisitor} instances:
- *
+ * processing and save memory the group structure has to be traversed in a "deep
+ * first" fashion. The interface is implemented by the report formatters and can
+ * be used to emit coverage report structures.
+ *
+ * The following constraints apply in using {@link IReportGroupVisitor}
+ * instances:
+ *
* <ul>
* <li>A visitor instance can be used to either submit bundles (
* {@link #visitBundle(IBundleCoverage, ISourceFileLocator)}) or groups
@@ -36,7 +38,7 @@ public interface IReportGroupVisitor {
/**
* Called to add a bundle to the the report.
- *
+ *
* @param bundle
* a bundle to include in the report
* @param locator
@@ -52,7 +54,7 @@ public interface IReportGroupVisitor {
* {@link IReportGroupVisitor} instance can be used to add nested bundles or
* groups. The content of the group has to be completed before this or any
* parent visitor can be used again ("deep first").
- *
+ *
* @param name
* name of the group
* @return visitor for the group's content
diff --git a/org.jacoco.report/src/org/jacoco/report/IReportVisitor.java b/org.jacoco.report/src/org/jacoco/report/IReportVisitor.java
index 1cf4aed4..c6b9815d 100644
--- a/org.jacoco.report/src/org/jacoco/report/IReportVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/IReportVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -20,15 +21,15 @@ import org.jacoco.core.data.SessionInfo;
/**
* Interface for all implementations to retrieve structured report data. Unlike
- * nested {@link IReportGroupVisitor} instances the root visitor accepts exactly one
- * bundle or group.
+ * nested {@link IReportGroupVisitor} instances the root visitor accepts exactly
+ * one bundle or group.
*/
public interface IReportVisitor extends IReportGroupVisitor {
/**
* Initializes the report with global information. This method has to be
* called before any other method can be called.
- *
+ *
* @param sessionInfos
* list of chronological ordered {@link SessionInfo} objects
* where execution data has been collected for this report.
@@ -45,7 +46,7 @@ public interface IReportVisitor extends IReportGroupVisitor {
/**
* Has to be called after all report data has been emitted.
- *
+ *
* @throws IOException
* in case of IO problems with the report writer
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/ISourceFileLocator.java b/org.jacoco.report/src/org/jacoco/report/ISourceFileLocator.java
index e32cbbf2..12c200b1 100644
--- a/org.jacoco.report/src/org/jacoco/report/ISourceFileLocator.java
+++ b/org.jacoco.report/src/org/jacoco/report/ISourceFileLocator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -22,7 +23,7 @@ public interface ISourceFileLocator {
/**
* Tries to locate the given source file and opens a reader with the
* appropriate encoding.
- *
+ *
* @param packageName
* VM name of the package
* @param fileName
@@ -36,7 +37,7 @@ public interface ISourceFileLocator {
/**
* Returns number of blank characters that represent a tab in source code.
- *
+ *
* @return tab width as number of blanks
*/
int getTabWidth();
diff --git a/org.jacoco.report/src/org/jacoco/report/InputStreamSourceFileLocator.java b/org.jacoco.report/src/org/jacoco/report/InputStreamSourceFileLocator.java
index 0d1b3812..ab921576 100644
--- a/org.jacoco.report/src/org/jacoco/report/InputStreamSourceFileLocator.java
+++ b/org.jacoco.report/src/org/jacoco/report/InputStreamSourceFileLocator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -20,21 +21,21 @@ import java.io.Reader;
* Abstract base class for {@link ISourceFileLocator} locator implementations
* based on {@link InputStream}s. It handles the encoding and tab width.
*/
-public abstract class InputStreamSourceFileLocator implements
- ISourceFileLocator {
+public abstract class InputStreamSourceFileLocator
+ implements ISourceFileLocator {
private final String encoding;
private final int tabWidth;
/**
* Creates a new locator with the given specification.
- *
+ *
* @param encoding
* encoding of the source files, <code>null</code> for platform
* default encoding
* @param tabWidth
* tab width in source files as number of blanks
- *
+ *
*/
protected InputStreamSourceFileLocator(final String encoding,
final int tabWidth) {
@@ -68,7 +69,7 @@ public abstract class InputStreamSourceFileLocator implements
/**
* Tries to locate the given source file and opens its binary content.
- *
+ *
* @param path
* local path to the resource
* @return stream if the file could be located, <code>null</code> otherwise
diff --git a/org.jacoco.report/src/org/jacoco/report/JavaNames.java b/org.jacoco.report/src/org/jacoco/report/JavaNames.java
index 1ef1baed..2c3a94ee 100644
--- a/org.jacoco.report/src/org/jacoco/report/JavaNames.java
+++ b/org.jacoco.report/src/org/jacoco/report/JavaNames.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
diff --git a/org.jacoco.report/src/org/jacoco/report/MultiReportVisitor.java b/org.jacoco.report/src/org/jacoco/report/MultiReportVisitor.java
index f4fefa85..bf67921e 100644
--- a/org.jacoco.report/src/org/jacoco/report/MultiReportVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/MultiReportVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -24,14 +25,14 @@ import org.jacoco.core.data.SessionInfo;
* A report visitor that is composed from multiple other visitors. This can be
* used to create more than one report format in one run.
*/
-public class MultiReportVisitor extends MultiGroupVisitor implements
- IReportVisitor {
+public class MultiReportVisitor extends MultiGroupVisitor
+ implements IReportVisitor {
private final List<IReportVisitor> visitors;
/**
* New visitor delegating to all given visitors.
- *
+ *
* @param visitors
* visitors to delegate to
*/
@@ -72,7 +73,8 @@ class MultiGroupVisitor implements IReportGroupVisitor {
}
}
- public IReportGroupVisitor visitGroup(final String name) throws IOException {
+ public IReportGroupVisitor visitGroup(final String name)
+ throws IOException {
final List<IReportGroupVisitor> children = new ArrayList<IReportGroupVisitor>();
for (final IReportGroupVisitor v : visitors) {
children.add(v.visitGroup(name));
diff --git a/org.jacoco.report/src/org/jacoco/report/MultiSourceFileLocator.java b/org.jacoco.report/src/org/jacoco/report/MultiSourceFileLocator.java
index 90677d5c..3b6d3314 100644
--- a/org.jacoco.report/src/org/jacoco/report/MultiSourceFileLocator.java
+++ b/org.jacoco.report/src/org/jacoco/report/MultiSourceFileLocator.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -29,7 +30,7 @@ public class MultiSourceFileLocator implements ISourceFileLocator {
/**
* Creates a new empty locator.
- *
+ *
* @param tabWidth
* tab width in source files as number of blanks used for all
* source files
@@ -42,7 +43,7 @@ public class MultiSourceFileLocator implements ISourceFileLocator {
/**
* Adds the given locator. Locators are queried in the sequence they have
* been added.
- *
+ *
* @param locator
* Additional locator to query
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/ZipMultiReportOutput.java b/org.jacoco.report/src/org/jacoco/report/ZipMultiReportOutput.java
index 8138cee4..0dc60310 100644
--- a/org.jacoco.report/src/org/jacoco/report/ZipMultiReportOutput.java
+++ b/org.jacoco.report/src/org/jacoco/report/ZipMultiReportOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report;
@@ -28,7 +29,7 @@ public class ZipMultiReportOutput implements IMultiReportOutput {
/**
* Creates a new instance based on the given {@link ZipOutputStream}.
- *
+ *
* @param zip
* stream to write file entries to
*/
@@ -38,7 +39,7 @@ public class ZipMultiReportOutput implements IMultiReportOutput {
/**
* Creates a new instance based on the given {@link OutputStream}.
- *
+ *
* @param out
* stream to write file entries to
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/check/BundleChecker.java b/org.jacoco.report/src/org/jacoco/report/check/BundleChecker.java
index c6cd8885..aa842176 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/BundleChecker.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/BundleChecker.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -96,7 +97,8 @@ class BundleChecker {
}
}
if (traverseSourceFiles) {
- for (final ISourceFileCoverage s : packageCoverage.getSourceFiles()) {
+ for (final ISourceFileCoverage s : packageCoverage
+ .getSourceFiles()) {
check(s);
}
}
@@ -138,12 +140,12 @@ class BundleChecker {
}
private void checkLimit(final ICoverageNode node, final String elementtype,
- final String typename, final Rule rule, final Limit limit) {
+ final String elementname, final Rule rule, final Limit limit) {
final String message = limit.check(node);
if (message != null) {
- output.onViolation(node, rule, limit, String.format(
- "Rule violated for %s %s: %s", elementtype, typename,
- message));
+ output.onViolation(node, rule, limit,
+ String.format("Rule violated for %s %s: %s", elementtype,
+ elementname, message));
}
}
diff --git a/org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java b/org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java
index 36c96bb2..6b95cdd5 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/IViolationsOutput.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -15,13 +16,13 @@ import org.jacoco.core.analysis.ICoverageNode;
/**
* Call-back interface which is used to report rule violations to.
- *
+ *
*/
public interface IViolationsOutput {
/**
* Called for every rule violation.
- *
+ *
* @param node
* node which violates a rule
* @param rule
@@ -31,6 +32,7 @@ public interface IViolationsOutput {
* @param message
* readable message describing this violation
*/
- void onViolation(ICoverageNode node, Rule rule, Limit limit, String message);
+ void onViolation(ICoverageNode node, Rule rule, Limit limit,
+ String message);
}
diff --git a/org.jacoco.report/src/org/jacoco/report/check/Limit.java b/org.jacoco.report/src/org/jacoco/report/check/Limit.java
index 5a24b454..9f755748 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/Limit.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/Limit.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -82,8 +83,8 @@ public class Limit {
*
* @param entity
* counter entity to check
- * TODO: use CounterEntity directly once Maven 3 is required.
*/
+ // TODO: use CounterEntity directly once Maven 3 is required.
public void setCounter(final String entity) {
this.entity = CounterEntity.valueOf(entity);
}
@@ -100,8 +101,8 @@ public class Limit {
*
* @param value
* value to check
- * TODO: use CounterValue directly once Maven 3 is required.
*/
+ // TODO: use CounterValue directly once Maven 3 is required.
public void setValue(final String value) {
this.value = CounterValue.valueOf(value);
}
@@ -115,10 +116,12 @@ public class Limit {
}
/**
- * Sets allowed maximum value as decimal string or percent representation.
- * The given precision is also considered in error messages. Coverage ratios
- * are given in the range from 0.0 to 1.0.
- *
+ * Sets the expected minimum value. If the minimum refers to a ratio it must
+ * be in the range from 0.0 to 1.0 where the number of decimal places will
+ * also determine the precision in error messages. A limit ratio may
+ * optionally be declared as a percentage where 0.80 and 80% represent the
+ * same value.
+ *
* @param minimum
* allowed minimum or <code>null</code>, if no minimum should be
* checked
@@ -136,10 +139,12 @@ public class Limit {
}
/**
- * Sets allowed maximum value as decimal string or percent representation.
- * The given precision is also considered in error messages. Coverage ratios
- * are given in the range from 0.0 to 1.0.
- *
+ * Sets the expected maximum value. If the maximum refers to a ratio it must
+ * be in the range from 0.0 to 1.0 where the number of decimal places will
+ * also determine the precision in error messages. A limit ratio may
+ * optionally be declared as a percentage where 0.80 and 80% represent the
+ * same value.
+ *
* @param maximum
* allowed maximum or <code>null</code>, if no maximum should be
* checked
@@ -152,10 +157,11 @@ public class Limit {
if (value == null) {
return null;
}
-
+
final String trimmedValue = value.trim();
if (trimmedValue.endsWith("%")) {
- final String percent = trimmedValue.substring(0, trimmedValue.length() - 1);
+ final String percent = trimmedValue.substring(0,
+ trimmedValue.length() - 1);
return new BigDecimal(percent).movePointLeft(2);
}
@@ -163,6 +169,10 @@ public class Limit {
}
String check(final ICoverageNode node) {
+ final String msg = checkRatioLimit();
+ if (msg != null) {
+ return msg;
+ }
final double d = node.getCounter(entity).getValue(value);
if (Double.isNaN(d)) {
return null;
@@ -185,4 +195,29 @@ public class Limit {
rounded.toPlainString(), minmax, ref.toPlainString());
}
+ private String checkRatioLimit() {
+ if (CounterValue.MISSEDRATIO.equals(value)
+ || CounterValue.COVEREDRATIO.equals(value)) {
+ final String minmsg = checkRatioLimit("minimum", minimum);
+ if (minmsg != null) {
+ return minmsg;
+ }
+ final String maxmsg = checkRatioLimit("maximum", maximum);
+ if (maxmsg != null) {
+ return maxmsg;
+ }
+ }
+ return null;
+ }
+
+ private String checkRatioLimit(final String minmax, final BigDecimal v) {
+ if (v != null && (v.compareTo(BigDecimal.ZERO) < 0
+ || v.compareTo(BigDecimal.ONE) > 0)) {
+ return String.format(
+ "given %s ratio is %s, but must be between 0.0 and 1.0",
+ minmax, v);
+ }
+ return null;
+ }
+
}
diff --git a/org.jacoco.report/src/org/jacoco/report/check/Rule.java b/org.jacoco.report/src/org/jacoco/report/check/Rule.java
index b247285d..99964c2a 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/Rule.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/Rule.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -80,7 +81,7 @@ public final class Rule {
}
/**
- *
+ *
* @param excludes
* excludes patterns
*/
@@ -106,7 +107,7 @@ public final class Rule {
/**
* Creates and adds a new {@link Limit}.
- *
+ *
* @return creates {@link Limit}
*/
public Limit createLimit() {
diff --git a/org.jacoco.report/src/org/jacoco/report/check/RulesChecker.java b/org.jacoco.report/src/org/jacoco/report/check/RulesChecker.java
index f7435600..59a85916 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/RulesChecker.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/RulesChecker.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.check;
@@ -44,7 +45,7 @@ public class RulesChecker {
/**
* Sets the rules to check by this formatter.
- *
+ *
* @param rules
* rules to check
*/
@@ -55,7 +56,7 @@ public class RulesChecker {
/**
* Sets the implementation for language name display for message formatting.
* Java language names are defined by default.
- *
+ *
* @param languageNames
* converter for language specific names
*/
@@ -65,7 +66,7 @@ public class RulesChecker {
/**
* Creates a new visitor to process the configured checks.
- *
+ *
* @param output
* call-back to report violations to
* @return visitor to emit the report data to
diff --git a/org.jacoco.report/src/org/jacoco/report/check/package-info.java b/org.jacoco.report/src/org/jacoco/report/check/package-info.java
index d3bee1e5..735adb2f 100644
--- a/org.jacoco.report/src/org/jacoco/report/check/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/check/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/csv/CSVFormatter.java b/org.jacoco.report/src/org/jacoco/report/csv/CSVFormatter.java
index 42939daa..7beaac0a 100644
--- a/org.jacoco.report/src/org/jacoco/report/csv/CSVFormatter.java
+++ b/org.jacoco.report/src/org/jacoco/report/csv/CSVFormatter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -36,7 +37,7 @@ public class CSVFormatter {
/**
* Sets the implementation for language name display. Java language names
* are defined by default.
- *
+ *
* @param languageNames
* converter for language specific names
*/
@@ -46,7 +47,7 @@ public class CSVFormatter {
/**
* Returns the language names call-back used in this report.
- *
+ *
* @return language names
*/
public ILanguageNames getLanguageNames() {
@@ -55,7 +56,7 @@ public class CSVFormatter {
/**
* Sets the encoding used for generated CSV document. Default is UTF-8.
- *
+ *
* @param outputEncoding
* CSV output encoding
*/
@@ -65,7 +66,7 @@ public class CSVFormatter {
/**
* Creates a new visitor to write a report to the given stream.
- *
+ *
* @param output
* output stream to write the report to
* @return visitor to emit the report data to
diff --git a/org.jacoco.report/src/org/jacoco/report/csv/CSVGroupHandler.java b/org.jacoco.report/src/org/jacoco/report/csv/CSVGroupHandler.java
index 594feb4a..99cd424a 100644
--- a/org.jacoco.report/src/org/jacoco/report/csv/CSVGroupHandler.java
+++ b/org.jacoco.report/src/org/jacoco/report/csv/CSVGroupHandler.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -32,7 +33,8 @@ class CSVGroupHandler implements IReportGroupVisitor {
this(writer, null);
}
- private CSVGroupHandler(final ClassRowWriter writer, final String groupName) {
+ private CSVGroupHandler(final ClassRowWriter writer,
+ final String groupName) {
this.writer = writer;
this.groupName = groupName;
}
@@ -50,7 +52,8 @@ class CSVGroupHandler implements IReportGroupVisitor {
}
}
- public IReportGroupVisitor visitGroup(final String name) throws IOException {
+ public IReportGroupVisitor visitGroup(final String name)
+ throws IOException {
return new CSVGroupHandler(writer, appendName(name));
}
diff --git a/org.jacoco.report/src/org/jacoco/report/csv/ClassRowWriter.java b/org.jacoco.report/src/org/jacoco/report/csv/ClassRowWriter.java
index ef9a05c4..223e312c 100644
--- a/org.jacoco.report/src/org/jacoco/report/csv/ClassRowWriter.java
+++ b/org.jacoco.report/src/org/jacoco/report/csv/ClassRowWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -25,8 +26,8 @@ import org.jacoco.report.ILanguageNames;
class ClassRowWriter {
private static final CounterEntity[] COUNTERS = { CounterEntity.INSTRUCTION,
- CounterEntity.BRANCH, CounterEntity.LINE,
- CounterEntity.COMPLEXITY, CounterEntity.METHOD };
+ CounterEntity.BRANCH, CounterEntity.LINE, CounterEntity.COMPLEXITY,
+ CounterEntity.METHOD };
private final DelimitedWriter writer;
@@ -35,7 +36,7 @@ class ClassRowWriter {
/**
* Creates a new row writer that writes class information to the given CSV
* writer.
- *
+ *
* @param writer
* writer for csv output
* @param languageNames
@@ -61,7 +62,7 @@ class ClassRowWriter {
/**
* Writes the class summary information as a row.
- *
+ *
* @param groupName
* name of the group
* @param packageName
diff --git a/org.jacoco.report/src/org/jacoco/report/csv/DelimitedWriter.java b/org.jacoco.report/src/org/jacoco/report/csv/DelimitedWriter.java
index deadeecd..3d3152a4 100644
--- a/org.jacoco.report/src/org/jacoco/report/csv/DelimitedWriter.java
+++ b/org.jacoco.report/src/org/jacoco/report/csv/DelimitedWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.csv;
@@ -18,7 +19,7 @@ import java.io.Writer;
* Helper class for writing out CSV or tab delimited files.
* <p>
* <strong>Example Usage:</strong>
- *
+ *
* <pre>
* delimitedWriter.writeFields(&quot;header1&quot;, &quot;header2&quot;, ...);
* for each line to be written {
@@ -28,7 +29,7 @@ import java.io.Writer;
* }
* delimitedWriter.close();
* </pre>
- *
+ *
* </p>
*/
class DelimitedWriter {
@@ -43,7 +44,7 @@ class DelimitedWriter {
/**
* Creates a new Delimited writer using the default delimiter
- *
+ *
* @param delegate
* Writer to delegate all writes to
*/
@@ -53,7 +54,7 @@ class DelimitedWriter {
/**
* Creates a new Delimited writer using the default delimiter
- *
+ *
* @param delegate
* Writer to delegate all writes to
* @param delimiter
@@ -67,7 +68,7 @@ class DelimitedWriter {
/**
* Write multiple fields at once. Values will be auto escaped and quoted as
* needed. Each value will be separated using the current delimiter
- *
+ *
* @param fields
* Values to write
* @throws IOException
@@ -83,7 +84,7 @@ class DelimitedWriter {
* Write a single value. Values will be auto escaped and quoted as needed.
* If this is not the first field of the current line the value will be
* prepended with the current delimiter
- *
+ *
* @param field
* Value to write
* @throws IOException
@@ -99,7 +100,7 @@ class DelimitedWriter {
/**
* Write a single integer value.
- *
+ *
* @param value
* Value to write
* @throws IOException
@@ -111,7 +112,7 @@ class DelimitedWriter {
/**
* Write muliple integer values
- *
+ *
* @param values
* values to write
* @throws IOException
@@ -126,7 +127,7 @@ class DelimitedWriter {
/**
* Output a new line and advance the writer to the next line. The line
* delimiter is the default for the platform.
- *
+ *
* @throws IOException
* Error writing to the underlying writer object
*/
@@ -138,7 +139,7 @@ class DelimitedWriter {
/**
* Close the underlying writer object. Once closed all write operations will
* fail
- *
+ *
* @throws IOException
* Error closing the underlying writer object
*/
@@ -150,7 +151,7 @@ class DelimitedWriter {
* Escapes any occurrences of the quote character in value by replacing it
* with a double quote. Also Quotes the value if a quote or delimiter value
* is found.
- *
+ *
* @param value
* String that needs escaping
* @return New string with all values escaped
diff --git a/org.jacoco.report/src/org/jacoco/report/csv/package-info.java b/org.jacoco.report/src/org/jacoco/report/csv/package-info.java
index e6194bca..81b96c93 100644
--- a/org.jacoco.report/src/org/jacoco/report/csv/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/csv/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/html/HTMLFormatter.java b/org.jacoco.report/src/org/jacoco/report/html/HTMLFormatter.java
index ce8cd2d9..bcc03ad0 100644
--- a/org.jacoco.report/src/org/jacoco/report/html/HTMLFormatter.java
+++ b/org.jacoco.report/src/org/jacoco/report/html/HTMLFormatter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.html;
@@ -73,7 +74,7 @@ public class HTMLFormatter implements IHTMLReportContext {
/**
* Sets the implementation for language name display. Java language names
* are defined by default.
- *
+ *
* @param languageNames
* converter for language specific names
*/
@@ -84,7 +85,7 @@ public class HTMLFormatter implements IHTMLReportContext {
/**
* Sets the locale used for report rendering. The current default locale is
* used by default.
- *
+ *
* @param locale
* locale used for report rendering
*/
@@ -94,7 +95,7 @@ public class HTMLFormatter implements IHTMLReportContext {
/**
* Sets the optional text that should be included in every footer page.
- *
+ *
* @param footerText
* footer text
*/
@@ -104,7 +105,7 @@ public class HTMLFormatter implements IHTMLReportContext {
/**
* Sets the encoding used for generated HTML pages. Default is UTF-8.
- *
+ *
* @param outputEncoding
* HTML output encoding
*/
@@ -132,14 +133,14 @@ public class HTMLFormatter implements IHTMLReportContext {
private Table createTable() {
final Table t = new Table();
t.add("Element", null, new LabelColumn(), false);
- t.add("Missed Instructions", Styles.BAR, new BarColumn(CounterEntity.INSTRUCTION,
- locale), true);
+ t.add("Missed Instructions", Styles.BAR,
+ new BarColumn(CounterEntity.INSTRUCTION, locale), true);
t.add("Cov.", Styles.CTR2,
new PercentageColumn(CounterEntity.INSTRUCTION, locale), false);
- t.add("Missed Branches", Styles.BAR, new BarColumn(CounterEntity.BRANCH, locale),
- false);
- t.add("Cov.", Styles.CTR2, new PercentageColumn(CounterEntity.BRANCH, locale),
- false);
+ t.add("Missed Branches", Styles.BAR,
+ new BarColumn(CounterEntity.BRANCH, locale), false);
+ t.add("Cov.", Styles.CTR2,
+ new PercentageColumn(CounterEntity.BRANCH, locale), false);
addMissedTotalColumns(t, "Cxty", CounterEntity.COMPLEXITY);
addMissedTotalColumns(t, "Lines", CounterEntity.LINE);
addMissedTotalColumns(t, "Methods", CounterEntity.METHOD);
@@ -177,7 +178,7 @@ public class HTMLFormatter implements IHTMLReportContext {
/**
* Creates a new visitor to write a report to the given output.
- *
+ *
* @param output
* output to write the report to
* @return visitor to emit the report data to
diff --git a/org.jacoco.report/src/org/jacoco/report/html/package-info.java b/org.jacoco.report/src/org/jacoco/report/html/package-info.java
index 9e0014ec..b5be3990 100644
--- a/org.jacoco.report/src/org/jacoco/report/html/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/html/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java
index 63da569c..a408025e 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/AbstractGroupVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal;
@@ -32,7 +33,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor {
/**
* Creates a new group with the given name.
- *
+ *
* @param name
* name for the coverage node created internally
*/
@@ -49,7 +50,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor {
/**
* Called to handle the given bundle in a specific way.
- *
+ *
* @param bundle
* analyzed bundle
* @param locator
@@ -69,7 +70,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor {
/**
* Called to handle a group with the given name in a specific way.
- *
+ *
* @param name
* name of the group
* @return created child group
@@ -81,7 +82,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor {
/**
* Must be called at the end of every group.
- *
+ *
* @throws IOException
* if the report can't be written
*/
@@ -92,7 +93,7 @@ public abstract class AbstractGroupVisitor implements IReportGroupVisitor {
/**
* Called to handle the end of this group in a specific way.
- *
+ *
* @throws IOException
* if the report can't be written
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/NormalizedFileNames.java b/org.jacoco.report/src/org/jacoco/report/internal/NormalizedFileNames.java
index 65eba09d..fa3a6cc0 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/NormalizedFileNames.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/NormalizedFileNames.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal;
@@ -21,7 +22,7 @@ import java.util.Set;
/**
* Internal utility to create normalized file names from string ids. The file
* names generated by an instance of this class have the following properties:
- *
+ *
* <ul>
* <li>The same input id is mapped to the same file name.</li>
* <li>Different ids are mapped to different file names.</li>
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/ReportOutputFolder.java b/org.jacoco.report/src/org/jacoco/report/internal/ReportOutputFolder.java
index a0f05580..4e4ee715 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/ReportOutputFolder.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/ReportOutputFolder.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal;
@@ -37,7 +38,7 @@ public class ReportOutputFolder {
/**
* Creates a new root folder for the given output.
- *
+ *
* @param output
* output for generated files
*/
@@ -47,7 +48,7 @@ public class ReportOutputFolder {
/**
* Creates a new root folder for the given output.
- *
+ *
* @param output
* output for generated files
*/
@@ -61,7 +62,7 @@ public class ReportOutputFolder {
/**
* Creates a sub-folder with the given name.
- *
+ *
* @param name
* name of the sub-folder
* @return handle for output into the sub-folder
@@ -72,15 +73,15 @@ public class ReportOutputFolder {
if (folder != null) {
return folder;
}
- folder = new ReportOutputFolder(output, this, path + normalizedName
- + "/");
+ folder = new ReportOutputFolder(output, this,
+ path + normalizedName + "/");
subFolders.put(normalizedName, folder);
return folder;
}
/**
* Creates a new file in this folder with the given local name.
- *
+ *
* @param name
* name of the sub-folder
* @return handle for output into the sub-folder
@@ -93,7 +94,7 @@ public class ReportOutputFolder {
/**
* Returns a link relative to a given base to a resource within this folder.
- *
+ *
* @param base
* base to create the relative link from
* @param name
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLElement.java b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLElement.java
index 616b3186..4f042b21 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLElement.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLElement.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
@@ -29,7 +30,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a <code>html</code> root element of a XHTML document.
- *
+ *
* @param encoding
* character encoding used for output
* @param output
@@ -59,7 +60,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'head' element.
- *
+ *
* @return 'head' element
* @throws IOException
* in case of problems with the underlying output
@@ -70,7 +71,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'body' element.
- *
+ *
* @return 'body' element
* @throws IOException
* in case of problems with the underlying output
@@ -81,7 +82,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'meta' element.
- *
+ *
* @param httpequivattr
* value of the http-equiv attribute
* @param contentattr
@@ -100,7 +101,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'link' element.
- *
+ *
* @param relattr
* value of the rel attribute
* @param hrefattr
@@ -122,7 +123,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'title' element.
- *
+ *
* @return 'title' element
* @throws IOException
* in case of problems with the underlying output
@@ -133,7 +134,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'h1' element.
- *
+ *
* @return 'h1' element
* @throws IOException
* in case of problems with the underlying output
@@ -144,7 +145,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'p' element.
- *
+ *
* @return 'p' element
* @throws IOException
* in case of problems with the underlying output
@@ -155,7 +156,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'span' element.
- *
+ *
* @return 'span' element
* @throws IOException
* in case of problems with the underlying output
@@ -166,7 +167,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'span' element.
- *
+ *
* @param classattr
* value of the class attribute
* @return 'span' element
@@ -181,7 +182,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'span' element.
- *
+ *
* @param classattr
* value of the class attribute
* @param idattr
@@ -199,7 +200,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'div' element.
- *
+ *
* @param classattr
* value of the class attribute
* @return 'div' element
@@ -214,7 +215,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'code' element.
- *
+ *
* @return 'code' element
* @throws IOException
* in case of problems with the underlying output
@@ -225,7 +226,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'pre' element.
- *
+ *
* @param classattr
* value of the class attribute
* @return 'pre' element
@@ -240,7 +241,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'a' element.
- *
+ *
* @param hrefattr
* value of the href attribute
* @return 'a' element
@@ -255,7 +256,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'a' element.
- *
+ *
* @param hrefattr
* value of the href attribute
* @param classattr
@@ -273,7 +274,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a link to the given {@link ILinkable}.
- *
+ *
* @param linkable
* object to link to
* @param base
@@ -297,7 +298,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'table' element.
- *
+ *
* @param classattr
* value of the class attribute
* @return 'table' element
@@ -313,7 +314,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'thead' element.
- *
+ *
* @return 'thead' element
* @throws IOException
* in case of problems with the underlying output
@@ -324,7 +325,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'tfoot' element.
- *
+ *
* @return 'tfoot' element
* @throws IOException
* in case of problems with the underlying output
@@ -335,7 +336,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'tbody' element.
- *
+ *
* @return 'tbody' element
* @throws IOException
* in case of problems with the underlying output
@@ -346,7 +347,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'tr' element.
- *
+ *
* @return 'tr' element
* @throws IOException
* in case of problems with the underlying output
@@ -357,7 +358,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'td' element.
- *
+ *
* @return 'td' element
* @throws IOException
* in case of problems with the underlying output
@@ -368,7 +369,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'td' element.
- *
+ *
* @param classattr
* value of the class attribute
* @return 'td' element
@@ -383,7 +384,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a 'img' element.
- *
+ *
* @param srcattr
* value of the src attribute
* @param widthattr
@@ -408,7 +409,7 @@ public class HTMLElement extends XMLElement {
/**
* Creates a JavaScript 'script' element.
- *
+ *
* @param srcattr
* value of the src attribute
* @throws IOException
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java
index e690efe9..2c73aae9 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/HTMLGroupVisitor.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
@@ -36,7 +37,7 @@ public class HTMLGroupVisitor extends AbstractGroupVisitor {
/**
* Create a new group handler.
- *
+ *
* @param parent
* optional hierarchical parent
* @param folder
@@ -57,7 +58,7 @@ public class HTMLGroupVisitor extends AbstractGroupVisitor {
/**
* Returns the page rendered for this group.
- *
+ *
* @return page for this group
*/
public NodePage<ICoverageNode> getPage() {
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/IHTMLReportContext.java b/org.jacoco.report/src/org/jacoco/report/internal/html/IHTMLReportContext.java
index 5ce47b6f..0e4e6628 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/IHTMLReportContext.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/IHTMLReportContext.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
@@ -25,56 +26,56 @@ public interface IHTMLReportContext {
/**
* Returns the static resources used in this report.
- *
+ *
* @return static resources
*/
Resources getResources();
/**
* Returns the language names call-back used in this report.
- *
+ *
* @return language names
*/
ILanguageNames getLanguageNames();
/**
* Returns a table for rendering coverage nodes.
- *
+ *
* @return table for rendering
*/
Table getTable();
/**
* Returns a string of textual information to include in every page footer.
- *
+ *
* @return footer text or empty string
*/
String getFooterText();
/**
* Returns the link to the sessions page.
- *
+ *
* @return sessions page link
*/
ILinkable getSessionsPage();
/**
* Returns the encoding of the generated HTML documents.
- *
+ *
* @return encoding for generated HTML documents
*/
String getOutputEncoding();
/**
* Returns the service for index updates.
- *
+ *
* @return sevice for indes updates
*/
IIndexUpdate getIndexUpdate();
/**
* Returns the locale used to format numbers and dates.
- *
+ *
* @return locale for numbers and dates
*/
Locale getLocale();
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/ILinkable.java b/org.jacoco.report/src/org/jacoco/report/internal/html/ILinkable.java
index bfec938a..042f3a4c 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/ILinkable.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/ILinkable.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html;
@@ -21,7 +22,7 @@ public interface ILinkable {
/**
* Returns a relative link to the item that works from the given base
* folder.
- *
+ *
* @param base
* folder where the link should be inserted
* @return relative link or <code>null</code> if the target does not exist
@@ -30,14 +31,14 @@ public interface ILinkable {
/**
* Returns the display label used for the link.
- *
+ *
* @return display label
*/
String getLinkLabel();
/**
* Optional style class to be associated with the link.
- *
+ *
* @return link style class or <code>null</code>
*/
String getLinkStyle();
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/index/ElementIndex.java b/org.jacoco.report/src/org/jacoco/report/internal/html/index/ElementIndex.java
index 08fba90c..8eb6afd5 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/index/ElementIndex.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/index/ElementIndex.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.index;
@@ -29,7 +30,7 @@ public class ElementIndex implements IIndexUpdate {
/**
* Creates a new empty index for a HTML report.
- *
+ *
* @param baseFolder
* base folder where all links are calculated relative to
*/
@@ -40,7 +41,7 @@ public class ElementIndex implements IIndexUpdate {
/**
* Returns the link to the class with the given identifier if a
* corresponding page exists.
- *
+ *
* @param classid
* class identifier
* @return Link or null
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java b/org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java
index ce8d8aba..a4257922 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/index/IIndexUpdate.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.index;
@@ -21,7 +22,7 @@ public interface IIndexUpdate {
/**
* Adds a class to the index.
- *
+ *
* @param link
* link to the class
* @param classid
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java b/org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java
index e6760bbe..f054294b 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/index/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java
index 4caeb67e..2aae5b2a 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/BundlePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -33,7 +34,7 @@ public class BundlePage extends TablePage<ICoverageNode> {
/**
* Creates a new visitor in the given context.
- *
+ *
* @param bundle
* coverage date for the bundle
* @param parent
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java
index 8a759a31..45dff8de 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ClassPage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -30,7 +31,7 @@ public class ClassPage extends TablePage<IClassCoverage> {
/**
* Creates a new visitor in the given context.
- *
+ *
* @param classNode
* coverage data for this class
* @param parent
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java
index 9e646058..05aaf46a 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/GroupPage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -23,7 +24,7 @@ public class GroupPage extends TablePage<ICoverageNode> {
/**
* Creates a new visitor in the given context.
- *
+ *
* @param node
* corresponding coverage data
* @param parent
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/MethodItem.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/MethodItem.java
index 601c7112..a9e4443b 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/MethodItem.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/MethodItem.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java
index 6dbb37f4..c0b4cd52 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/NodePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -20,18 +21,18 @@ import org.jacoco.report.internal.html.table.ITableItem;
/**
* Report page that represents a coverage node.
- *
+ *
* @param <NodeType>
* type of the node represented by this page
*/
-public abstract class NodePage<NodeType extends ICoverageNode> extends
- ReportPage implements ITableItem {
+public abstract class NodePage<NodeType extends ICoverageNode>
+ extends ReportPage implements ITableItem {
private final NodeType node;
/**
* Creates a new node page.
- *
+ *
* @param node
* corresponding node
* @param parent
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java
index 3d5e24dc..1ec8beca 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackagePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -33,7 +34,7 @@ public class PackagePage extends TablePage<IPackageCoverage> {
/**
* Creates a new visitor in the given context.
- *
+ *
* @param node
* coverage data for this package
* @param parent
@@ -49,8 +50,8 @@ public class PackagePage extends TablePage<IPackageCoverage> {
final ISourceFileLocator locator, final ReportOutputFolder folder,
final IHTMLReportContext context) {
super(node, parent, folder, context);
- packageSourcePage = new PackageSourcePage(node, parent, locator,
- folder, context, this);
+ packageSourcePage = new PackageSourcePage(node, parent, locator, folder,
+ context, this);
sourceCoverageExists = !node.getSourceFiles().isEmpty();
}
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackageSourcePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackageSourcePage.java
index 988033d0..f0cb618e 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackageSourcePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/PackageSourcePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -37,7 +38,7 @@ public class PackageSourcePage extends TablePage<IPackageCoverage> {
/**
* Creates a new visitor in the given context.
- *
+ *
* @param node
* coverage data for this package
* @param parent
@@ -83,8 +84,8 @@ public class PackageSourcePage extends TablePage<IPackageCoverage> {
continue;
}
final String sourcename = s.getName();
- final Reader reader = locator
- .getSourceFile(packagename, sourcename);
+ final Reader reader = locator.getSourceFile(packagename,
+ sourcename);
if (reader == null) {
addItem(new SourceFileItem(s));
} else {
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java
index 9660bdf8..76b738b3 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/ReportPage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -38,7 +39,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Creates a new report page.
- *
+ *
* @param parent
* optional hierarchical parent
* @param folder
@@ -55,7 +56,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Checks whether this is the root page of the report.
- *
+ *
* @return <code>true</code> if this is the root page
*/
protected final boolean isRootPage() {
@@ -65,7 +66,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Renders this page's content and optionally additional pages. This method
* must be called at most once.
- *
+ *
* @throws IOException
* if the page can't be written
*/
@@ -80,7 +81,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Creates the elements within the head element.
- *
+ *
* @param head
* head tag of the page
* @throws IOException
@@ -110,7 +111,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Returns the onload handler for this page.
- *
+ *
* @return handler or <code>null</code>
*/
protected String getOnload() {
@@ -119,7 +120,7 @@ public abstract class ReportPage implements ILinkable {
/**
* Inserts additional links on the top right corner.
- *
+ *
* @param span
* parent element
* @throws IOException
@@ -157,14 +158,14 @@ public abstract class ReportPage implements ILinkable {
/**
* Specifies the local file name of this page.
- *
+ *
* @return local file name
*/
protected abstract String getFileName();
/**
* Creates the actual content of the page.
- *
+ *
* @param body
* body tag of the page
* @throws IOException
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java
index 3a489025..56181ef0 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SessionsPage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -54,7 +55,7 @@ public class SessionsPage extends ReportPage {
/**
* Creates a new page page to display session information.
- *
+ *
* @param sessionInfos
* session info objects
* @param executionData
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFileItem.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFileItem.java
index 70628ae2..13b01bcf 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFileItem.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFileItem.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -19,7 +20,7 @@ import org.jacoco.report.internal.html.table.ITableItem;
/**
* Table items representing a source file which cannot be linked.
- *
+ *
*/
final class SourceFileItem implements ITableItem {
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java
index d4fe243c..c54a14b0 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceFilePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -34,7 +35,7 @@ public class SourceFilePage extends NodePage<ISourceNode> {
/**
* Creates a new page with given information.
- *
+ *
* @param sourceFileNode
* coverage data for this source file
* @param sourceReader
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceHighlighter.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceHighlighter.java
index 5cb8eb04..97c8a27b 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceHighlighter.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/SourceHighlighter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -33,7 +34,7 @@ final class SourceHighlighter {
/**
* Creates a new highlighter with default settings.
- *
+ *
* @param locale
* locale for tooltip rendering
*/
@@ -45,7 +46,7 @@ final class SourceHighlighter {
/**
* Specifies the source language. This value might be used for syntax
* highlighting. Default is "java".
- *
+ *
* @param lang
* source language identifier
*/
@@ -55,7 +56,7 @@ final class SourceHighlighter {
/**
* Highlights the given source file.
- *
+ *
* @param parent
* parent HTML element
* @param source
@@ -67,8 +68,8 @@ final class SourceHighlighter {
*/
public void render(final HTMLElement parent, final ISourceNode source,
final Reader contents) throws IOException {
- final HTMLElement pre = parent.pre(Styles.SOURCE + " lang-" + lang
- + " linenums");
+ final HTMLElement pre = parent
+ .pre(Styles.SOURCE + " lang-" + lang + " linenums");
final BufferedReader lineBuffer = new BufferedReader(contents);
String line;
int nr = 0;
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java b/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java
index c8cd0c1d..3329e373 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/page/TablePage.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.page;
@@ -24,7 +25,7 @@ import org.jacoco.report.internal.html.table.ITableItem;
/**
* Report page that contains a table of items linked to other pages.
- *
+ *
* @param <NodeType>
* type of the node represented by this page
*/
@@ -35,7 +36,7 @@ public abstract class TablePage<NodeType extends ICoverageNode>
/**
* Creates a new node page.
- *
+ *
* @param node
* corresponding node
* @param parent
@@ -53,7 +54,7 @@ public abstract class TablePage<NodeType extends ICoverageNode>
/**
* Adds the given item to the table. Method must be called before the page
* is rendered.
- *
+ *
* @param item
* table item to add
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Resources.java b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Resources.java
index 29fab0fd..686c3cda 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Resources.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Resources.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.resources;
@@ -46,7 +47,7 @@ public class Resources {
/**
* Attaches resources to the report with the given root folder.
- *
+ *
* @param root
* root folder of the report
*/
@@ -56,7 +57,7 @@ public class Resources {
/**
* Returns a relative link to a static resource.
- *
+ *
* @param base
* base folder from where the link should be created
* @param name
@@ -69,7 +70,7 @@ public class Resources {
/**
* Determines the style sheet class for the given element type.
- *
+ *
* @param type
* type of the element
* @return style class name
@@ -94,7 +95,7 @@ public class Resources {
/**
* Copies all static resources into the report.
- *
+ *
* @throws IOException
* if the resources can't be written to the report
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Styles.java b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Styles.java
index 0d0d6cbf..4e4665cb 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Styles.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/Styles.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.resources;
@@ -99,7 +100,7 @@ public final class Styles {
/**
* Returns a combined style from the given styles.
- *
+ *
* @param styles
* list of separate styles, entries might be null
* @return combined style or <code>null</code> if no style is given
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java
index ba6339a6..d8e0a359 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.js b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.js
index ab278821..b2766fe0 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.js
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/prettify.js
@@ -1112,7 +1112,7 @@ window['_pr_isIE6'] = function () {
for (var i = 0; i < 10; ++i) {
lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
}
- var lineNum = numberLines[1] && numberLines[1].length
+ var lineNum = numberLines[1] && numberLines[1].length
? numberLines[1] - 1 : 0; // Lines are 1-indexed
html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
if (lineNum) {
@@ -1403,7 +1403,7 @@ window['_pr_isIE6'] = function () {
Infinity);
for (; k < elements.length && clock.now() < endTime; k++) {
var cs = elements[k];
- // [JACOCO] 'prettyprint' -> 'source'
+ // [JACOCO] 'prettyprint' -> 'source'
if (cs.className && cs.className.indexOf('source') >= 0) {
// If the classes includes a language extensions, use it.
// Language extensions can be specified like
@@ -1418,7 +1418,7 @@ window['_pr_isIE6'] = function () {
for (var p = cs.parentNode; p; p = p.parentNode) {
if ((p.tagName === 'pre' || p.tagName === 'code' ||
p.tagName === 'xmp') &&
- // [JACOCO] 'prettyprint' -> 'source'
+ // [JACOCO] 'prettyprint' -> 'source'
p.className && p.className.indexOf('source') >= 0) {
nested = true;
break;
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.css b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.css
index 08eba792..dd936bca 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.css
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/report.css
@@ -137,7 +137,7 @@ pre.source span.bpc:hover {
table.coverage {
empty-cells:show;
- border-collapse:collapse;
+ border-collapse:collapse;
}
table.coverage thead {
@@ -185,7 +185,7 @@ table.coverage tbody td {
border-bottom:#d6d3ce 1px solid;
}
-table.coverage tbody tr:hover {
+table.coverage tbody tr:hover {
background: #f0f0d0 !important;
}
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.js b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.js
index da41c0b7..e269fe3d 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.js
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/resources/sort.js
@@ -1,13 +1,14 @@
/*******************************************************************************
* Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
(function () {
@@ -17,8 +18,8 @@
*
* @param linkelementids
* list of element ids to search for links to add sort inidcator
- * hash links
- */
+ * hash links
+ */
function initialSort(linkelementids) {
window.linkelementids = linkelementids;
var hash = window.location.hash;
@@ -44,7 +45,7 @@
/**
* Sorts the columns with the given header dependening on the current sort state.
- */
+ */
function toggleSort(header) {
var sortup = header.className.indexOf('down ') == 0;
sortColumn(header, sortup);
@@ -52,23 +53,23 @@
/**
* Sorts the columns with the given header in the given direction.
- */
+ */
function sortColumn(header, sortup) {
var table = header.parentNode.parentNode.parentNode;
var body = table.tBodies[0];
var colidx = getNodePosition(header);
-
+
resetSortedStyle(table);
-
+
var rows = body.rows;
var sortedrows = [];
for (var i = 0; i < rows.length; i++) {
r = rows[i];
sortedrows[parseInt(r.childNodes[colidx].id.slice(1))] = r;
}
-
+
var hash;
-
+
if (sortup) {
for (var i = sortedrows.length - 1; i >= 0; i--) {
body.appendChild(sortedrows[i]);
@@ -82,7 +83,7 @@
header.className = 'down ' + header.className;
hash = 'dn-' + header.id;
}
-
+
setHash(hash);
}
@@ -108,14 +109,14 @@
var hashpos = href.indexOf("#");
if (hashpos != -1) {
href = href.substring(0, hashpos);
- }
+ }
a.href = href + "#" + hash;
}
}
/**
* Calculates the position of a element within its parent.
- */
+ */
function getNodePosition(element) {
var pos = -1;
while (element) {
@@ -140,8 +141,8 @@
}
}
}
-
+
window['initialSort'] = initialSort;
window['toggleSort'] = toggleSort;
-})(); \ No newline at end of file
+})();
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java
index ecbcd719..64185395 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/BarColumn.java
@@ -1,18 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
import java.io.IOException;
-import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Comparator;
import java.util.List;
@@ -46,7 +46,7 @@ public class BarColumn implements IColumnRenderer {
/**
* Creates a new column that is based on the {@link ICounter} for the given
* entity.
- *
+ *
* @param entity
* counter entity for visualization
* @param locale
@@ -54,10 +54,10 @@ public class BarColumn implements IColumnRenderer {
*/
public BarColumn(final CounterEntity entity, final Locale locale) {
this.entity = entity;
- this.integerFormat = DecimalFormat.getIntegerInstance(locale);
- this.comparator = new TableItemComparator(CounterComparator.MISSEDITEMS
- .reverse().on(entity)
- .second(CounterComparator.TOTALITEMS.reverse().on(entity)));
+ this.integerFormat = NumberFormat.getIntegerInstance(locale);
+ this.comparator = new TableItemComparator(
+ CounterComparator.MISSEDITEMS.reverse().on(entity).second(
+ CounterComparator.TOTALITEMS.reverse().on(entity)));
}
public boolean init(final List<? extends ITableItem> items,
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java
index 823c5da9..33b8a252 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/CounterColumn.java
@@ -1,18 +1,18 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
import java.io.IOException;
-import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Comparator;
import java.util.List;
@@ -35,7 +35,7 @@ public abstract class CounterColumn implements IColumnRenderer {
/**
* Creates a new column that shows the total count for the given entity.
- *
+ *
* @param entity
* counter entity for this column
* @param locale
@@ -44,8 +44,8 @@ public abstract class CounterColumn implements IColumnRenderer {
*/
public static CounterColumn newTotal(final CounterEntity entity,
final Locale locale) {
- return new CounterColumn(entity, locale, CounterComparator.TOTALITEMS
- .reverse().on(entity)) {
+ return new CounterColumn(entity, locale,
+ CounterComparator.TOTALITEMS.reverse().on(entity)) {
@Override
protected int getValue(final ICounter counter) {
return counter.getTotalCount();
@@ -55,7 +55,7 @@ public abstract class CounterColumn implements IColumnRenderer {
/**
* Creates a new column that shows the missed count for the given entity.
- *
+ *
* @param entity
* counter entity for this column
* @param locale
@@ -64,8 +64,8 @@ public abstract class CounterColumn implements IColumnRenderer {
*/
public static CounterColumn newMissed(final CounterEntity entity,
final Locale locale) {
- return new CounterColumn(entity, locale, CounterComparator.MISSEDITEMS
- .reverse().on(entity)) {
+ return new CounterColumn(entity, locale,
+ CounterComparator.MISSEDITEMS.reverse().on(entity)) {
@Override
protected int getValue(final ICounter counter) {
return counter.getMissedCount();
@@ -75,7 +75,7 @@ public abstract class CounterColumn implements IColumnRenderer {
/**
* Creates a new column that shows the covered count for the given entity.
- *
+ *
* @param entity
* counter entity for this column
* @param locale
@@ -84,8 +84,8 @@ public abstract class CounterColumn implements IColumnRenderer {
*/
public static CounterColumn newCovered(final CounterEntity entity,
final Locale locale) {
- return new CounterColumn(entity, locale, CounterComparator.COVEREDITEMS
- .reverse().on(entity)) {
+ return new CounterColumn(entity, locale,
+ CounterComparator.COVEREDITEMS.reverse().on(entity)) {
@Override
protected int getValue(final ICounter counter) {
return counter.getCoveredCount();
@@ -102,7 +102,7 @@ public abstract class CounterColumn implements IColumnRenderer {
/**
* Creates a new column that is based on the {@link ICounter} for the given
* entity.
- *
+ *
* @param entity
* counter entity for this column
* @param locale
@@ -113,7 +113,7 @@ public abstract class CounterColumn implements IColumnRenderer {
protected CounterColumn(final CounterEntity entity, final Locale locale,
final Comparator<ICoverageNode> comparator) {
this.entity = entity;
- this.integerFormat = DecimalFormat.getIntegerInstance(locale);
+ this.integerFormat = NumberFormat.getIntegerInstance(locale);
this.comparator = new TableItemComparator(comparator);
}
@@ -151,7 +151,7 @@ public abstract class CounterColumn implements IColumnRenderer {
/**
* Retrieves the respective value from the counter.
- *
+ *
* @param counter
* counter object
* @return value of interest
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/IColumnRenderer.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/IColumnRenderer.java
index dab38da5..ef74ca1f 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/IColumnRenderer.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/IColumnRenderer.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
@@ -29,7 +30,7 @@ public interface IColumnRenderer {
/**
* Initializes the column before any output method is called.
- *
+ *
* @param items
* all items that will be displayed in the table
* @param total
@@ -40,7 +41,7 @@ public interface IColumnRenderer {
/**
* Renders the footer for this column.
- *
+ *
* @param td
* the parent table cell
* @param total
@@ -57,7 +58,7 @@ public interface IColumnRenderer {
/**
* Renders a single item in this column.
- *
+ *
* @param td
* the parent table cell
* @param item
@@ -74,7 +75,7 @@ public interface IColumnRenderer {
/**
* Returns the comparator to sort this table column.
- *
+ *
* @return comparator for this column
*/
Comparator<ITableItem> getComparator();
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java
index 0c0b2ca6..5920a90e 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/ITableItem.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
@@ -21,7 +22,7 @@ public interface ITableItem extends ILinkable {
/**
* Returns the corresponding node data.
- *
+ *
* @return node data
*/
ICoverageNode getNode();
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/LabelColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/LabelColumn.java
index 27347fe9..42d9d323 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/LabelColumn.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/LabelColumn.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/PercentageColumn.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/PercentageColumn.java
index fa3f9c1c..4c6aec28 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/PercentageColumn.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/PercentageColumn.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
@@ -43,7 +44,7 @@ public class PercentageColumn implements IColumnRenderer {
/**
* Creates a new column that is based on the {@link ICounter} for the given
* entity.
- *
+ *
* @param entity
* counter entity for this column
* @param locale
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/SortIndex.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/SortIndex.java
index e2d0324d..7babced2 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/SortIndex.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/SortIndex.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
@@ -19,7 +20,7 @@ import java.util.List;
/**
* A index on a list of items sorted with a given {@link Comparator}. The index
* does not change the list itself.
- *
+ *
* @param <T>
* type of the items
*/
@@ -50,7 +51,7 @@ final class SortIndex<T> {
/**
* Creates a new index based in the given comparator.
- *
+ *
* @param comparator
* comparator to sort items
*/
@@ -60,7 +61,7 @@ final class SortIndex<T> {
/**
* Initializes the index for the given list of items.
- *
+ *
* @param items
* list of items
*/
@@ -84,7 +85,7 @@ final class SortIndex<T> {
/**
* Returns the sorted position of the element with the given index in the
* items list provided to the init() method.
- *
+ *
* @param idx
* index of a element of the list
* @return its position in a sorted list
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/Table.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/Table.java
index f594dc0a..b2b07811 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/Table.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/Table.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.html.table;
@@ -41,7 +42,7 @@ public class Table {
/**
* Adds a new column with the given properties to the table.
- *
+ *
* @param header
* column header caption
* @param style
@@ -52,7 +53,7 @@ public class Table {
* @param defaultSorting
* If <code>true</code>, this column is the default sorting
* column. Only one column can be selected for default sorting.
- *
+ *
*/
public void add(final String header, final String style,
final IColumnRenderer renderer, final boolean defaultSorting) {
@@ -69,7 +70,7 @@ public class Table {
/**
* Renders a table for the given icon
- *
+ *
* @param parent
* parent element in which the table is created
* @param items
@@ -155,8 +156,9 @@ public class Table {
this.renderer = renderer;
index = new SortIndex<ITableItem>(renderer.getComparator());
this.style = style;
- this.headerStyle = Styles.combine(defaultSorting ? Styles.DOWN
- : null, Styles.SORTABLE, style);
+ this.headerStyle = Styles.combine(
+ defaultSorting ? Styles.DOWN : null, Styles.SORTABLE,
+ style);
}
void init(final HTMLElement tr, final List<? extends ITableItem> items,
@@ -184,7 +186,8 @@ public class Table {
throws IOException {
if (visible) {
final HTMLElement td = tr.td(style);
- td.attr("id", idprefix + String.valueOf(index.getPosition(idx)));
+ td.attr("id",
+ idprefix + String.valueOf(index.getPosition(idx)));
renderer.item(td, item, resources, base);
}
}
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java
index 4912fb1d..69e78bd8 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/TableItemComparator.java
@@ -1,9 +1,10 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java b/org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java
index 9208e472..45967f06 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/html/table/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/ReportElement.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/ReportElement.java
index 65782d97..c6176474 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/xml/ReportElement.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/ReportElement.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
@@ -32,7 +33,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a <code>report</code> root element for a XML report.
- *
+ *
* @param name
* value for the name attribute
* @param encoding
@@ -67,7 +68,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'sessioninfo' element.
- *
+ *
* @param info
* info object to write out
* @throws IOException
@@ -82,7 +83,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'group' element.
- *
+ *
* @param name
* value for the name attribute
* @return 'group' element
@@ -95,7 +96,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'package' element.
- *
+ *
* @param name
* value for the name attribute
* @return 'package' element
@@ -108,7 +109,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'class' element.
- *
+ *
* @param coverage
* class coverage node to write out
* @return 'class' element
@@ -124,7 +125,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'method' element.
- *
+ *
* @param coverage
* method coverage node to write out
* @return 'method' element
@@ -145,7 +146,7 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'sourcefile' element.
- *
+ *
* @param name
* value for the name attribute
* @return 'sourcefile' element
@@ -158,12 +159,12 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'line' element.
- *
+ *
* @param nr
* line number
* @param line
* line object to write out
- *
+ *
* @throws IOException
* in case of problems with the underlying output
*/
@@ -176,13 +177,13 @@ public class ReportElement extends XMLElement {
/**
* Creates a 'counter' element.
- *
+ *
* @param counterEntity
* entity of this counter
- *
+ *
* @param counter
* counter object to write out
- *
+ *
* @throws IOException
* in case of problems with the underlying output
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java
index 7bf95af6..6e3a74a4 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLCoverageWriter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
@@ -31,7 +32,7 @@ public final class XMLCoverageWriter {
/**
* Writes the structure of a given bundle.
- *
+ *
* @param bundle
* bundle coverage data
* @param element
@@ -83,7 +84,7 @@ public final class XMLCoverageWriter {
/**
* Writes all non-zero counters of the given node.
- *
+ *
* @param node
* node to retrieve counters from
* @param parent
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLElement.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLElement.java
index c2da6bb5..65f53dda 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLElement.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLElement.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
@@ -60,7 +61,7 @@ public class XMLElement {
/**
* Creates a root element of a XML document.
- *
+ *
* @param name
* element name
* @param pubId
@@ -96,7 +97,7 @@ public class XMLElement {
/**
* Creates a new child element within a XML document. May only be called
* before the parent element has been closed.
- *
+ *
* @param name
* element name
* @param parent
@@ -160,7 +161,7 @@ public class XMLElement {
* element is added or this element has been closed. The attribute value
* will be quoted. If the value is <code>null</code> the attribute will not
* be added.
- *
+ *
* @param name
* attribute name
* @param value
@@ -190,7 +191,7 @@ public class XMLElement {
* Adds an attribute to this element. May only be called before an child
* element is added or this element has been closed. The attribute value is
* the decimal representation of the given int value.
- *
+ *
* @param name
* attribute name
* @param value
@@ -208,7 +209,7 @@ public class XMLElement {
* Adds an attribute to this element. May only be called before an child
* element is added or this element has been closed. The attribute value is
* the decimal representation of the given long value.
- *
+ *
* @param name
* attribute name
* @param value
@@ -225,7 +226,7 @@ public class XMLElement {
/**
* Adds the given text as a child to this node. The text will be quoted. May
* only be called before this element has been closed.
- *
+ *
* @param text
* text to add
* @throws IOException
@@ -246,7 +247,7 @@ public class XMLElement {
/**
* Creates a new child element for this element. Might be overridden in
* subclasses to return a instance of the subclass.
- *
+ *
* @param name
* name of the child element
* @return child element instance
@@ -259,7 +260,7 @@ public class XMLElement {
/**
* Closes this element if it has not been closed before.
- *
+ *
* @throws IOException
* in case of problems with the underlying output
*/
diff --git a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java
index 7f2b7d3f..dcbe1bba 100644
--- a/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java
+++ b/org.jacoco.report/src/org/jacoco/report/internal/xml/XMLGroupVisitor.java
@@ -1,14 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
* Marc R. Hoffmann - generalized structure, line info
- *
+ *
*******************************************************************************/
package org.jacoco.report.internal.xml;
@@ -29,7 +30,7 @@ public class XMLGroupVisitor extends AbstractGroupVisitor {
/**
* New handler for a group with the given name.
- *
+ *
* @param element
* XML-Element representing this coverage node. The start tag
* must not be closed yet to allow adding additional attributes.
diff --git a/org.jacoco.report/src/org/jacoco/report/package-info.java b/org.jacoco.report/src/org/jacoco/report/package-info.java
index 64ed4dde..f3c403e2 100644
--- a/org.jacoco.report/src/org/jacoco/report/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Marc R. Hoffmann - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/xml/XMLFormatter.java b/org.jacoco.report/src/org/jacoco/report/xml/XMLFormatter.java
index 3bda5ed4..303a582b 100644
--- a/org.jacoco.report/src/org/jacoco/report/xml/XMLFormatter.java
+++ b/org.jacoco.report/src/org/jacoco/report/xml/XMLFormatter.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak -initial API and implementation
- *
+ *
*******************************************************************************/
package org.jacoco.report.xml;
@@ -35,7 +36,7 @@ public class XMLFormatter {
/**
* Sets the encoding used for generated XML document. Default is UTF-8.
- *
+ *
* @param outputEncoding
* XML output encoding
*/
@@ -45,7 +46,7 @@ public class XMLFormatter {
/**
* Creates a new visitor to write a report to the given stream.
- *
+ *
* @param output
* output stream to write the report to
* @return visitor to emit the report data to
diff --git a/org.jacoco.report/src/org/jacoco/report/xml/package-info.java b/org.jacoco.report/src/org/jacoco/report/xml/package-info.java
index 9d9236aa..a2488089 100644
--- a/org.jacoco.report/src/org/jacoco/report/xml/package-info.java
+++ b/org.jacoco.report/src/org/jacoco/report/xml/package-info.java
@@ -1,13 +1,14 @@
/*******************************************************************************
- * Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ * This program and the accompanying materials are made available under
+ * the terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Brock Janiczak - initial API and implementation
- *
+ *
*******************************************************************************/
/**
diff --git a/org.jacoco.report/src/org/jacoco/report/xml/report.dtd b/org.jacoco.report/src/org/jacoco/report/xml/report.dtd
index 0e84bdf8..c7c299d0 100644
--- a/org.jacoco.report/src/org/jacoco/report/xml/report.dtd
+++ b/org.jacoco.report/src/org/jacoco/report/xml/report.dtd
@@ -1,10 +1,11 @@
-<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
+<!--
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
+
Contributors:
Brock Janiczak - initial API and implementation
Marc R. Hoffmann - generalized report structure, line info, documentation
@@ -55,7 +56,7 @@
<!ATTLIST method desc CDATA #REQUIRED>
<!-- first source line number of this method -->
<!ATTLIST method line CDATA #IMPLIED>
-
+
<!-- representation of a source file -->
<!ELEMENT sourcefile (line*, counter*)>
<!-- local source file name -->
diff --git a/org.jacoco.tests/pom.xml b/org.jacoco.tests/pom.xml
index 3efa06c9..05632eb3 100644
--- a/org.jacoco.tests/pom.xml
+++ b/org.jacoco.tests/pom.xml
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2009, 2019 Mountainminds GmbH & Co. KG and Contributors
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
+ Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
+ This program and the accompanying materials are made available under
+ the terms of the Eclipse Public License 2.0 which is available at
+ http://www.eclipse.org/legal/epl-2.0
+
+ SPDX-License-Identifier: EPL-2.0
Contributors:
Evgeny Mandrikov - initial API and implementation
@@ -16,7 +17,7 @@
<parent>
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.build</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<relativePath>../org.jacoco.build</relativePath>
</parent>
diff --git a/pom.xml b/pom.xml
index 08fc6691..250e52d7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<groupId>org.jacoco</groupId>
<artifactId>root</artifactId>
- <version>0.8.4</version>
+ <version>0.8.7</version>
<packaging>pom</packaging>
<modules>