Skip to content

Commit

Permalink
Added support for configuring external constraints in the maven plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed Feb 22, 2024
1 parent 36f0d75 commit 36ee01b
Show file tree
Hide file tree
Showing 10 changed files with 305 additions and 242 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand All @@ -55,7 +55,7 @@ public class ExternalConstraintsModulePostProcessor implements IModuleLoader.IMo
@NonNull
private final List<IConstraintSet> registeredConstraintSets;

public ExternalConstraintsModulePostProcessor(@NonNull Set<IConstraintSet> additionalConstraintSets) {
public ExternalConstraintsModulePostProcessor(@NonNull Collection<IConstraintSet> additionalConstraintSets) {
this.registeredConstraintSets = ObjectUtils.notNull(additionalConstraintSets.stream()
.flatMap(set -> Stream.concat(
Stream.of(set),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ protected IConstraintSet parseResource(@NonNull URI resource, @NonNull Deque<URI
// now check if this constraint set imports other constraint sets
List<MetaschemaModuleConstraints.Import> imports = CollectionUtil.listOrEmpty(obj.getImports());

@NonNull
Map<URI, IConstraintSet> importedConstraints;
@NonNull Map<URI, IConstraintSet> importedConstraints;
if (imports.isEmpty()) {
importedConstraints = ObjectUtils.notNull(Collections.emptyMap());
} else {
Expand Down
Loading

0 comments on commit 36ee01b

Please sign in to comment.