Exemplo n.º 1
0
 private static Registry buildUserRegistry(
     Function<? super Registry, ? extends Registry> userRegistryFactory, Registry baseRegistry) {
   Registry userRegistry;
   try {
     userRegistry = userRegistryFactory.apply(baseRegistry);
   } catch (Exception e) {
     Throwables.propagateIfPossible(e);
     throw new StartupFailureException("Failed to build user registry", e);
   }
   return userRegistry;
 }
Exemplo n.º 2
0
 private void executeNested(final String templatePath, final Map<String, ?> model, ByteBuf buffer)
     throws Exception {
   TemplateSource templateSource = includeTransformer.apply(templatePath);
   CompiledTemplate compiledTemplate = getFromCache(compiledTemplateCache, templateSource);
   execute(compiledTemplate, model, buffer);
 }