src/java/de/uapcore/lightpit/ModuleManager.java

changeset 9
20a9b2bc9063
parent 8
2dfdb79b5344
child 10
89e3e6e28b69
     1.1 --- a/src/java/de/uapcore/lightpit/ModuleManager.java	Sun Dec 10 16:10:14 2017 +0100
     1.2 +++ b/src/java/de/uapcore/lightpit/ModuleManager.java	Fri Dec 15 17:39:54 2017 +0100
     1.3 @@ -70,26 +70,28 @@
     1.4          try {
     1.5              final Class scclass = Class.forName(reg.getClassName());
     1.6              
     1.7 -            final boolean lpservlet = LightPITServlet.class.isAssignableFrom(scclass);
     1.8 +            final boolean lpservlet = AbstractLightPITServlet.class.isAssignableFrom(scclass);
     1.9              final boolean lpmodule = scclass.isAnnotationPresent(LightPITModule.class);
    1.10              
    1.11              if (lpservlet && !lpmodule) {
    1.12                  LOG.warn(
    1.13 -                    "Servlet is a LightPITServlet but is missing the module annotation: {}",
    1.14 +                    "{} is a LightPIT Servlet but is missing the module annotation.",
    1.15                      reg.getClassName()
    1.16                  );
    1.17              } else if (!lpservlet && lpmodule) {
    1.18                  LOG.warn(
    1.19 -                    "Servlet is annotated as a LightPITModule but does not extend LightPITServlet: {}",
    1.20 -                    reg.getClassName()
    1.21 +                    "{} is annotated as a LightPIT Module but does not extend {}.",
    1.22 +                    reg.getClassName(),
    1.23 +                    AbstractLightPITServlet.class.getSimpleName()
    1.24                  );
    1.25              }
    1.26              
    1.27              return lpservlet && lpmodule;
    1.28          } catch (ClassNotFoundException ex) {
    1.29              LOG.error(
    1.30 -                    "Servlet registration refers to a class which cannot be found by the class loader: {}",
    1.31 -                    reg.getClassName()
    1.32 +                    "Servlet registration refers to class {} which cannot be found by the class loader (Reason: {})",
    1.33 +                    reg.getClassName(),
    1.34 +                    ex.getMessage()
    1.35              );
    1.36              return false;
    1.37          }        

mercurial