Skip to content

Instantly share code, notes, and snippets.

View marchof's full-sized avatar
💭
🧑‍💻 ^ 🏔

Marc R. Hoffmann marchof

💭
🧑‍💻 ^ 🏔
View GitHub Profile
Index: jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java
===================================================================
--- jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java (revision 1610)
+++ jacoco-maven-plugin/src/org/jacoco/maven/ReportMojo.java (working copy)
@@ -13,6 +13,7 @@
import java.io.*;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
diff -r c003a108330b -r 7dbcf07be63b jacoco-maven-plugin.test/it/it-recursive-merge/pom.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jacoco-maven-plugin.test/it/it-recursive-merge/pom.xml Thu Jan 26 08:41:51 2012 -0500
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
diff -r c003a108330b -r 4b507047d942 jacoco-maven-plugin.test/it/it-multi-report-merge/pom.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/jacoco-maven-plugin.test/it/it-multi-report-merge/pom.xml Fri Jan 27 10:41:46 2012 -0500
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2009, 2012 Mountainminds GmbH & Co. KG and Contributors
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
Index: jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java
===================================================================
--- jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java (revision 1686)
+++ jacoco-maven-plugin/src/org/jacoco/maven/AgentMojo.java (working copy)
@@ -16,6 +16,7 @@
import java.util.Properties;
import org.apache.maven.artifact.Artifact;
+import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
@marchof
marchof / build.xml
Created January 14, 2013 20:35
This example uses JaCoCo's offline instrumentation capabilities to collect code coverage for JDK classes.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009, 2013 Mountainminds GmbH & Co. KG and Contributors
All rights reserved. This program and the accompanying materials
are made available under the 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:
@marchof
marchof / Target01.java
Created July 19, 2013 05:20
Missing LineNumberTable entries with JDK8?
/**
* Reproducer for Java 8 compiler issue where wrong line numbers are reported..
*/
public class Target01 {
static void m(boolean flag) {
if (flag) {
a();
} else {
b(); // Wrong line number for this invocation (8 instead of 10)
@marchof
marchof / gist:6653664
Created September 21, 2013 20:00
/jacoco-maven-plugin/src/org/jacoco/maven/DumpMojo.java
/*******************************************************************************
* Copyright (c) 2009, 2013 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the 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:
* Chas Honton, Marc R. Hoffmann - initial implementation
*
@marchof
marchof / A-instr.txt
Created April 22, 2014 17:52
JaCoCo Issue 205
// class version 52.0 (52)
// access flags 0x601
public abstract interface jacoco/issue1/A {
// compiled from: A.java
// access flags 0x19
public final static Ljava/lang/Object; var
// access flags 0x1
@marchof
marchof / LowestIntegerWithLossInDouble.java
Last active August 29, 2015 14:05
Puzzle by Dr Wolfgang Laun: "Which is the smallest non-negative integer value that cannot be stored without loss of precision in a double?"
import java.util.function.LongPredicate;
public class LowestIntegerWithLossInDouble {
static long findFirst(long lower, long upper, LongPredicate predicate) {
while (lower < upper) {
long mid = lower + (upper - lower) / 2;
if (predicate.test(mid)) {
upper = mid;
} else {
@marchof
marchof / ExecutionDataServer.java
Created September 2, 2014 05:09
ExecutionDataServer with in-memory buffer
/*******************************************************************************
* Copyright (c) 2009, 2014 Mountainminds GmbH & Co. KG and Contributors
* All rights reserved. This program and the accompanying materials
* are made available under the 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
*