Conversation
…in TribbleIndexedFeatureReader
| try { | ||
| is = ParsingUtils.openInputStream(path); | ||
| if (isGZIPPath(path)) { | ||
| if (hasBlockCompressedExtension(path) || hasBlockCompressedExtension(new URI(path))) { |
There was a problem hiding this comment.
it seems that the first part of if statement is only good for improving performance, but this isn't a performance bottleneck. is it needed for anything else?
There was a problem hiding this comment.
Edited: I was thinking in a different change of code, not in this PR when I write the first comment.
I don't think so, so I will change it. I just reproduced the behaviur of isGZIPPath. I think that it will be even better to modify the AbstractFeatureReader.hasBlockCompressedExtension (final File file) to be something like:
public static boolean hasBlockCompressedExtension (final File file) {
return hasBlockCompressedExtension(new URI(file));
}|
I addressed your comment and added other stuff:
Because the deprecated method is not used anymore, should I remove it and get rid of the tests too? Back to you, @yfarjoun! |
| } | ||
|
|
||
| //Visible for testing | ||
| @Deprecated |
There was a problem hiding this comment.
if deprecating, please comment what should be used instead.
There was a problem hiding this comment.
Done, but because it is package specific I wasn't sure if it will be better to remove...
|
@yfarjoun, I added the comment for the deprecated method. |
|
💯 |
* added checking for AbstractFeatureReader.BLOCK_COMPRESSED_EXTENSIONS in TribbleIndexedFeatureReader * fixing WFIterator checking of compressed file * isGZIPPath deprecation * added test for new functionality * fixing URL encoding * added no-remote test file with spaces
Simple patch as suggested in #653.
TribbleIndexedFeatureReader.isGZIPPath()is not used anymore and it could be removed.