Skip to content

Commit

Permalink
Fixes bug in Container.Entry implementations
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Aug 6, 2015
1 parent dc6f2a7 commit 5aa1ed5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Expand Up @@ -104,8 +104,8 @@ class SearchInConstantPoolsController implements IndexesChangeListener {
URI getUri() { parentEntry.uri }
String getPath() { parentEntry.path }
boolean isDirectory() { parentEntry.isDirectory() }
long length() { 0 }
InputStream getInputStream() { null }
long length() { parentEntry.length() }
InputStream getInputStream() { parentEntry.inputStream }
Collection<Container.Entry> getChildren() { children }
}
// Create a filtered container
Expand Down
Expand Up @@ -61,8 +61,8 @@ class SelectLocationController {
URI getUri() { parentEntry.uri }
String getPath() { parentEntry.path }
boolean isDirectory() { parentEntry.isDirectory() }
long length() { 0 }
InputStream getInputStream() { null }
long length() { parentEntry.length() }
InputStream getInputStream() { parentEntry.inputStream }
Collection<Container.Entry> getChildren() { children }
}
// Create a filtered container
Expand Down
Expand Up @@ -36,8 +36,8 @@ abstract class AbstractFileLoaderProvider implements FileLoader {
URI getUri() { uri }
String getPath() { path }
boolean isDirectory() { file.isDirectory() }
long length() { 0 }
InputStream getInputStream() { null }
long length() { file.length() }
InputStream getInputStream() { file.newInputStream() }
Collection<Container.Entry> getChildren() { children }
}
def container = api.getContainerFactory(rootPath)?.make(api, parentEntry, rootPath)
Expand Down

0 comments on commit 5aa1ed5

Please sign in to comment.