Skip to content

Commit c4b611e

Browse files
committed
#175 - Format code only, no effective change
1 parent 0715360 commit c4b611e

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

http-generator-client/src/main/java/io/avaje/http/generator/client/ClientProcessor.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,15 @@ public synchronized void init(ProcessingEnvironment processingEnv) {
5353

5454
@Override
5555
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment round) {
56-
5756
final var platform = platform();
58-
59-
if (platform instanceof ClientPlatformAdapter) {
60-
61-
} else {
57+
if (!(platform instanceof ClientPlatformAdapter)) {
6258
setPlatform(new ClientPlatformAdapter());
6359
}
6460

65-
for (final Element controller :
66-
round.getElementsAnnotatedWith(typeElement(ClientPrism.PRISM_TYPE))) {
61+
for (final Element controller : round.getElementsAnnotatedWith(typeElement(ClientPrism.PRISM_TYPE))) {
6762
writeClient(controller);
6863
}
69-
for (final Element importedElement :
70-
round.getElementsAnnotatedWith(typeElement(ImportPrism.PRISM_TYPE))) {
64+
for (final Element importedElement : round.getElementsAnnotatedWith(typeElement(ImportPrism.PRISM_TYPE))) {
7165
writeForImported(importedElement);
7266
}
7367
if (round.processingOver()) {
@@ -76,7 +70,7 @@ public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment
7670
setPlatform(platform);
7771
return false;
7872
}
79-
73+
8074
private void writeServicesFile() {
8175
try {
8276
final FileObject metaInfWriter = createMetaInfWriter(METAINF_SERVICES_PROVIDER);
@@ -91,7 +85,6 @@ private void writeServicesFile() {
9185
}
9286

9387
private void writeForImported(Element importedElement) {
94-
9588
ImportPrism.getInstanceOn(importedElement).types().stream()
9689
.map(ProcessingContext::asElement)
9790
.filter(Objects::nonNull)
@@ -108,7 +101,7 @@ private void writeClient(Element controller) {
108101
e.printStackTrace();
109102
logError(reader.beanType(), "Failed to write client class " + e);
110103
}
111-
}
104+
}
112105
}
113106

114107
protected String writeClientAdapter(ControllerReader reader) throws IOException {

0 commit comments

Comments
 (0)