[metrics-bugs] #22583 [Metrics/metrics-lib]: use FileVisitor (was: use FileVisitor and escalate NoSuchALg. exceptions)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jun 15 15:23:02 UTC 2017
#22583: use FileVisitor
---------------------------------+------------------------------
Reporter: iwakeh | Owner: metrics-team
Type: enhancement | Status: new
Priority: Medium | Milestone:
Component: Metrics/metrics-lib | Version:
Severity: Normal | Resolution:
Keywords: metrics-help | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
---------------------------------+------------------------------
Changes (by iwakeh):
* keywords: => metrics-help
* milestone: metrics-lib 1.9.0 =>
Old description:
> Use Files.walkFileTree and an extension of SimpleFileVisitor in
> DescriptorReaderImpl to simplify the code which currently is in
> "readDescriptorFiles". Look for other places that would benefit from
> using FileVisitor.
>
> DescriptorImpl: The `NoSuchAlgorithmException` should be escalated as
> runtime exceptions, b/c this is a problem with the jdk/jvm and shouldn't
> be hidden away. I'd suggest using a method for the two digest calls
> (please find a suggestion [https://gitweb.torproject.org/user/iwakeh
> /metrics-
> lib.git/commit/?h=task-22141&id=31a2f15bdc5933cc1f240cff107e01e0fce69a8d
> here]).
New description:
Use Files.walkFileTree and an extension of SimpleFileVisitor in
DescriptorReaderImpl to simplify the code which currently is in
"readDescriptorFiles". Look for other places that would benefit from
using FileVisitor.
--
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22583#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list