Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-13198

[GSS](7.1.z) RESTEasy: Log a warn message for REST methods having ambiguous paths.

XMLWordPrintable

      In ResourceMethodRegistry.class, we have a method addResourceFactory which processes the resource methods of the class :

        public void addResourceFactory(ResourceFactory ref, String base, Class<?>[] classes)
         {
            //Some code here
            // https://issues.jboss.org/browse/JBPAPP-7871
            for (Class<?> clazz : classes)
            {
               for (Method method : getDeclaredMethods(clazz))
               {
                  Method _method = findAnnotatedMethod(clazz, method);
                  if (_method != null && !java.lang.reflect.Modifier.isPublic(_method.getModifiers()))
                  {              LogMessages.LOGGER.JAXRSAnnotationsFoundAtNonPublicMethod(method.getDeclaringClass().getName(), method.getName());
                  }
               }
      

      In this method, there are checks for JAXRS annotations on public/private method.

      Similarly, the "protected void processMethod(ResourceFactory rf, String base, ResourceLocator method)" of ResourceMethodRegistry class processes the resource-methods and resource-locators. Is it possible to add a warn message in the EAP logs if REST methods are having ambiguous paths?

              chaowan@redhat.com Chao Wang
              rhn-support-sanaik Saisha Naik (Inactive)
              Daniel Cihak Daniel Cihak
              Daniel Cihak Daniel Cihak
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: