Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@

package io.opentelemetry.instrumentation.jaxrs.v2_0.test;

import static javax.ws.rs.core.MediaType.TEXT_PLAIN;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;

@Path("/ignored")
public interface Resource {
@Path("ignored")
@Produces(TEXT_PLAIN)
String hello(String name);

@Path("/test")
interface SubResource extends Cloneable, Resource {
@Override
@POST
@Path("/hello/{name}")
@Produces(TEXT_PLAIN)
String hello(@PathParam("name") String name);
}

Expand All @@ -42,12 +47,14 @@ class Test3 implements SubResource {
@Override
@POST
@Path("/hi/{name}")
@Produces(TEXT_PLAIN)
public String hello(@PathParam("name") String name) {
return "Test3 " + name + "!";
}

@POST
@Path("/nested")
@Produces(TEXT_PLAIN)
public String nested() {
return hello("nested");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@

package io.opentelemetry.instrumentation.jaxrs.v3_0.test;

import static jakarta.ws.rs.core.MediaType.TEXT_PLAIN;

import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;

@Path("/ignored")
public interface Resource {
@Path("ignored")
@Produces(TEXT_PLAIN)
String hello(String name);

@Path("/test")
interface SubResource extends Cloneable, Resource {
@Override
@POST
@Path("/hello/{name}")
@Produces(TEXT_PLAIN)
String hello(@PathParam("name") String name);
}

Expand All @@ -42,12 +47,14 @@ class Test3 implements SubResource {
@Override
@POST
@Path("/hi/{name}")
@Produces(TEXT_PLAIN)
public String hello(@PathParam("name") String name) {
return "Test3 " + name + "!";
}

@POST
@Path("/nested")
@Produces(TEXT_PLAIN)
public String nested() {
return hello("nested");
}
Expand Down
Loading