From 1080aa421439c2c2f12bf3b80be323b847597a05 Mon Sep 17 00:00:00 2001 From: Jan Blom Date: Sat, 10 Feb 2024 08:03:20 +0100 Subject: [PATCH] Some cleanups --- .../caciocavallosilano/cacio/ctc/junit/CTCInterceptor.java | 5 ----- .../caciocavallosilano/cacio/ctc/junit/CacioExtension.java | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CTCInterceptor.java b/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CTCInterceptor.java index e1b6c18..c2464a9 100644 --- a/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CTCInterceptor.java +++ b/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CTCInterceptor.java @@ -1,14 +1,9 @@ package com.github.caciocavallosilano.cacio.ctc.junit; import com.github.caciocavallosilano.cacio.ctc.CTCGraphicsEnvironment; -import net.bytebuddy.asm.Advice; import net.bytebuddy.implementation.bind.annotation.*; -import org.junit.jupiter.api.extension.ConditionEvaluationResult; -import org.junit.jupiter.api.extension.ExecutionCondition; -import org.junit.jupiter.api.extension.ExtensionContext; import java.awt.*; -import java.lang.reflect.Method; public class CTCInterceptor { diff --git a/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CacioExtension.java b/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CacioExtension.java index 7ddc219..ad5c44c 100644 --- a/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CacioExtension.java +++ b/cacio-tta/src/main/java/com/github/caciocavallosilano/cacio/ctc/junit/CacioExtension.java @@ -81,12 +81,9 @@ public class CacioExtension implements ExecutionCondition { Field defaultHeadlessField = java.awt.GraphicsEnvironment.class.getDeclaredField("defaultHeadless"); defaultHeadlessField.setAccessible(true); - defaultHeadlessField.set(null, Boolean.TRUE); + defaultHeadlessField.set(null, Boolean.FALSE); Field headlessField = java.awt.GraphicsEnvironment.class.getDeclaredField("headless"); headlessField.setAccessible(true); - headlessField.set(null, Boolean.TRUE); - - defaultHeadlessField.set(null, Boolean.FALSE); headlessField.set(null, Boolean.FALSE); Class smfCls = Class.forName("sun.java2d.SurfaceManagerFactory");