Skip to content

Commit

Permalink
Merge branch 'release/7.0.0' into NAE-2009
Browse files Browse the repository at this point in the history
  • Loading branch information
machacjozef authored Nov 11, 2024
2 parents bd50f35 + ea54563 commit ad22de1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.10</version>
<executions>
<execution>
<id>default-prepare-agent</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ protected ApplicationRunnerOrderResolver.SortedRunners<T> resolveRunners() {
Map<String, T> customRunners = (Map<String, T>) ApplicationContextProvider.getAppContext().getBeansOfType(GenericTypeResolver.resolveTypeArgument(getClass(), ApplicationRunnerExecutor.class));
ApplicationRunnerOrderResolver.SortedRunners<T> runners = orderResolver.sortByRunnerOrderAnnotation(customRunners.values());
runners.sortUnresolvedRunners();
runners.resolveAllRunners();
return runners;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,21 @@ public SortedRunners(List<T> sorted, List<T> unresolved) {
* @return {@code true} if all unresolved runners have been successfully sorted and the unresolved list is empty;
* {@code false} otherwise.
*/
public boolean sortUnresolvedRunners() {

public boolean resolveAllRunners() {
sortUnresolvedRunners();
replaced.values().forEach(this::removeRunner);
return unresolved.isEmpty();
}

protected void removeRunner(Class<?> runnerClass) {
int classIndex = indexOfClass(sorted, runnerClass);
if (classIndex == -1) return;
T runner = sorted.remove(classIndex);
if (runner != null) removeRunner(runnerClass);
}

protected boolean sortUnresolvedRunners() {
boolean changed = false;
changed = changed || resolveSortingAnnotation(BeforeRunner.class, this::insertBeforeRunner);
changed = changed || resolveSortingAnnotation(AfterRunner.class, this::insertAfterRunner);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@
// log.info("Generated template into file ");
// }
//
//}
//}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class FileFieldTest {
private IPetriNetService petriNetService

@Autowired
private SuperCreatorRunner superCreator;
private SuperCreatorRunner superCreator

private MockMvc mockMvc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@
// testHelper.truncateDbs();
// }
//
//}
//}

0 comments on commit ad22de1

Please sign in to comment.