Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion http-client/src/main/java/io/avaje/http/client/DHttpApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ <T> T provideFor(Class<T> type, HttpClient httpClient) {
+ type
+ "\nPossible Causes: \n"
+ "1. Missing @Client or @Client.Import annotation.\n"
+ "2. The avaje-http-client-generator dependency was not available during compilation\n");
+ "2. The avaje-http-client-generator dependency was not available during compilation\n"
+ "3. Using JDK 23+, and need to set property <maven.compiler.proc>full</maven.compiler.proc>\n");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ "3. Using JDK 23+, and need to set property <maven.compiler.proc>full</maven.compiler.proc>\n");
+ (Runtime.version().feature() >= 23
? "3. Maven property <maven.compiler.proc>full</maven.compiler.proc> was not set when compiling\n"
: ""));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggested change wouldn't have helped for the actual case which was a bit weird - IDE generated the code, maven didn't, code was published and use on ANOTHER JDK (as part of an integration test that can't run locally yet) ... and failed there on a different JDK.

So the Runtime.version().feature() >= 23 wouldn't help for this scenario.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it feels like a pretty unique set of circumstances ... but I'm kinda feeling that it's better to have the reason in there anyway.

}
return apiProvider.provide(httpClient);
}
Expand Down