Skip to content

Commit

Permalink
Run rewrite recommendations and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-dejongh committed Nov 16, 2024
1 parent af7bf26 commit 62557f9
Show file tree
Hide file tree
Showing 5 changed files with 387 additions and 382 deletions.
138 changes: 69 additions & 69 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,79 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>be.sddevelopment</groupId>
<artifactId>modular-validators</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>be.sddevelopment</groupId>
<artifactId>modular-validators</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>core</artifactId>
<artifactId>core</artifactId>


<dependencies>
<!-- BEGIN TEST SCOPE -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- END TEST SCOPE -->
<dependencies>
<!-- BEGIN TEST SCOPE -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.bytebuddy</groupId>
<artifactId>byte-buddy-agent</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- END TEST SCOPE -->

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
</dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ static boolean isInstantiatable(JavaClass classToCheck) {
return false;
}
} catch (UnsupportedOperationException | InstantiationException |
IllegalAccessException | InvocationTargetException e) {
IllegalAccessException | InvocationTargetException e) {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package be.sddevelopment.validation.specs.usage;

import be.sddevelopment.validation.core.*;
import com.google.common.collect.ImmutableList;
import org.apache.commons.lang3.StringUtils;
import org.assertj.core.api.WithAssertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;

Expand All @@ -14,7 +11,6 @@
import java.util.List;
import java.util.Objects;
import java.util.UUID;
import java.util.function.Predicate;

import static be.sddevelopment.validation.CheckedTestUtils.invalid;
import static be.sddevelopment.validation.CheckedTestUtils.valid;
Expand Down Expand Up @@ -54,7 +50,8 @@ void canHandleBasicDateLogic() {
.matches(Rationale::isPassing);
}

private record DateBasedDummyObject(LocalDate localDate) {}
private record DateBasedDummyObject(LocalDate localDate) {
}

@Test
void canHandleEmailValidation() {
Expand All @@ -80,7 +77,8 @@ private static boolean containsProhibitedAtoms(EmailContact emailContact) {
.anyMatch(atom -> containsIgnoreCase(emailContact.email(), atom));
}

private record EmailContact(UUID userIdentifier, String email, String name, String lastName) { }
private record EmailContact(UUID userIdentifier, String email, String name, String lastName) {
}

}

Expand Down
26 changes: 13 additions & 13 deletions dsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>be.sddevelopment</groupId>
<artifactId>modular-validators</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<parent>
<groupId>be.sddevelopment</groupId>
<artifactId>modular-validators</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>dsl</artifactId>
<artifactId>dsl</artifactId>

<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>


</project>
Loading

0 comments on commit 62557f9

Please sign in to comment.