kelloggm commented on a change in pull request #1638:
URL: https://github.com/apache/zookeeper/pull/1638#discussion_r608080517
##########
File path:
zookeeper-server/src/main/java/org/apache/zookeeper/server/persistence/SnapStream.java
##########
@@ -104,10 +104,20 @@ public static CheckedInputStream getInputStream(File
file) throws IOException {
InputStream is;
switch (getStreamMode(file.getName())) {
case GZIP:
- is = new GZIPInputStream(fis);
+ try {
Review comment:
I've made this change. Would you all also prefer one `try` around the
entire `switch` in the other method, where only one of the `case`s can throw?
It would make the code look more symmetrical, but it's otherwise unnecessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]