Skip to content

Commit

Permalink
Some cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
janblom committed Feb 10, 2024
1 parent 3bce65b commit 1080aa4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 1080aa4

Please sign in to comment.