diff options
author | James Moger <james.moger@gitblit.com> | 2013-04-16 08:11:48 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-04-16 08:11:48 -0400 |
commit | 35ed88d58fbe11789340b78fe9b6ca363ffd89b1 (patch) | |
tree | 5e5f4507dffbee7ef7cfced46f730b7fafe8d11b /src | |
parent | 107e778323006be247638e466ab1b134c9dcb58f (diff) | |
download | gitblit-35ed88d58fbe11789340b78fe9b6ca363ffd89b1.tar.gz gitblit-35ed88d58fbe11789340b78fe9b6ca363ffd89b1.zip |
Fixed (again?!) regression with repositories page message
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java index 4bce77f5..7d4d68c7 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoriesPage.java @@ -26,8 +26,6 @@ import java.util.List; import org.apache.wicket.Component;
import org.apache.wicket.PageParameters;
import org.apache.wicket.markup.html.basic.Label;
-import org.apache.wicket.resource.ContextRelativeResource;
-import org.apache.wicket.util.resource.ResourceStreamNotFoundException;
import org.eclipse.jgit.lib.Constants;
import com.gitblit.GitBlit;
@@ -160,14 +158,14 @@ public class RepositoriesPage extends RootPage { String message;
InputStreamReader reader = null;
try {
- ContextRelativeResource res = WicketUtils.getResource(name);
- InputStream is = res.getResourceStream().getInputStream();
+ InputStream is = getClass().getResourceAsStream("/" + name);
+ if (is == null) {
+ continue;
+ }
reader = new InputStreamReader(is, Constants.CHARACTER_ENCODING);
message = MarkdownUtils.transformMarkdown(reader);
reader.close();
return message;
- } catch (ResourceStreamNotFoundException t) {
- continue;
} catch (Throwable t) {
message = MessageFormat.format(getString("gb.failedToReadMessage"), file);
error(message, t, false);
|