Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartwdouglas committed Sep 6, 2018
1 parent 0189cd4 commit 9a72b24
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 260 deletions.
4 changes: 4 additions & 0 deletions examples/strict/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.shamrock</groupId>
<artifactId>shamrock-rest-client-deployment</artifactId>
</dependency>


<!-- test dependencies -->
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.jboss.shamrock.example.rest;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

@Path("/foo")
public interface RestInterface {

@GET
void get();

}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@
import javax.xml.bind.annotation.XmlRootElement;

import io.reactivex.Single;
import org.eclipse.microprofile.rest.client.RestClientBuilder;

@Path("/test")
public class TestResource {

@GET
public String getTest() {
RestInterface iface = RestClientBuilder.newBuilder().build(RestInterface.class);
return "TEST";
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.jboss.shamrock.restclient.runtime;

import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Parameter;
Expand Down Expand Up @@ -140,7 +141,12 @@ public <T> T build(Class<T> aClass) throws IllegalStateException, RestClientDefi
interfaces[0] = aClass;
interfaces[1] = RestClientProxy.class;

return (T) Proxy.newProxyInstance(classLoader, interfaces, new ProxyInvocationHandler(aClass, actualClient, getLocalProviderInstances(), client));
return (T) Proxy.newProxyInstance(classLoader, interfaces, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
return method.invoke(actualClient, args);
}
});
}

private boolean isMapperDisabled() {
Expand Down

0 comments on commit 9a72b24

Please sign in to comment.