Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit f1e5c4b

Browse files
schaudersdeleuze
authored andcommitted
Fixes inconsistent proxy registration on successive runs.
The `SpringDataComponentProcessor` didn't handle successive identical events. Due to a yet to fix problem it got called multiple times in some scenarios, which in turn resulted in it not properly registering proxies for repositories.
1 parent f3dba2a commit f1e5c4b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-native-configuration/src/main/java/org/springframework/data/SpringDataComponentProcessor.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
*
9090
* @author Andy Clement
9191
* @author Christoph Strobl
92+
* @author Jens Schauder
9293
*/
9394
public class SpringDataComponentProcessor implements ComponentProcessor {
9495

@@ -163,10 +164,7 @@ public class SpringDataComponentProcessor implements ComponentProcessor {
163164

164165
@Override
165166
public boolean handle(NativeContext imageContext, String key, List<String> values) {
166-
if (repositoryName != null && values.contains(repositoryName)) {
167-
return !keysSeen.contains(key);
168-
}
169-
return false;
167+
return repositoryName != null && values.contains(repositoryName);
170168
}
171169

172170
@Override

0 commit comments

Comments
 (0)