Skip to content

Commit

Permalink
Use quarkus properties notation in exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasHofman committed Sep 21, 2021
1 parent ff2ae38 commit 3c7c1bd
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@

public class RestClientCDIDelegateBuilder<T> {

private static final String MP_REST = "mp-rest";
private static final String REST_URL_FORMAT = "%s/" + MP_REST + "/url";
private static final String REST_URI_FORMAT = "%s/" + MP_REST + "/uri";
private static final String REST_URL_FORMAT = "quarkus.rest-client.%s.url";
private static final String REST_URI_FORMAT = "quarkus.rest-client.%s.uri";

private final Class<T> jaxrsInterface;
private final String baseUriFromAnnotation;
Expand Down Expand Up @@ -305,7 +304,7 @@ private void configureBaseUrl(RestClientBuilder builder) {
}
if (((baseUriFromAnnotation == null) || baseUriFromAnnotation.isEmpty())
&& propertyOptional.isEmpty()) {
String propertyPrefix = configKey != null ? configKey : jaxrsInterface.getName();
String propertyPrefix = configKey != null ? configKey : "\"" + jaxrsInterface.getName() + "\"";
throw new IllegalArgumentException(
String.format(
"Unable to determine the proper baseUrl/baseUri. " +
Expand Down

0 comments on commit 3c7c1bd

Please sign in to comment.