test: Null-mark the unit tests.
Change-Id: I0d7fc3443cacda222a58e6f098ebed4310bb4691
diff --git a/core/pom.xml b/core/pom.xml
index 512d231..d965276 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -102,7 +102,19 @@
<version>3.42.0-eisop4</version>
</path>
</annotationProcessorPaths>
+ <annotationProcessors>
+ <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
+ </annotationProcessors>
<compilerArgs>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
+ <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
+ <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
<arg>-Xmaxerrs</arg>
<arg>10000</arg>
<arg>-Xmaxwarns</arg>
@@ -113,20 +125,6 @@
<execution>
<id>default-compile</id>
<configuration>
- <annotationProcessors>
- <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
- </annotationProcessors>
- <compilerArgs combine.children="append">
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
- <arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
- <arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
- </compilerArgs>
</configuration>
</execution>
<execution>
diff --git a/core/src/test/java/eu/mulk/quarkus/googlecloud/jsonlogging/FormatterBenchmark.java b/core/src/test/java/eu/mulk/quarkus/googlecloud/jsonlogging/FormatterBenchmark.java
index c330dfe..7bbdac6 100644
--- a/core/src/test/java/eu/mulk/quarkus/googlecloud/jsonlogging/FormatterBenchmark.java
+++ b/core/src/test/java/eu/mulk/quarkus/googlecloud/jsonlogging/FormatterBenchmark.java
@@ -4,8 +4,11 @@
package eu.mulk.quarkus.googlecloud.jsonlogging;
+import static java.util.logging.Level.FINEST;
+
import java.util.List;
-import org.jboss.logmanager.ExtLogRecord;
+import java.util.logging.LogRecord;
+import org.jboss.logmanager.formatters.Formatters;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
@@ -15,11 +18,14 @@
@State(org.openjdk.jmh.annotations.Scope.Benchmark)
public class FormatterBenchmark {
- private ExtLogRecord simpleLogRecord;
- private ExtLogRecord structuredLogRecord;
- private ExtLogRecord massivelyStructuredLogRecord;
- private ExtLogRecord nestedLogRecord;
- private Formatter formatter;
+ private static final LogRecord NULL_LOG_RECORD = new LogRecord(FINEST, "");
+ private static final java.util.logging.Formatter NULL_FORMATTER = Formatters.nullFormatter();
+
+ private LogRecord simpleLogRecord = NULL_LOG_RECORD;
+ private LogRecord structuredLogRecord = NULL_LOG_RECORD;
+ private LogRecord massivelyStructuredLogRecord = NULL_LOG_RECORD;
+ private LogRecord nestedLogRecord = NULL_LOG_RECORD;
+ private java.util.logging.Formatter formatter = NULL_FORMATTER;
@Setup
public void setup() {