From 5aa1ed527859621d8837ef00ed18a54d0a03aecf Mon Sep 17 00:00:00 2001 From: emmanue1 Date: Thu, 6 Aug 2015 20:47:58 +0200 Subject: [PATCH] Fixes bug in Container.Entry implementations --- .../jd/gui/controller/SearchInConstantPoolsController.groovy | 4 ++-- .../org/jd/gui/controller/SelectLocationController.groovy | 4 ++-- .../gui/service/fileloader/AbstractFileLoaderProvider.groovy | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/groovy/org/jd/gui/controller/SearchInConstantPoolsController.groovy b/app/src/main/groovy/org/jd/gui/controller/SearchInConstantPoolsController.groovy index f6e5be16..e6bf5e2c 100644 --- a/app/src/main/groovy/org/jd/gui/controller/SearchInConstantPoolsController.groovy +++ b/app/src/main/groovy/org/jd/gui/controller/SearchInConstantPoolsController.groovy @@ -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 getChildren() { children } } // Create a filtered container diff --git a/app/src/main/groovy/org/jd/gui/controller/SelectLocationController.groovy b/app/src/main/groovy/org/jd/gui/controller/SelectLocationController.groovy index f9927a4e..efdeaae3 100644 --- a/app/src/main/groovy/org/jd/gui/controller/SelectLocationController.groovy +++ b/app/src/main/groovy/org/jd/gui/controller/SelectLocationController.groovy @@ -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 getChildren() { children } } // Create a filtered container diff --git a/services/src/main/groovy/org/jd/gui/service/fileloader/AbstractFileLoaderProvider.groovy b/services/src/main/groovy/org/jd/gui/service/fileloader/AbstractFileLoaderProvider.groovy index 143a4497..ff2133a5 100644 --- a/services/src/main/groovy/org/jd/gui/service/fileloader/AbstractFileLoaderProvider.groovy +++ b/services/src/main/groovy/org/jd/gui/service/fileloader/AbstractFileLoaderProvider.groovy @@ -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 getChildren() { children } } def container = api.getContainerFactory(rootPath)?.make(api, parentEntry, rootPath)