Skip to content

Commit e39eea2

Browse files
committed
remove service validation logic
1 parent 20bec40 commit e39eea2

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

prism-core/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
<groupId>io.avaje</groupId>
1818
<artifactId>avaje-spi-service</artifactId>
1919
<version>1.5</version>
20-
<optional>true</optional>
21-
<scope>provided</scope>
2220
</dependency>
2321
</dependencies>
2422
</project>

prism-core/src/main/java/io/avaje/prism/internal/ServiceWriter.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,9 @@
77
import static io.avaje.prism.internal.APContext.logNote;
88
import static io.avaje.prism.internal.APContext.logWarn;
99

10-
import java.io.BufferedReader;
11-
import java.io.FileNotFoundException;
1210
import java.io.IOException;
13-
import java.io.InputStreamReader;
1411
import java.io.OutputStreamWriter;
1512
import java.io.PrintWriter;
16-
import java.nio.charset.StandardCharsets;
1713
import java.util.HashSet;
1814
import java.util.Set;
1915

@@ -34,27 +30,8 @@ static void addProcessor(TypeElement e) {
3430
static void write() {
3531

3632
if (services.isEmpty()) return;
37-
3833
// Read the existing service files
3934
final Filer filer = filer();
40-
try (final var f =
41-
filer
42-
.getResource(StandardLocation.CLASS_OUTPUT, "", "META-INF/services/" + PROCESSOR)
43-
.openInputStream();
44-
final BufferedReader r =
45-
new BufferedReader(new InputStreamReader(f, StandardCharsets.UTF_8)); ) {
46-
47-
String line;
48-
while ((line = r.readLine()) != null) services.add(line);
49-
} catch (final FileNotFoundException | java.nio.file.NoSuchFileException x) {
50-
// missing and thus not created yet
51-
} catch (final IOException x) {
52-
logError(
53-
"Failed to load existing service definition file. SPI: "
54-
+ PROCESSOR
55-
+ " exception: "
56-
+ x);
57-
}
5835
try {
5936
logNote("Writing META-INF/services/%s", PROCESSOR);
6037
final FileObject f =
@@ -89,7 +66,6 @@ private static void validateModules() {
8966
if (line.contains("io.avaje.prism.core")) {
9067
logWarn(module, "io.avaje.prism.core should be not be used directly");
9168
}
92-
continue;
9369
}
9470
}
9571

0 commit comments

Comments
 (0)