File tree Expand file tree Collapse file tree 6 files changed +14
-14
lines changed
src/main/java/io/avaje/inject/test Expand file tree Collapse file tree 6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >avaje-inject-parent</artifactId >
77 <groupId >io.avaje</groupId >
8- <version >8.3 </version >
8+ <version >8.4 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >io.avaje</groupId >
66 <artifactId >avaje-inject-parent</artifactId >
7- <version >8.3 </version >
7+ <version >8.4 </version >
88 </parent >
99
1010 <artifactId >avaje-inject-generator</artifactId >
1616 <dependency >
1717 <groupId >io.avaje</groupId >
1818 <artifactId >avaje-inject</artifactId >
19- <version >8.3 </version >
19+ <version >8.4 </version >
2020 </dependency >
2121
2222 <!-- test dependencies -->
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >io.avaje</groupId >
66 <artifactId >avaje-inject-parent</artifactId >
7- <version >8.3 </version >
7+ <version >8.4 </version >
88 </parent >
99
1010 <artifactId >avaje-inject-test</artifactId >
124124 <path >
125125 <groupId >io.avaje</groupId >
126126 <artifactId >avaje-inject-generator</artifactId >
127- <version >8.3 </version >
127+ <version >8.4 </version >
128128 </path >
129129 </annotationProcessorPaths >
130130 </configuration >
Original file line number Diff line number Diff line change 99import java .io .InputStreamReader ;
1010import java .io .LineNumberReader ;
1111import java .net .URL ;
12- import java .util .ArrayList ;
13- import java .util .Enumeration ;
14- import java .util .List ;
15- import java .util .ServiceLoader ;
12+ import java .util .*;
1613import java .util .concurrent .locks .ReentrantLock ;
1714
1815/**
@@ -83,15 +80,18 @@ private BeanScope buildFromModules(List<TestModule> testModules) {
8380 @ Nullable
8481 private BeanScope buildFromResources () {
8582 try {
86- List < TestModule > testModules = new ArrayList <>();
83+ Set < Class <?>> testModuleClasses = new LinkedHashSet <>();
8784 Enumeration <URL > urls = ClassLoader .getSystemResources ("META-INF/services/io.avaje.inject.test.TestModule" );
8885 while (urls .hasMoreElements ()) {
8986 String className = readServiceClassName (urls .nextElement ());
9087 if (className != null ) {
91- Class <?> cls = Class .forName (className );
92- testModules .add ((TestModule ) cls .getDeclaredConstructor ().newInstance ());
88+ testModuleClasses .add (Class .forName (className ));
9389 }
9490 }
91+ List <TestModule > testModules = new ArrayList <>();
92+ for (Class <?> cls : testModuleClasses ) {
93+ testModules .add ((TestModule ) cls .getDeclaredConstructor ().newInstance ());
94+ }
9595 return testModules .isEmpty () ? null : buildFromModules (testModules );
9696 } catch (Throwable e ) {
9797 throw new RuntimeException ("Error trying to create TestModule" , e );
Original file line number Diff line number Diff line change 44 <parent >
55 <groupId >io.avaje</groupId >
66 <artifactId >avaje-inject-parent</artifactId >
7- <version >8.3 </version >
7+ <version >8.4 </version >
88 </parent >
99
1010 <artifactId >avaje-inject</artifactId >
Original file line number Diff line number Diff line change 99
1010 <groupId >io.avaje</groupId >
1111 <artifactId >avaje-inject-parent</artifactId >
12- <version >8.3 </version >
12+ <version >8.4 </version >
1313 <packaging >pom</packaging >
1414 <name >avaje inject parent</name >
1515 <description >parent pom for avaje inject library</description >
You can’t perform that action at this time.
0 commit comments