Skip to content

Commit

Permalink
[core] disallow duplicate validation errors. Fixes #304
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jul 23, 2021
1 parent b4efbd8 commit 3581ee6
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@
package org.jreleaser.util;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;

/**
* @author Andres Almiray
* @since 0.2.0
*/
public class Errors {
private final List<Error> assemblyErrors = new ArrayList<>();
private final List<Error> configurationErrors = new ArrayList<>();
private final Set<Error> assemblyErrors = new LinkedHashSet<>();
private final Set<Error> configurationErrors = new LinkedHashSet<>();

public boolean hasErrors() {
return !assemblyErrors.isEmpty() || !configurationErrors.isEmpty();
Expand Down

0 comments on commit 3581ee6

Please sign in to comment.