Skip to content

Instantly share code, notes, and snippets.

@fabriziocucci
Created May 19, 2016 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fabriziocucci/8d39c47650fdf86008632d50e7e455ad to your computer and use it in GitHub Desktop.
Save fabriziocucci/8d39c47650fdf86008632d50e7e455ad to your computer and use it in GitHub Desktop.
REST resource that triggers a bug on Liberty with Java EE 7 Web Profile 8.5.5.9
package sample.helloworld;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.client.ClientBuilder;
@Path("/")
public class HelloWorldResource {
@Path("say/hello/to/{person}")
@GET
public String helloWorld(@PathParam("person") String person) {
return "Hello " + person;
}
@Path("triggerBug")
@GET
public String triggerBug() {
return ClientBuilder.newClient()
// return JerseyClientBuilder.createClient()
.target("http://localhost:9080/hello-world-0.0.1-SNAPSHOT/rest/say/hello/to/{person}")
.resolveTemplate("person", "Bob")
.request()
.get(String.class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment