Skip to content

Commit

Permalink
Merge pull request #63 from iantmoore/master
Browse files Browse the repository at this point in the history
fixed for #62 duplicate glossary entries
  • Loading branch information
iantmoore committed Sep 25, 2017
2 parents 00e47c6 + 4444e1b commit 1b8040d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ Requirements
------------
* Java 8

1.1.1
-----
* Prevent duplicate step implementations being created in the glossary json file. Fixes #62

1.1.0
-----
* Moved substeps config to a single org.substeps hierarchy, existing overrides will still be used, but config should be updated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.*;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
Expand Down Expand Up @@ -179,20 +176,23 @@ public void executeAfterAllConfigs(Config masterConfig) throws MojoExecutionExce
if (masterConfig != null){
List<Config> configs = SubstepsConfigLoader.splitMasterConfig(masterConfig);

Set<String> stepImplementationClassNames = new LinkedHashSet<>();
Set<String> stepImplsToExclude = new LinkedHashSet<>();

for (Config executionConfig : configs) {

List<String> stepImplementationClassNames = NewSubstepsExecutionConfig.getStepImplementationClassNames(executionConfig);
stepImplementationClassNames.addAll(NewSubstepsExecutionConfig.getStepImplementationClassNames(executionConfig));

List<String> stepImplsToExclude = NewSubstepsExecutionConfig.getStepImplementationClassNamesGlossaryExcluded(executionConfig);
stepImplsToExclude.addAll(NewSubstepsExecutionConfig.getStepImplementationClassNamesGlossaryExcluded(executionConfig));
}

if (stepImplsToExclude != null ) {
stepImplementationClassNames.removeAll(stepImplsToExclude);
}
if (stepImplsToExclude != null ) {
stepImplementationClassNames.removeAll(stepImplsToExclude);
}

for (final String classToDocument : stepImplementationClassNames) {
for (final String classToDocument : stepImplementationClassNames) {

classStepTags.addAll(getStepTags(loadedClasses, classRealm, classToDocument));
}
classStepTags.addAll(getStepTags(loadedClasses, classRealm, classToDocument));
}
}
else {
Expand Down

0 comments on commit 1b8040d

Please sign in to comment.