fix missing git index view

This commit is contained in:
Sebastian Sdorra
2013-04-17 15:04:39 +02:00
parent d2f038b056
commit 6ea89373d6
2 changed files with 7 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ public class GitRepositoryViewer
/** Field description */ /** Field description */
public static final String RESOURCE_GITINDEX = public static final String RESOURCE_GITINDEX =
"/sonia/scm/git.index.mustache"; "sonia/scm/git.index.mustache";
/** Field description */ /** Field description */
private static final int CHANGESET_PER_BRANCH = 10; private static final int CHANGESET_PER_BRANCH = 10;

View File

@@ -106,6 +106,11 @@ public class ServletMustacheFactory extends DefaultMustacheFactory
resourceName); resourceName);
} }
if (resourceName.startsWith("/"))
{
resourceName = resourceName.substring(1);
}
ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader == null) if (classLoader == null)
@@ -120,7 +125,7 @@ public class ServletMustacheFactory extends DefaultMustacheFactory
{ {
if (logger.isTraceEnabled()) if (logger.isTraceEnabled())
{ {
logger.trace("found resoruce for {}, return reader", resourceName); logger.trace("found resource for {}, return reader", resourceName);
} }
reader = new BufferedReader(new InputStreamReader(is, Charsets.UTF_8)); reader = new BufferedReader(new InputStreamReader(is, Charsets.UTF_8));