-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cac000c
commit 252cc1d
Showing
400 changed files
with
20,828 additions
and
16,316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
!.github | ||
!.mvn | ||
target | ||
META-INF | ||
*.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
<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> | ||
|
||
<parent> | ||
<groupId>org.fuin.objects4j</groupId> | ||
<artifactId>objects4j-parent</artifactId> | ||
<version>0.10.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>objects4j-common</artifactId> | ||
|
||
<dependencies> | ||
|
||
<!-- Compile --> | ||
|
||
<dependency> | ||
<groupId>jakarta.validation</groupId> | ||
<artifactId>jakarta.validation-api</artifactId> | ||
</dependency> | ||
|
||
<!-- Test --> | ||
|
||
<dependency> | ||
<groupId>org.fuin</groupId> | ||
<artifactId>utils4j</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</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-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>jakarta.el</groupId> | ||
<artifactId>jakarta.el-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.glassfish</groupId> | ||
<artifactId>jakarta.el</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hibernate.validator</groupId> | ||
<artifactId>hibernate-validator</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
|
||
<plugins> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.smallrye</groupId> | ||
<artifactId>jandex-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-jdeps-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-dependency-plugin</artifactId> | ||
<configuration> | ||
<ignoredUnusedDeclaredDependencies> | ||
<ignoredUnusedDeclaredDependency>jakarta.el:jakarta.el-api</ignoredUnusedDeclaredDependency> | ||
<ignoredUnusedDeclaredDependency>org.glassfish:jakarta.el</ignoredUnusedDeclaredDependency> | ||
<ignoredUnusedDeclaredDependency>org.hibernate.validator:hibernate-validator</ignoredUnusedDeclaredDependency> | ||
</ignoredUnusedDeclaredDependencies> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
|
||
</build> | ||
|
||
</project> |
140 changes: 70 additions & 70 deletions
140
.../common/ConstraintViolationException.java → .../common/ConstraintViolationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,70 @@ | ||
/** | ||
* Copyright (C) 2015 Michael Schnell. All rights reserved. | ||
* http://www.fuin.org/ | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 3 of the License, or (at your option) any | ||
* later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package org.fuin.objects4j.common; | ||
|
||
import jakarta.validation.ConstraintViolation; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
/** | ||
* The contract that was checked is violated. | ||
*/ | ||
public final class ConstraintViolationException extends RuntimeException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final Set<ConstraintViolation<Object>> constraintViolations; | ||
|
||
/** | ||
* Constructor with error message. | ||
* | ||
* @param message | ||
* Message. | ||
*/ | ||
public ConstraintViolationException(final String message) { | ||
super(message); | ||
this.constraintViolations = null; | ||
} | ||
|
||
/** | ||
* Constructor with error message and constraint violations. | ||
* | ||
* @param message | ||
* Message. | ||
* @param constraintViolations | ||
* Constraint violations. | ||
*/ | ||
public ConstraintViolationException(final String message, final Set<ConstraintViolation<Object>> constraintViolations) { | ||
super(message); | ||
this.constraintViolations = constraintViolations; | ||
} | ||
|
||
/** | ||
* Returns the constraint violations. | ||
* | ||
* @return Immutable set of constraint violations or <code>null</code> if only a message is available. | ||
*/ | ||
public final Set<ConstraintViolation<Object>> getConstraintViolations() { | ||
if (constraintViolations == null) { | ||
return null; | ||
} | ||
return Collections.unmodifiableSet(constraintViolations); | ||
} | ||
|
||
} | ||
/** | ||
* Copyright (C) 2015 Michael Schnell. All rights reserved. | ||
* http://www.fuin.org/ | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 3 of the License, or (at your option) any | ||
* later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package org.fuin.objects4j.common; | ||
|
||
import jakarta.validation.ConstraintViolation; | ||
|
||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
/** | ||
* The contract that was checked is violated. | ||
*/ | ||
public final class ConstraintViolationException extends RuntimeException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private final Set<ConstraintViolation<Object>> constraintViolations; | ||
|
||
/** | ||
* Constructor with error message. | ||
* | ||
* @param message | ||
* Message. | ||
*/ | ||
public ConstraintViolationException(final String message) { | ||
super(message); | ||
this.constraintViolations = null; | ||
} | ||
|
||
/** | ||
* Constructor with error message and constraint violations. | ||
* | ||
* @param message | ||
* Message. | ||
* @param constraintViolations | ||
* Constraint violations. | ||
*/ | ||
public ConstraintViolationException(final String message, final Set<ConstraintViolation<Object>> constraintViolations) { | ||
super(message); | ||
this.constraintViolations = constraintViolations; | ||
} | ||
|
||
/** | ||
* Returns the constraint violations. | ||
* | ||
* @return Immutable set of constraint violations or <code>null</code> if only a message is available. | ||
*/ | ||
public final Set<ConstraintViolation<Object>> getConstraintViolations() { | ||
if (constraintViolations == null) { | ||
return null; | ||
} | ||
return Collections.unmodifiableSet(constraintViolations); | ||
} | ||
|
||
} |
Oops, something went wrong.