-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
Warning message could be logged, if deployment contains two Application subclass with same @ApplicationPath and same @Path annotation in their end-points.
One deployment contains two application subclasses with the same @ApplicationPath:
@ApplicationPath("a") public class DuplicitePathDupliciteApplicationOne extends Application { @Override public Set<Class<?>> getClasses() { HashSet<Class<?>> set = new HashSet<Class<?>>(); set.add(DuplicitePathDupliciteResourceOne.class); return set; } } @ApplicationPath("a") public class DuplicitePathDupliciteApplicationTwo extends Application { @Override public Set<Class<?>> getClasses() { HashSet<Class<?>> set = new HashSet<Class<?>>(); set.add(DuplicitePathDupliciteResourceTwo.class); return set; } }
And each has resource with the same @Path:
@Path("/b") public class DuplicitePathDupliciteResourceOne { public static final String DUPLICITE_RESPONSE = "response4"; @Path("/c") @GET @Produces(MediaType.TEXT_PLAIN) public String duplicite() { return DUPLICITE_RESPONSE; } } @Path("/b") public class DuplicitePathDupliciteResourceTwo { public static final String DUPLICITE_RESPONSE = "response5"; @Path("/c") @GET @Produces(MediaType.TEXT_PLAIN) public String dupliciteOne() { return DUPLICITE_RESPONSE; } }
With the request:
Response response = client.target("http://localhost:8080/DuplicitePathTest/a/b/c").request().get();
Warning in the server log should be logged as two different resources matches the request.
See the test in the upstream testsuite - org.jboss.resteasy.test.response.DuplicitePathTest.testDuplicationTwoAppTwoResourceSameMethodPath() (excluded from running with testsuite by default)
- is cloned by
-
WFLY-10613 Warning message when accessing endpoint in deployment with two Application subclasses with same @Path
- Closed
- relates to
-
JBEAP-3459 Log warning message if two end-points are conflicting on the same path
- Verified