You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@helix.apache.org by lujiefsi <gi...@git.apache.org> on 2018/05/01 02:02:18 UTC
[GitHub] helix pull request #200: throw new Exception to avoid ugly NPE
Github user lujiefsi commented on a diff in the pull request:
https://github.com/apache/helix/pull/200#discussion_r185154949
--- Diff: helix-core/src/main/java/org/apache/helix/tools/commandtools/ZkGrep.java ---
@@ -463,9 +463,8 @@ static File gunzip(File zipFile) {
return outputFile;
} catch (IOException e) {
LOG.error("fail to gunzip file: " + zipFile, e);
+ throw new Exception("fail to gunzip file" + zipFile);
--- End diff --
why not we check the null in ZkGrep#processCommandLineArgs:
if (lastZkSnapshot == null){
LOG.error("fail to gunzip file" + zkDataDirs[1]);
System.exit(1);
}
@brettKK
---