From c4be0f5829a3e47afed3a400db7304e821c75c82 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:12:03 +0100 Subject: [PATCH 01/17] #21: Update license file header mvn license:update-file-header --- src/main/java/org/itsallcode/io/Capturable.java | 17 ++++++++++++----- .../itsallcode/io/CapturingOutputStream.java | 17 ++++++++++++----- .../AbstractSystemOutputGuard.java | 17 ++++++++++++----- .../junit/sysextensions/AssertExit.java | 17 ++++++++++++----- .../junit/sysextensions/ExitGuard.java | 15 +++++++++++---- .../junit/sysextensions/SystemErrGuard.java | 17 ++++++++++++----- .../junit/sysextensions/SystemOutGuard.java | 17 ++++++++++++----- .../security/ExitGuardSecurityManager.java | 17 ++++++++++++----- .../security/ExitTrapException.java | 17 ++++++++++++----- .../itsallcode/io/TestCapturingOuputStream.java | 17 ++++++++++++----- .../junit/sysextensions/TestSystemErr.java | 15 +++++++++++---- .../TestSystemErrWithBeforeEach.java | 17 ++++++++++++----- .../junit/sysextensions/TestSystemExit.java | 17 ++++++++++++----- .../junit/sysextensions/TestSystemOut.java | 17 ++++++++++++----- .../TestSystemOutAndErrTogether.java | 17 ++++++++++++----- .../TestSystemOutWithBeforeEach.java | 17 ++++++++++++----- .../sysextensions/TestSytemOutWithBuffer.java | 15 +++++++++++---- 17 files changed, 201 insertions(+), 82 deletions(-) diff --git a/src/main/java/org/itsallcode/io/Capturable.java b/src/main/java/org/itsallcode/io/Capturable.java index 7c02063..5108397 100644 --- a/src/main/java/org/itsallcode/io/Capturable.java +++ b/src/main/java/org/itsallcode/io/Capturable.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -32,4 +39,4 @@ public interface Capturable * @return captured data. */ public String getCapturedData(); -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/io/CapturingOutputStream.java b/src/main/java/org/itsallcode/io/CapturingOutputStream.java index 57bdd3e..a429531 100644 --- a/src/main/java/org/itsallcode/io/CapturingOutputStream.java +++ b/src/main/java/org/itsallcode/io/CapturingOutputStream.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -112,4 +119,4 @@ private String getDataFromCaptureBuffer() { return (this.captureBuffer == null) ? "" : this.captureBuffer; } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/AbstractSystemOutputGuard.java b/src/main/java/org/itsallcode/junit/sysextensions/AbstractSystemOutputGuard.java index 3200a52..cf94149 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/AbstractSystemOutputGuard.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/AbstractSystemOutputGuard.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -129,4 +136,4 @@ protected void closeCapturingOutputStream(final ExtensionContext context) throws { getCapturingOutputStream(context).close(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/AssertExit.java b/src/main/java/org/itsallcode/junit/sysextensions/AssertExit.java index 6bcf795..9bb340a 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/AssertExit.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/AssertExit.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -68,4 +75,4 @@ public static void assertExitWithStatus(final int expectedExitCode, final Runnab } failMissingExit(); } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java b/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java index 9a5c982..c5b5670 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ diff --git a/src/main/java/org/itsallcode/junit/sysextensions/SystemErrGuard.java b/src/main/java/org/itsallcode/junit/sysextensions/SystemErrGuard.java index c45f8ec..e2a3b58 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/SystemErrGuard.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/SystemErrGuard.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -61,4 +68,4 @@ protected Class getParameterAnnotation() { return SysErr.class; } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/SystemOutGuard.java b/src/main/java/org/itsallcode/junit/sysextensions/SystemOutGuard.java index 00e1787..42fa2c1 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/SystemOutGuard.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/SystemOutGuard.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -61,4 +68,4 @@ protected Class getParameterAnnotation() { return SysOut.class; } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java index 7f65a07..38163b5 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -46,4 +53,4 @@ public void trapExit(final boolean trapExit) { this.trapExit = trapExit; } -} \ No newline at end of file +} diff --git a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitTrapException.java b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitTrapException.java index 9984a6b..fd201bb 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitTrapException.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitTrapException.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -29,4 +36,4 @@ public int getExitStatus() { return this.status; } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/io/TestCapturingOuputStream.java b/src/test/java/org/itsallcode/io/TestCapturingOuputStream.java index 5670cf5..7384560 100644 --- a/src/test/java/org/itsallcode/io/TestCapturingOuputStream.java +++ b/src/test/java/org/itsallcode/io/TestCapturingOuputStream.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -108,4 +115,4 @@ void testOutputNotForwardedWhenCapturingInMuteMode() throws IOException this.streamWithMockDelegate.close(); verifyNoInteractions(this.delegate); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErr.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErr.java index cac8f84..510e0fb 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErr.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErr.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErrWithBeforeEach.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErrWithBeforeEach.java index 7b0b4fd..932650a 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErrWithBeforeEach.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemErrWithBeforeEach.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -46,4 +53,4 @@ void testCaptureAfterEachB(final Capturable stream) System.err.print(expected); assertEquals(stream.getCapturedData(), expected); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java index aa93991..e6ebc97 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -85,4 +92,4 @@ void testSystemWithStatusMissingExitThrowsAssertError() } fail("Code sequence where exit was expected did not exit, no assertion error was raised."); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOut.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOut.java index a582726..fbe7fcd 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOut.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOut.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -50,4 +57,4 @@ void testCaptureB(final Capturable stream) System.out.print(expected); assertEquals(stream.getCapturedData(), expected); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutAndErrTogether.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutAndErrTogether.java index 82d1695..f321554 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutAndErrTogether.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutAndErrTogether.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -65,4 +72,4 @@ void testCaptureSystemErr(@SysErr final Capturable err) System.err.print(EXPECTED_ERR); assertEquals(err.getCapturedData(), EXPECTED_ERR); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutWithBeforeEach.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutWithBeforeEach.java index d81d264..2c16f9a 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutWithBeforeEach.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemOutWithBeforeEach.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -46,4 +53,4 @@ void testCaptureAfterEachB(final Capturable stream) System.out.print(expected); assertEquals(stream.getCapturedData(), expected); } -} \ No newline at end of file +} diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSytemOutWithBuffer.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSytemOutWithBuffer.java index d275a0e..5cf7172 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSytemOutWithBuffer.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSytemOutWithBuffer.java @@ -6,10 +6,17 @@ * %% * Copyright (C) 2018 itsallcode.org * %% - * All rights reserved. This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v2.0 which accompanies this distribution and is available at - * - * http://www.eclipse.org/legal/epl-v20.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. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ From bbd7ae623f9ca237a6c201ea5d01b61f0e00ba1e Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:14:15 +0100 Subject: [PATCH 02/17] Upgrade to Java 11 --- .gitignore | 4 +- .settings/org.eclipse.jdt.core.prefs | 117 ++++++++++++++++++++++----- .settings/org.eclipse.jdt.ui.prefs | 2 +- .travis.yml | 1 - pom.xml | 2 +- 5 files changed, 102 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index d0fcfb5..c523c20 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,4 @@ **/*.out /target /bin - -/bin - +/.settings/org.eclipse.jdt.apt.core.prefs diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index dcdf6fd..20c01d9 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,13 +1,18 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 +org.eclipse.jdt.core.compiler.compliance=11 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.processAnnotations=disabled org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -16,21 +21,31 @@ org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_assignment=0 org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 @@ -38,7 +53,9 @@ org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=0 org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 @@ -47,10 +64,11 @@ org.eclipse.jdt.core.formatter.blank_lines_before_method=1 org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 org.eclipse.jdt.core.formatter.blank_lines_before_package=0 org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line_on_wrap org.eclipse.jdt.core.formatter.brace_position_for_block=next_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line @@ -58,23 +76,27 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line -org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true org.eclipse.jdt.core.formatter.comment.format_header=false org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false -org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert org.eclipse.jdt.core.formatter.comment.line_length=80 org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true @@ -85,10 +107,11 @@ org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_empty_lines=false @@ -108,10 +131,10 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=true +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=true -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=true +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert @@ -120,12 +143,16 @@ org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert @@ -150,11 +177,16 @@ org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arg org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert @@ -171,6 +203,7 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not ins org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert @@ -179,13 +212,20 @@ org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert @@ -202,6 +242,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not in org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert @@ -228,11 +269,15 @@ org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_ar org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert @@ -244,6 +289,8 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_ org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert @@ -259,6 +306,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert @@ -269,9 +317,12 @@ org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not inser org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert @@ -282,15 +333,36 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constan org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_if_empty org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_if_empty org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never org.eclipse.jdt.core.formatter.lineSplit=120 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines @@ -300,16 +372,25 @@ org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=commo org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.text_block_indentation=0 +org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs index dbf774b..0dce7c1 100644 --- a/.settings/org.eclipse.jdt.ui.prefs +++ b/.settings/org.eclipse.jdt.ui.prefs @@ -1,7 +1,7 @@ eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true formatter_profile=_itsallcode style -formatter_settings_version=14 +formatter_settings_version=19 sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true diff --git a/.travis.yml b/.travis.yml index 836add8..6465a1f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ dist: trusty language: java jdk: - - oraclejdk8 - openjdk11 cache: diff --git a/pom.xml b/pom.xml index 5df1e72..e0deab7 100644 --- a/pom.xml +++ b/pom.xml @@ -35,9 +35,9 @@ https://github.com/itsallcode/junit5-system-extensions - 1.8 5.3.1 1.3.1 + 11 UTF-8 From 25fb1c48c4991f74e7be34160918dc1641722ce2 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:15:28 +0100 Subject: [PATCH 03/17] Add CodeQl anaylsis --- .github/workflows/codeql-analysis.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 0000000..775fe22 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,44 @@ +name: "CodeQL" + +on: + push: + branches: [develop, master] + pull_request: + branches: [develop] + schedule: + - cron: '0 4 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - uses: actions/setup-java@v1 + with: + java-version: 11 + + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: java + + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 From a1a4323b4d2f71f32aa555f20cc6b8d9dd56cea8 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:16:05 +0100 Subject: [PATCH 04/17] Upgrade dependencies --- README.md | 6 ++++++ pom.xml | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f8307e2..12a84b4 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,12 @@ The list below show all build time dependencies in alphabetical order. Note that * Run `mvn test` to run unit tests. * Run `mvn package` to create the JAR file. +### Generate / update license file header + +```bash +mvn license:update-file-header +``` + ### Publishing to JCenter 1. Add the following to your `~/.m2/settings.xml`: diff --git a/pom.xml b/pom.xml index e0deab7..6571b7d 100644 --- a/pom.xml +++ b/pom.xml @@ -35,9 +35,9 @@ https://github.com/itsallcode/junit5-system-extensions - 5.3.1 - 1.3.1 11 + 5.7.1 + 1.7.1 UTF-8 @@ -67,7 +67,7 @@ org.mockito mockito-core - 3.2.4 + 3.8.0 test @@ -76,7 +76,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 + 3.8.1 ${java.version} ${java.version} @@ -85,7 +85,7 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 + 3.2.1 attach-sources @@ -98,7 +98,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.0.1 + 3.2.0 attach-javadocs @@ -108,7 +108,7 @@ - 8 + ${java.version} UTF-8 true @@ -119,7 +119,7 @@ org.jacoco jacoco-maven-plugin - 0.8.2 + 0.8.6 @@ -137,12 +137,12 @@ maven-surefire-plugin - 2.22.1 + 2.22.2 org.codehaus.mojo license-maven-plugin - 1.16 + 2.0.0 false true From 3cefc85d815c59cf367a6b2b891a437f5997b50b Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:25:26 +0100 Subject: [PATCH 05/17] #21: Add GitHub Action configuration --- .github/workflows/build.yml | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a820d7b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: Build + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master, develop ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Fetch all history for all tags and branches + run: git fetch --prune --unshallow + - uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build with Maven + run: mvn --errors --batch-mode "-Dsonar.host.url=https://sonarcloud.io" -Dsonar.organization=itsallcode -Dsonar.login=$SONAR_TOKEN clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" + - name: Publish Test Report + uses: scacap/action-surefire-report@v1 + if: always() + with: + report_paths: '**/target/surefire-reports/TEST-*.xml' + github_token: ${{ secrets.GITHUB_TOKEN }} From 349f0a62b1c97763a338d8760408352096603707 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 12:49:25 +0100 Subject: [PATCH 06/17] #21: Add code signing and deployment --- README.md | 34 ++++++++++++++++++---------- pom.xml | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 12a84b4..736465e 100644 --- a/README.md +++ b/README.md @@ -122,13 +122,27 @@ mvn license:update-file-header 1. Add the following to your `~/.m2/settings.xml`: ```xml - - - itsallcode-maven-repo - [bintray-username] - [bintray-api-key] - - + + + + ossrh + your-jira-id + your-jira-pwd + + + + + ossrh + + true + + + gpg + the_pass_phrase + + + + ``` 1. Checkout the `develop` branch. @@ -136,10 +150,8 @@ mvn license:update-file-header 1. Run command ```bash - mvn deploy + mvn clean deploy ``` 1. Merge to `master` branch 1. Create a [release](https://github.com/itsallcode/junit5-system-extensions/releases) of the `master` branch on GitHub. -1. Sign in at [bintray.com](https://bintray.com) -1. Go to the [Bintray project page](https://bintray.com/itsallcode/itsallcode/junit5-system-extensions) -1. Publish to Maven Central by clicking the "Sync" button at https://bintray.com/itsallcode/itsallcode/junit5-system-extensions#central. After some time the new version will appear at https://repo1.maven.org/maven2/org/itsallcode/junit5-system-extensions/. +1. After some time the release will be available at [Maven Central](https://repo1.maven.org/maven2/org/itsallcode/junit5-system-extensions/). diff --git a/pom.xml b/pom.xml index 6571b7d..dd1da88 100644 --- a/pom.xml +++ b/pom.xml @@ -41,9 +41,13 @@ UTF-8 + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + - itsallcode-maven-repo - https://api.bintray.com/maven/itsallcode/itsallcode/junit5-system-extensions/;publish=1 + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -71,7 +75,62 @@ test + + + ossrh + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + + org.apache.maven.plugins + maven-gpg-plugin + + + org.apache.maven.plugins + maven-deploy-plugin + + + + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + false + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins @@ -114,6 +173,9 @@ true true true + + -html5 + From fd37f5a24eab552d540a846fe11bf03982ab0505 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 14:39:01 +0100 Subject: [PATCH 07/17] #21: Fix signing plugin --- README.md | 2 +- pom.xml | 85 ++++++++++++++++++++----------------------------------- 2 files changed, 31 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index 736465e..7c2ae31 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ This project provides a set of JUnit 5 extension that allow testing behavior related to functions related to `java.lang.System` (e.g. asserting exit status codes). +[![Build](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml/badge.svg)](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml) [![Build Status](https://travis-ci.com/itsallcode/junit5-system-extensions.svg?branch=master)](https://travis-ci.com/itsallcode/junit5-system-extensions) -[![Download](https://api.bintray.com/packages/itsallcode/itsallcode/junit5-system-extensions/images/download.svg)](https://bintray.com/itsallcode/itsallcode/junit5-system-extensions/_latestVersion) [![Maven Central](https://img.shields.io/maven-central/v/org.itsallcode/junit5-system-extensions)](https://search.maven.org/artifact/org.itsallcode/junit5-system-extensions) ## Acknowledgments diff --git a/pom.xml b/pom.xml index dd1da88..5df6c95 100644 --- a/pom.xml +++ b/pom.xml @@ -75,62 +75,7 @@ test - - - ossrh - - - - org.sonatype.plugins - nexus-staging-maven-plugin - - - org.apache.maven.plugins - maven-gpg-plugin - - - org.apache.maven.plugins - maven-deploy-plugin - - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 2.8.2 - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://oss.sonatype.org/ - false - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - org.apache.maven.plugins @@ -247,6 +192,36 @@ + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://oss.sonatype.org/ + true + + 2018 From b03e1b358edf24c125b329be7a550baa78c3a93f Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 14:55:43 +0100 Subject: [PATCH 08/17] #21: Only sign when explicitly required --- README.md | 5 +++-- pom.xml | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7c2ae31..04cce41 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,9 @@ mvn license:update-file-header 1. Run command ```bash - mvn clean deploy + mvn -DskipSigningArtifacts=false clean deploy ``` -1. Merge to `master` branch + +1. Merge `develop` to `master` branch 1. Create a [release](https://github.com/itsallcode/junit5-system-extensions/releases) of the `master` branch on GitHub. 1. After some time the release will be available at [Maven Central](https://repo1.maven.org/maven2/org/itsallcode/junit5-system-extensions/). diff --git a/pom.xml b/pom.xml index 5df6c95..1d764ce 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,7 @@ 5.7.1 1.7.1 UTF-8 + true @@ -205,6 +206,9 @@ + + ${skipSigningArtifacts} + org.apache.maven.plugins From 574ddd985536db92e8d69c703d8964e64165cf93 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 15:01:01 +0100 Subject: [PATCH 09/17] #21: Add sonar badges --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 04cce41..49ab4a2 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ This project provides a set of JUnit 5 extension that allow testing behavior rel [![Build](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml/badge.svg)](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml) [![Build Status](https://travis-ci.com/itsallcode/junit5-system-extensions.svg?branch=master)](https://travis-ci.com/itsallcode/junit5-system-extensions) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Ajunit5-system-extensions&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ajunit5-system-extensions) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Ajunit5-system-extensions&metric=coverage)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ajunit5-system-extensions) [![Maven Central](https://img.shields.io/maven-central/v/org.itsallcode/junit5-system-extensions)](https://search.maven.org/artifact/org.itsallcode/junit5-system-extensions) ## Acknowledgments From 6062fbd7158a58dd22520af3a9b87d293da38844 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sat, 27 Feb 2021 15:05:06 +0100 Subject: [PATCH 10/17] #21: Remove travis-ci (replaced with github actions) --- .travis.yml | 19 ------------------- README.md | 1 - 2 files changed, 20 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6465a1f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -dist: trusty -language: java - -jdk: - - openjdk11 - -cache: - directories: - - $HOME/.m2 - - $HOME/.sonar/cache - -before_script: - - pip install --user codecov - -script: - - mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install - -after_success: -- codecov diff --git a/README.md b/README.md index 49ab4a2..1e20f93 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ This project provides a set of JUnit 5 extension that allow testing behavior related to functions related to `java.lang.System` (e.g. asserting exit status codes). [![Build](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml/badge.svg)](https://github.com/itsallcode/junit5-system-extensions/actions/workflows/build.yml) -[![Build Status](https://travis-ci.com/itsallcode/junit5-system-extensions.svg?branch=master)](https://travis-ci.com/itsallcode/junit5-system-extensions) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Ajunit5-system-extensions&metric=alert_status)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ajunit5-system-extensions) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=org.itsallcode%3Ajunit5-system-extensions&metric=coverage)](https://sonarcloud.io/dashboard?id=org.itsallcode%3Ajunit5-system-extensions) [![Maven Central](https://img.shields.io/maven-central/v/org.itsallcode/junit5-system-extensions)](https://search.maven.org/artifact/org.itsallcode/junit5-system-extensions) From 4edd8a9d875201678fe6b5fbbe6d0da8aaa84ee5 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 28 Feb 2021 11:34:38 +0100 Subject: [PATCH 11/17] #21: Define required maven version --- README.md | 21 +++++++++++++++++++++ pom.xml | 3 +++ 2 files changed, 24 insertions(+) diff --git a/README.md b/README.md index 1e20f93..0a88333 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,27 @@ The list below show all build time dependencies in alphabetical order. Note that mvn license:update-file-header ``` +## Run local sonar analysis + +```bash +mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar \ + -Dsonar.host.url=https://sonarcloud.io \ + -Dsonar.organization=itsallcode \ + -Dsonar.login=[token] +``` + +See analysis results at https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace-maven-plugin + +## Check for updated dependencies / plugins + +```bash +mvn versions:display-dependency-updates +``` + +```bash +mvn versions:display-plugin-updates +``` + ### Publishing to JCenter 1. Add the following to your `~/.m2/settings.xml`: diff --git a/pom.xml b/pom.xml index 1d764ce..3ee5c31 100644 --- a/pom.xml +++ b/pom.xml @@ -41,6 +41,9 @@ UTF-8 true + + 3.6.3 + ossrh From 72b05b0ce287ac32eabb07647d25c32230a94580 Mon Sep 17 00:00:00 2001 From: kaklakariada Date: Sun, 28 Feb 2021 14:52:33 +0100 Subject: [PATCH 12/17] #21: Fix project name and links --- .github/CONTRIBUTING.md | 6 +++--- README.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 37005ea..ad335b9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thank you for your interest in helping us to make the Junit5-System-Extensions ( This document aims at answering all the questions potential contributors to J5SE might have before feeling ready to get started. # What This Document is not -If you are looking for general information about what OpenFastTrace is, please make sure to check out the [ReadMe](./README.md) that comes with the project. +If you are looking for general information about what JUnit5 system extensions is, please make sure to check out the [ReadMe](./README.md) that comes with the project. # What Kind of Contributions can I Make? @@ -17,12 +17,12 @@ The reviewers will either ask you to work in review findings or if there are non ## Testing We are happy if you test J5SE! While we do a great deal of testing ourselves, we want J5SE to be as portable as possible. So it is especially helpful for us if you test on a platform that we don't have. -If you find a bug, please let us know by writing an [issue ticket](https://github.com/itsallcode/openfasttrace/issues/new?template=Bug_report.md). There is a template for bug tickets that helps you provide all the information that we need to reproduce and tackle the bug you found. +If you find a bug, please let us know by writing an [issue ticket](https://github.com/itsallcode/junit5-system-extensions/issues/new?template=Bug_report.md). There is a template for bug tickets that helps you provide all the information that we need to reproduce and tackle the bug you found. If you are a programmer, a code contribution in form of an automatic unit test case would be most appreciated, since this will make reproduction of the issue easier and prevent future regressions. ## Ideas -Last but not least if you have ideas for ways to improve or extend J5SE, feel free to write a [feature request](https://github.com/itsallcode/openfasttrace/issues/new?template=Feature_request.md). +Last but not least if you have ideas for ways to improve or extend J5SE, feel free to write a [feature request](https://github.com/itsallcode/junit5-system-extensions/issues/new?template=Feature_request.md). # Style Guides We want J5SE to have a professional and uniform coding style. Formatter rules for Eclipse are part of the project. If you use a different editor, please make sure to match the current code formatting. diff --git a/README.md b/README.md index 0a88333..ff381f6 100644 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package sonar:sonar \ -Dsonar.login=[token] ``` -See analysis results at https://sonarcloud.io/dashboard?id=org.itsallcode%3Aopenfasttrace-maven-plugin +See analysis results at https://sonarcloud.io/dashboard?id=org.itsallcode%3Ajunit5-system-extensions ## Check for updated dependencies / plugins From 0ecfbb6d781c0f9eaae53e5d36b49dd6f8a99309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 22 Apr 2021 11:06:24 +0200 Subject: [PATCH 13/17] #23: Delegate Security Manager for Exit Guard --- launch/j5se - run all tests.launch | 48 ++-- .../junit/sysextensions/ExitGuard.java | 16 +- .../security/ExitGuardSecurityManager.java | 241 +++++++++++++++++- .../junit/sysextensions/TestSystemExit.java | 15 +- ...mExitReplacingExistingSecurityManager.java | 79 ++++++ 5 files changed, 359 insertions(+), 40 deletions(-) create mode 100644 src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java diff --git a/launch/j5se - run all tests.launch b/launch/j5se - run all tests.launch index a81b840..01aec37 100644 --- a/launch/j5se - run all tests.launch +++ b/launch/j5se - run all tests.launch @@ -1,27 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java b/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java index c5b5670..a9ab6d6 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/ExitGuard.java @@ -9,13 +9,13 @@ * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. - * + * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is * available at https://www.gnu.org/software/classpath/license.html. - * + * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -48,7 +48,8 @@ private void saveCurrentSecurityManager(final ExtensionContext context) private void installExitGuardSecurityManager(final ExtensionContext context) { - final SecurityManager exitGuardSecurityManager = new ExitGuardSecurityManager(); + final SecurityManager previousSecurityManager = getPreviousSecurityManager(context); + final SecurityManager exitGuardSecurityManager = new ExitGuardSecurityManager(previousSecurityManager); System.setSecurityManager(exitGuardSecurityManager); context.getStore(getNamespace()).put(EXIT_GUARD_SECURITY_MANAGER_KEY, exitGuardSecurityManager); } @@ -78,8 +79,13 @@ public void afterTestExecution(final ExtensionContext context) throws Exception @Override public void afterAll(final ExtensionContext context) throws Exception { - final SecurityManager previousManager = (SecurityManager) context.getStore(getNamespace()) - .get(PREVIOUS_SECURITY_MANAGER_KEY); + final SecurityManager previousManager = getPreviousSecurityManager(context); System.setSecurityManager(previousManager); } + + private SecurityManager getPreviousSecurityManager(final ExtensionContext context) + { + return (SecurityManager) context.getStore(getNamespace()) + .get(PREVIOUS_SECURITY_MANAGER_KEY); + } } diff --git a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java index 38163b5..fb1d524 100644 --- a/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java +++ b/src/main/java/org/itsallcode/junit/sysextensions/security/ExitGuardSecurityManager.java @@ -1,5 +1,8 @@ package org.itsallcode.junit.sysextensions.security; +import java.io.FileDescriptor; +import java.net.InetAddress; + /*- * #%L * JUnit5 System Extensions @@ -9,13 +12,13 @@ * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. - * + * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is * available at https://www.gnu.org/software/classpath/license.html. - * + * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -25,6 +28,12 @@ public class ExitGuardSecurityManager extends SecurityManager { private boolean trapExit = false; + private final SecurityManager delegate; + + public ExitGuardSecurityManager(final SecurityManager delegate) + { + this.delegate = delegate; + } @Override public synchronized void checkExit(final int status) @@ -46,11 +55,233 @@ public void checkPermission(final Permission perm) /** * Switch trapping {@link System#exit(int)} calls on or off. * - * @param trapExit set to true if the - * {@link ExitGuardSecurityManager} should trap exit calls + * @param trapExit + * set to true if the + * {@link ExitGuardSecurityManager} should trap exit calls */ public void trapExit(final boolean trapExit) { this.trapExit = trapExit; } -} + + private boolean hasDelegate() + { + return this.delegate != null; + } + + @Override + public void checkAccept(final String host, final int port) + { + if (this.hasDelegate()) + { + this.delegate.checkAccept(host, port); + } + } + + @Override + public void checkAccess(final Thread thread) + { + if (this.hasDelegate()) + { + this.delegate.checkAccess(thread); + } + } + + @Override + public void checkAccess(final ThreadGroup group) + { + if (this.hasDelegate()) + { + this.delegate.checkAccess(group); + } + } + + @Override + public void checkConnect(final String host, final int port, final Object context) + { + if (this.hasDelegate()) + { + this.delegate.checkConnect(host, port, context); + } + } + + @Override + public void checkConnect(final String host, final int port) + { + if (this.hasDelegate()) + { + this.delegate.checkConnect(host, port); + } + } + + @Override + public void checkCreateClassLoader() + { + if (this.hasDelegate()) + { + this.delegate.checkCreateClassLoader(); + } + } + + @Override + public void checkDelete(final String file) + { + if (this.hasDelegate()) + { + this.delegate.checkDelete(file); + } + } + + @Override + public void checkExec(final String cmd) + { + if (this.hasDelegate()) + { + this.delegate.checkExec(cmd); + } + } + + @Override + public void checkLink(final String lib) + { + if (this.hasDelegate()) + { + this.delegate.checkLink(lib); + } + } + + @Override + public void checkListen(final int port) + { + if (this.hasDelegate()) + { + this.delegate.checkListen(port); + } + } + + @Override + public void checkMulticast(final InetAddress maddr) + { + if (this.hasDelegate()) + { + this.delegate.checkMulticast(maddr); + } + } + + @Override + public void checkPackageAccess(final String pkg) + { + if (this.hasDelegate()) + { + this.delegate.checkPackageAccess(pkg); + } + } + + @Override + public void checkPackageDefinition(final String pkg) + { + if (this.hasDelegate()) + { + this.delegate.checkPackageDefinition(pkg); + } + } + + @Override + public void checkPermission(final Permission perm, final Object context) + { + if (this.hasDelegate()) + { + this.delegate.checkPermission(perm, context); + } + } + + @Override + public void checkPrintJobAccess() + { + if (this.hasDelegate()) + { + this.delegate.checkPrintJobAccess(); + } + } + + @Override + public void checkPropertiesAccess() + { + if (this.hasDelegate()) + { + this.delegate.checkPropertiesAccess(); + } + } + + @Override + public void checkPropertyAccess(final String key) + { + if (this.hasDelegate()) + { + this.delegate.checkPropertyAccess(key); + } + } + + @Override + public void checkRead(final FileDescriptor fd) + { + if (this.hasDelegate()) + { + this.delegate.checkRead(fd); + } + } + + @Override + public void checkRead(final String file, final Object context) + { + if (this.hasDelegate()) + { + this.delegate.checkRead(file, context); + } + } + + @Override + public void checkRead(final String file) + { + if (this.hasDelegate()) + { + this.delegate.checkRead(file); + } + } + + @Override + public void checkSecurityAccess(final String target) + { + if (this.hasDelegate()) + { + this.delegate.checkSecurityAccess(target); + } + } + + @Override + public void checkSetFactory() + { + if (this.hasDelegate()) + { + this.delegate.checkSetFactory(); + } + } + + @Override + public void checkWrite(final FileDescriptor fileDescriptor) + { + if (this.hasDelegate()) + { + this.delegate.checkWrite(fileDescriptor); + } + } + + @Override + public void checkWrite(final String file) + { + if (this.hasDelegate()) + { + this.delegate.checkWrite(file); + } + } +} \ No newline at end of file diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java index e6ebc97..032a9f5 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java @@ -9,13 +9,13 @@ * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0. - * + * * This Source Code may also be made available under the following Secondary * Licenses when the conditions for such availability set forth in the Eclipse * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 * with the GNU Classpath Exception which is * available at https://www.gnu.org/software/classpath/license.html. - * + * * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ @@ -45,7 +45,8 @@ void testSystemExitMissingThrowsAssertError() assertExit(() -> { // intentionally empty }); - } catch (final AssertionError assertionError) + } + catch (final AssertionError assertionError) { assertMissingExitMessage(assertionError); return; @@ -70,7 +71,8 @@ void testSystemExitWithUnexpectedStatusThrowsAssertionError() try { assertExitWithStatus(0, () -> System.exit(1)); - } catch (final AssertionError assertionError) + } + catch (final AssertionError assertionError) { return; } @@ -85,11 +87,12 @@ void testSystemWithStatusMissingExitThrowsAssertError() assertExitWithStatus(0, () -> { // intentionally empty }); - } catch (final AssertionError assertionError) + } + catch (final AssertionError assertionError) { assertMissingExitMessage(assertionError); return; } fail("Code sequence where exit was expected did not exit, no assertion error was raised."); } -} +} \ No newline at end of file diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java new file mode 100644 index 0000000..d66b13e --- /dev/null +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java @@ -0,0 +1,79 @@ +package org.itsallcode.junit.sysextensions; + +import static org.junit.jupiter.api.Assertions.assertAll; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.itsallcode.junit.sysextensions.security.ExitGuardSecurityManager; +import org.itsallcode.junit.sysextensions.security.ExitTrapException; +import org.junit.jupiter.api.Test; + +class TestSystemExitReplacingExistingSecurityManager +{ + @Test + void testFirstSystemExitIntercepted() + { + final SecurityManager previousSecuritymanager = System.getSecurityManager(); + try + { + final SecurityManagerStub securityManagerStub = new SecurityManagerStub(); + final ExitGuardSecurityManager exitGuardsecurityManager = new ExitGuardSecurityManager(securityManagerStub); + System.setSecurityManager(exitGuardsecurityManager); + exitGuardsecurityManager.trapExit(true); + assertAll(() -> assertThrows(ExitTrapException.class, () -> System.exit(1)), + () -> assertFalse(securityManagerStub.wasCheckExitCalled(), "Delegate exit called")); + } + finally + { + System.setSecurityManager(previousSecuritymanager); + } + } + + @Test + void testSecurityCheckGetsDelegated() + { + final SecurityManager previousSecuritymanager = System.getSecurityManager(); + try + { + final SecurityManagerStub securityManagerStub = new SecurityManagerStub(); + final ExitGuardSecurityManager exitGuardsecurityManager = new ExitGuardSecurityManager(securityManagerStub); + System.setSecurityManager(exitGuardsecurityManager); + System.getProperty("any-property"); + assertTrue(securityManagerStub.wasCheckPropertyAccessCalled()); + } + finally + { + System.setSecurityManager(previousSecuritymanager); + } + } + + private static class SecurityManagerStub extends SecurityManager + { + private boolean checkExitCalled = false; + private boolean checkPropertyAccessCalled = false; + + @Override + public void checkExit(final int status) + { + this.checkExitCalled = true; + super.checkExit(status); + } + + @Override + public void checkPropertyAccess(final String key) + { + this.checkPropertyAccessCalled = true; + } + + public boolean wasCheckExitCalled() + { + return this.checkExitCalled; + } + + public boolean wasCheckPropertyAccessCalled() + { + return this.checkPropertyAccessCalled; + } + } +} \ No newline at end of file From a6f0547233a6abba08a6147de61dacad63fa1995 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 22 Apr 2021 12:05:03 +0200 Subject: [PATCH 14/17] #23: Delegate Security Manager for Exit Guard --- README.md | 8 +++++++- doc/changes/changelog.md | 4 ++++ doc/changes/changes_1.1.0.md | 11 +++++++++++ doc/changes/changes_1.2.0.md | 17 +++++++++++++++++ pom.xml | 2 +- 5 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 doc/changes/changelog.md create mode 100644 doc/changes/changes_1.1.0.md create mode 100644 doc/changes/changes_1.2.0.md diff --git a/README.md b/README.md index ff381f6..021f9ab 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ class TestSystemExit } ``` -Note that in order to be able to trap system exit, the `ExitGuard` temporarily replaces the existing security manager (if any). +The `ExitGuard` temporarily replaces the existing security manager. + +From version 1.2.0 on if a security guard existed before, it serves as a delegate for all security checks with the exception of the `checkExit`. ## Asserting Data Sent to `System.out` @@ -91,6 +93,10 @@ Capturing data sent to `System.err` works in the exact same way as in the [`Syst Please check our [contribution guide](.github/CONTRIBUTING.md) to learn how you can help with the project, report errors or request features. +## Changelog + +[Changelog](doc/changes/changelog.mk) + ## Development ### Build Time Dependencies diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md new file mode 100644 index 0000000..bee3298 --- /dev/null +++ b/doc/changes/changelog.md @@ -0,0 +1,4 @@ +# Changes + +* [1.2.0](changes_1.2.0.md) +* [1.1.0](changes_1.1.0.md) \ No newline at end of file diff --git a/doc/changes/changes_1.1.0.md b/doc/changes/changes_1.1.0.md new file mode 100644 index 0000000..c508f32 --- /dev/null +++ b/doc/changes/changes_1.1.0.md @@ -0,0 +1,11 @@ +# JUnit5 System Extensions 1.1.0, released 2019-12-28 + +Code name: Mute output + +## Summary + +To mute the output (i.e. don't forward output to System.out / System.err) call stream.captureMuted() instead of stream.capture(). This can be useful to speed up unit tests. + +## Features + +* #16: Mute output of captured streams \ No newline at end of file diff --git a/doc/changes/changes_1.2.0.md b/doc/changes/changes_1.2.0.md new file mode 100644 index 0000000..449a3db --- /dev/null +++ b/doc/changes/changes_1.2.0.md @@ -0,0 +1,17 @@ +# JUnit5 System Extensions 1.2.0, released 2019-04-22 + +Code name: Mute output + +## Summary + +When trapping `System.exit` calls, the `ExitGuardSecurityManager` now doesn't simply replace an existing security manager anymore. Instead it uses the existing one as a delegate for all checks except the exit check. + +This way applications that require a security manager don't change their behavior. + +## Features + +* #23: Delegate security manager calls to the original security manager + +## Refactoring + +* #21: Migrate to Maven Central \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3ee5c31..36b4eeb 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 org.itsallcode junit5-system-extensions - 1.1.0 + 1.2.0 JUnit5 System Extensions These extensions help testing behavior that is related to `System.x` calls like `exit(int). https://github.com/itsallcode/junit5-system-extensions From 017e5f42ec0605420190d907e7da53a2a77a43bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 22 Apr 2021 12:49:25 +0200 Subject: [PATCH 15/17] #23: Fixed typo in link to changelog. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 618a982..9aec0f5 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ Please check our [contribution guide](.github/CONTRIBUTING.md) to learn how you ## Changelog -[Changelog](doc/changes/changelog.mk) +[Changelog](doc/changes/changelog.md) ## Development From 323d21c23fd195dd1c7b6a82da518313189a4651 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Thu, 22 Apr 2021 12:52:52 +0200 Subject: [PATCH 16/17] #23: Added missing license header. --- .../junit/sysextensions/TestSystemExit.java | 3 +-- ...mExitReplacingExistingSecurityManager.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java index 032a9f5..5d6a2b8 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExit.java @@ -1,5 +1,3 @@ -package org.itsallcode.junit.sysextensions; - /*- * #%L * JUnit5 System Extensions @@ -19,6 +17,7 @@ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 * #L% */ +package org.itsallcode.junit.sysextensions; import static org.itsallcode.junit.sysextensions.AssertExit.assertExit; import static org.itsallcode.junit.sysextensions.AssertExit.assertExitWithStatus; diff --git a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java index d66b13e..aa51171 100644 --- a/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java +++ b/src/test/java/org/itsallcode/junit/sysextensions/TestSystemExitReplacingExistingSecurityManager.java @@ -1,3 +1,22 @@ +/*- + * #%L + * JUnit5 System Extensions + * %% + * Copyright (C) 2018 itsallcode.org + * %% + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the Eclipse + * Public License, v. 2.0 are satisfied: GNU General Public License, version 2 + * with the GNU Classpath Exception which is + * available at https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + * #L% + */ package org.itsallcode.junit.sysextensions; import static org.junit.jupiter.api.Assertions.assertAll; From cd0aaa57a5538c8ce3623f732f8e2f9873ffe5d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=A4r?= Date: Mon, 26 Apr 2021 08:31:45 +0200 Subject: [PATCH 17/17] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: chπ --- doc/changes/changes_1.1.0.md | 4 ++-- doc/changes/changes_1.2.0.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/changes/changes_1.1.0.md b/doc/changes/changes_1.1.0.md index c508f32..440b61d 100644 --- a/doc/changes/changes_1.1.0.md +++ b/doc/changes/changes_1.1.0.md @@ -4,8 +4,8 @@ Code name: Mute output ## Summary -To mute the output (i.e. don't forward output to System.out / System.err) call stream.captureMuted() instead of stream.capture(). This can be useful to speed up unit tests. +To mute the output (i.e. don't forward output to `System.out` / `System.err`) call `stream.captureMuted()` instead of `stream.capture()`. This can be useful to speed up unit tests. ## Features -* #16: Mute output of captured streams \ No newline at end of file +* [#16](https://github.com/itsallcode/junit5-system-extensions/issues/16): Mute output of captured streams diff --git a/doc/changes/changes_1.2.0.md b/doc/changes/changes_1.2.0.md index 449a3db..bce39ef 100644 --- a/doc/changes/changes_1.2.0.md +++ b/doc/changes/changes_1.2.0.md @@ -10,8 +10,8 @@ This way applications that require a security manager don't change their behavio ## Features -* #23: Delegate security manager calls to the original security manager +* [#23](https://github.com/itsallcode/junit5-system-extensions/issues/23): Delegate security manager calls to the original security manager ## Refactoring -* #21: Migrate to Maven Central \ No newline at end of file +* [#21](https://github.com/itsallcode/junit5-system-extensions/issues/21): Migrate to Maven Central