Skip to content

Commit

Permalink
refactor(ArchitectureEnforcer): replace treeSet with hashset (#3661)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Oct 24, 2020
1 parent f7946b7 commit 5781f48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ public void testSpecPackage() {
// contract: when a pull-request introduces a new package, it is made explicit during code review
// when a pull-request introduces a new package, this test fails and the author has to explicitly declare the new package here

Set<String> officialPackages = new TreeSet<>();
Set<String> officialPackages = new HashSet<>();
officialPackages.add("spoon.decompiler");
officialPackages.add("spoon");
officialPackages.add(""); // root package

SpoonAPI spoon = new Launcher();
spoon.addInputResource("src/main/java/");
spoon.buildModel();
final Set<String> currentPackages = new TreeSet<>();
final Set<String> currentPackages = new HashSet<>();
spoon.getModel().processWith(new AbstractProcessor<CtPackage>() {
@Override
public void process(CtPackage element) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ public void testSpecPackage() {
// contract: when a pull-request introduces a new package, it is made explicit during code review
// when a pull-request introduces a new package, this test fails and the author has to explicitly declare the new package here

Set<String> officialPackages = new TreeSet<>();
Set<String> officialPackages = new HashSet<>();
officialPackages.add("spoon.compiler.builder");
officialPackages.add("spoon.compiler");
officialPackages.add("spoon.javadoc");
Expand Down Expand Up @@ -431,7 +431,7 @@ public void testSpecPackage() {
SpoonAPI spoon = new Launcher();
spoon.addInputResource("src/main/java/");
spoon.buildModel();
final Set<String> currentPackages = new TreeSet<>();
final Set<String> currentPackages = new HashSet<>();
spoon.getModel().processWith(new AbstractProcessor<CtPackage>() {
@Override
public void process(CtPackage element) {
Expand Down

0 comments on commit 5781f48

Please sign in to comment.