diff --git a/parent/pom.xml b/parent/pom.xml index 73239c87e..1b2c27741 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -22,17 +22,17 @@ UTF-8 1.0.0.Alpha3 - 3.0.0-M3 - 3.0.0-M5 + 3.4.1 + 3.2.2 3.1.0 5.3.18 1.6.0 8.36.1 - 5.8.0-M1 - 1.4.2 + 5.10.1 + 2.2.0 1 - 3.17.2 + 3.24.2 jdt_apt @@ -226,7 +226,7 @@ org.projectlombok lombok - 1.18.22 + 1.18.30 org.immutables @@ -253,7 +253,7 @@ joda-time joda-time - 2.9 + 2.12.5 @@ -309,7 +309,7 @@ commons-io commons-io - 2.7 + 2.15.0 diff --git a/processor/src/test/java/org/mapstruct/ap/testutil/assertions/JavaFileAssert.java b/processor/src/test/java/org/mapstruct/ap/testutil/assertions/JavaFileAssert.java index e6eabd9f8..4c6da0d13 100644 --- a/processor/src/test/java/org/mapstruct/ap/testutil/assertions/JavaFileAssert.java +++ b/processor/src/test/java/org/mapstruct/ap/testutil/assertions/JavaFileAssert.java @@ -5,7 +5,11 @@ */ package org.mapstruct.ap.testutil.assertions; -import static java.lang.String.format; +import org.assertj.core.api.FileAssert; +import org.assertj.core.error.ShouldHaveSameContent; +import org.assertj.core.internal.Diff; +import org.assertj.core.internal.Failures; +import org.assertj.core.util.diff.Delta; import java.io.File; import java.io.IOException; @@ -15,14 +19,7 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; -import org.apache.commons.io.FileUtils; -import org.assertj.core.api.AbstractCharSequenceAssert; -import org.assertj.core.api.Assertions; -import org.assertj.core.api.FileAssert; -import org.assertj.core.error.ShouldHaveSameContent; -import org.assertj.core.internal.Diff; -import org.assertj.core.internal.Failures; -import org.assertj.core.util.diff.Delta; +import static java.lang.String.format; /** * Allows to perform assertions on .java source files. @@ -39,7 +36,7 @@ public class JavaFileAssert extends FileAssert { private static final String IMPORT_GENERATED_ANNOTATION_REGEX = "import javax\\.annotation\\.(processing\\.)?" + "Generated;"; - private Diff diff = new Diff(); + private final Diff diff = new Diff(); /** * @param actual the actual file @@ -48,22 +45,6 @@ public class JavaFileAssert extends FileAssert { super( actual ); } - /** - * @return assertion on the file content - */ - public AbstractCharSequenceAssert content() { - exists(); - isFile(); - - try { - return Assertions.assertThat( FileUtils.readFileToString( actual, StandardCharsets.UTF_8 ) ); - } - catch ( IOException e ) { - failWithMessage( "Unable to read" + actual + ". Exception: " + e.getMessage() ); - } - return null; - } - /** * Verifies that the specified class is imported in this Java file * @@ -118,7 +99,6 @@ public class JavaFileAssert extends FileAssert { * or if it is a change delta for the date/comments part of a {@code @Generated} annotation. * * @param delta that needs to be checked - * * @return {@code true} if this delta should be ignored, {@code false} otherwise */ private boolean ignoreDelta(Delta delta) {