aboutsummaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorÉamonn McManus <emcmanus@google.com>2021-05-25 09:03:42 -0700
committerGoogle Java Core Libraries <java-libraries-firehose+copybara@google.com>2021-05-25 09:04:16 -0700
commitd4c865be14f28db279006e9f0241f067cb785d23 (patch)
treed4f31ca513a74f58fa67a5f5f81c1a72fcc4e4b2 /service
parent668881918f428e051124ed904bd02b17e2a4a42b (diff)
downloadauto-d4c865be14f28db279006e9f0241f067cb785d23.tar.gz
Continue rather than returning in the AutoService loop.
The old code would return as soon as it found a `META-INF/services` file that contributed nothing to the list of services to be generated. It should have continued instead, to go on to the next provider interface. Fixes https://github.com/google/auto/issues/839. Thanks to @bbyk for the bug report. RELNOTES=Fixed a bug in AutoServiceProcessor that could lead to some services not being processed. PiperOrigin-RevId: 375717338
Diffstat (limited to 'service')
-rw-r--r--service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java b/service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java
index a396c999..e70cf6c9 100644
--- a/service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java
+++ b/service/processor/src/main/java/com/google/auto/service/processor/AutoServiceProcessor.java
@@ -188,7 +188,7 @@ public class AutoServiceProcessor extends AbstractProcessor {
Set<String> newServices = new HashSet<>(providers.get(providerInterface));
if (allServices.containsAll(newServices)) {
log("No new service entries being added.");
- return;
+ continue;
}
allServices.addAll(newServices);