aboutsummaryrefslogtreecommitdiff
path: root/org.jacoco.agent.rt.test/src/org/jacoco
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 06:56:49 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 06:56:49 +0000
commit22de46a4df055721c6de6da7dd81a36aa93d1b04 (patch)
treee68ce50b1fc964c12a1eb020ca8b2483ff2955d4 /org.jacoco.agent.rt.test/src/org/jacoco
parent59fc3796c584e0ab1b7239e4b47a0294f63be2d6 (diff)
parentdca25d5573fcab68eacea5df8ae7aa079b8f252f (diff)
downloadjacoco-android13-mainline-sdkext-release.tar.gz
Change-Id: Ie8df0fcae308979132bc49b24b1804d2146914d0
Diffstat (limited to 'org.jacoco.agent.rt.test/src/org/jacoco')
-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
16 files changed, 124 insertions, 106 deletions
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();