Permalink
Browse files

Simplify resource detection code

  • Loading branch information...
1 parent 7ba2c2d commit e9ca7115e87399197bf97843dcd109702484979f @jwills jwills committed Jun 30, 2012
@@ -67,7 +67,7 @@ public static void tearDown() throws IOException {
@Test
public void testKittenShell() throws Exception {
- String config = "lua/distshell.lua";
+ String config = "/lua/distshell.lua";
// For the outputs
File tmpFile = File.createTempFile("distshell", ".txt");
@@ -63,11 +63,7 @@ public static InputStream getFileOrResource(String name) {
LOG.error("A file suddenly disappeared", e);
}
} else {
- try {
- return Resources.newInputStreamSupplier(Resources.getResource(name)).getInput();
- } catch (IOException e) {
- LOG.error("Error loading resource: " + name, e);
- }
+ return LocalDataHelper.class.getResourceAsStream(name);
}
return null;
}

0 comments on commit e9ca711

Please sign in to comment.