[metrics-bugs] #22583 [Metrics/metrics-lib]: use FileVisitor and escalate NoSuchALg. exceptions
Tor Bug Tracker & Wiki
blackhole at torproject.org
Mon Jun 12 14:29:49 UTC 2017
#22583: use FileVisitor and escalate NoSuchALg. exceptions
-------------------------------------+-------------------------------
Reporter: iwakeh | Owner: metrics-team
Type: enhancement | Status: new
Priority: Medium | Milestone: metrics-lib 1.9.0
Component: Metrics/metrics-lib | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------------+-------------------------------
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]).
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22583>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list