Skip to content

Commit

Permalink
Fixed typo. Used log warning instead of throwing an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
RadekKoubsky committed Oct 30, 2016
1 parent 18946af commit abcd287
Showing 1 changed file with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
*/
package io.silverware.microservices.providers.rest;

import io.silverware.microservices.Context;
import io.silverware.microservices.MicroserviceMetaData;
import io.silverware.microservices.providers.MicroserviceProvider;
import io.silverware.microservices.providers.rest.annotation.ServiceConfiguration;
import io.silverware.microservices.silver.RestClientSilverService;
import io.silverware.microservices.util.Utils;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jboss.resteasy.client.jaxrs.ResteasyClient;
Expand All @@ -29,14 +36,6 @@
import java.util.HashSet;
import java.util.Set;

import io.silverware.microservices.Context;
import io.silverware.microservices.MicroserviceMetaData;
import io.silverware.microservices.SilverWareException;
import io.silverware.microservices.providers.MicroserviceProvider;
import io.silverware.microservices.providers.rest.annotation.ServiceConfiguration;
import io.silverware.microservices.silver.RestClientSilverService;
import io.silverware.microservices.util.Utils;

/**
* Provides a wrapper for calling arbitrary REST service that is deployed anywhere.
* The REST service is injected into a SilverWare microservice as an interface that describes the REST
Expand Down Expand Up @@ -99,11 +98,9 @@ public Set<Object> lookupMicroservice(final MicroserviceMetaData metaData) {

private Object initRestService(final MicroserviceMetaData metaData, final ServiceConfiguration configuration) {
if (configuration.endpoint().isEmpty()) {
new SilverWareException(
String.format(
"The endpoint for the injected Rest service: %s is not provided. Specify the endpoint within the "
+ "%s annotation.",
metaData.getType(), configuration.getClass()));
log.warn("The endpoint for the injected Rest service: {} is not provided. Specify the endpoint within the "
+ "%s annotation.",
metaData.getType(), configuration.getClass());
}

final Object restService = this.client.target(configuration.endpoint()).proxy(metaData.getType());
Expand Down

0 comments on commit abcd287

Please sign in to comment.