[
https://issues.apache.org/jira/browse/ZOOKEEPER-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16742513#comment-16742513
]
Hudson commented on ZOOKEEPER-2284:
-----------------------------------
SUCCESS: Integrated in Jenkins build ZooKeeper-trunk #350 (See
[https://builds.apache.org/job/ZooKeeper-trunk/350/])
ZOOKEEPER-2284: LogFormatter and SnapshotFormatter does not handle (andor: rev
d149b134049dc8527ba81a9546836942fcabc5b6)
* (edit)
zookeeper-server/src/main/java/org/apache/zookeeper/server/LogFormatter.java
* (add) zookeeper-server/src/test/java/org/apache/zookeeper/ZKUtilTest.java
* (edit)
zookeeper-server/src/main/java/org/apache/zookeeper/server/SnapshotFormatter.java
* (edit) zookeeper-server/src/main/java/org/apache/zookeeper/ZKUtil.java
> LogFormatter and SnapshotFormatter does not handle FileNotFoundException
> gracefully
> -----------------------------------------------------------------------------------
>
> Key: ZOOKEEPER-2284
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2284
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Mohammad Arshad
> Assignee: maoling
> Priority: Minor
> Labels: pull-request-available
> Fix For: 3.6.0, 3.5.5
>
> Attachments: ZOOKEEPER-2284-01.patch, ZOOKEEPER-2284-02.patch,
> ZOOKEEPER-2284-03.patch, ZOOKEEPER-2284-04.patch
>
> Time Spent: 3.5h
> Remaining Estimate: 0h
>
> {{LogFormatter}} and {{SnapshotFormatter}} does not handle
> FileNotFoundException gracefully. If file no exist then these classes
> propagate the exception to console.
> {code}
> Exception in thread "main" java.io.FileNotFoundException: log.1 (The system
> cannot find the file specified)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(FileInputStream.java:146)
> at java.io.FileInputStream.<init>(FileInputStream.java:101)
> at org.apache.zookeeper.server.LogFormatter.main(LogFormatter.java:49)
> {code}
> File existence should be validated and appropriate message should be
> displayed on console if file does not exist
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)