[metrics-bugs] #22695 [Metrics/metrics-lib]: descriptor file processing
Tor Bug Tracker & Wiki
blackhole at torproject.org
Thu Jun 22 13:31:18 UTC 2017
#22695: descriptor file processing
-------------------------------------+-------------------------------
Reporter: iwakeh | Owner: metrics-team
Type: defect | Status: new
Priority: High | Milestone: metrics-lib 2.0.0
Component: Metrics/metrics-lib | Version:
Severity: Normal | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
-------------------------------------+-------------------------------
In 1.9.0 a new method `getDescrptorFile` was introduced. This actually
can cause various problems and has some open design questions that should
be answered in this ticket.
(I'll attach a branch with a test demonstration part of the problem.)
`DescriptorParser` has the new method (since 1.9.0):
{{{
public Iterable<Descriptor> parseDescriptors(byte[] rawDescriptorBytes,
File descriptorFile, String fileName);
}}}
In addition to the problem demonstrated in the (to be attached) test this
raises some questions:
1) What should be done, if `descriptorFile.getName() != fileName`?
2) What should be done, if `descriptorFile != null && (null == fileName ||
fileName.isEmpty())`?
3) What should be done, if `descriptorFile == null && null != fileName`?
4a) What should be done, if `descriptorFile == null && null != fileName &&
fileName.isEmpty()`?
4b) What should be done, if `descriptorFile == null && null == fileName`?
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22695>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the metrics-bugs
mailing list