Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1531 from cdowding-sl/fix/1520
Browse files Browse the repository at this point in the history
Fix #1520
  • Loading branch information
cdowding-sl authored Nov 12, 2019
2 parents 99e4707 + 276c73c commit 3c5bc22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public Stream<DataBagValue> generate(Field field, FieldSpec spec) {
private Stream<Object> getDataValues(FieldValueSource source, boolean unique) {
if (unique) {
return source.generateAllValues();
}
}

switch (dataType) {
case FULL_SEQUENTIAL:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package com.scottlogic.deg.generator.generation.grouped;

import com.google.inject.Inject;
import com.scottlogic.deg.common.ValidationException;
import com.scottlogic.deg.common.profile.Field;
import com.scottlogic.deg.generator.config.detail.CombinationStrategyType;
import com.scottlogic.deg.generator.fieldspecs.FieldSpec;
Expand Down Expand Up @@ -85,7 +86,7 @@ private FieldSpec updateFirstSpecFromRelations(Field first, FieldSpecGroup group
.map(relation -> createModifierForField(first, relation, group))
.map(Optional::of)
.reduce(Optional.of(firstFieldSpec), this::mergeOptionalFieldspecs)
.orElseThrow(() -> new IllegalStateException("Failed to merge field specs in related fields"));
.orElseThrow(() -> new ValidationException("The provided profile is wholly contradictory!"));

return applyGranularityToFieldSpec(firstFieldSpec, updatedFieldSpec);
}
Expand Down

0 comments on commit 3c5bc22

Please sign in to comment.