src/main/java/de/uapcore/lightpit/Functions.java

changeset 78
bb4c52bf3439
parent 74
91d1fc2a3a14
child 131
67df332e3146
     1.1 --- a/src/main/java/de/uapcore/lightpit/Functions.java	Sat May 23 13:34:41 2020 +0200
     1.2 +++ b/src/main/java/de/uapcore/lightpit/Functions.java	Sat May 23 13:52:04 2020 +0200
     1.3 @@ -75,28 +75,6 @@
     1.4      }
     1.5  
     1.6      /**
     1.7 -     * Returns the module path of the given LightPIT Servlet module.
     1.8 -     * <p>
     1.9 -     * If you specify a malformed LightPIT servlet, which does not have a module
    1.10 -     * annotation, the path to the <code>/error/404.html</code> page is returned.
    1.11 -     *
    1.12 -     * @param clazz the servlet class
    1.13 -     * @return the module path
    1.14 -     */
    1.15 -    public static String modulePathOf(Class<? extends AbstractLightPITServlet> clazz) {
    1.16 -        Optional<LightPITModule> moduleInfo = Optional.ofNullable(clazz.getAnnotation(LightPITModule.class));
    1.17 -        if (moduleInfo.isPresent()) {
    1.18 -            return moduleInfo.get().modulePath();
    1.19 -        } else {
    1.20 -            LOG.warn(
    1.21 -                    "{} is a LightPIT Servlet but is missing the module annotation.",
    1.22 -                    clazz.getName()
    1.23 -            );
    1.24 -            return "/error/404.html";
    1.25 -        }
    1.26 -    }
    1.27 -
    1.28 -    /**
    1.29       * This class is not instantiatable.
    1.30       */
    1.31      private Functions() {

mercurial