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 21, 2024
1 parent 7b4baf5 commit 1d8a0f0
Show file tree
Hide file tree
Showing 11 changed files with 1,059 additions and 996 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 1d8a0f0

Please sign in to comment.