[tor-bugs] #22141 [Metrics/metrics-lib]: Deprecate `DescriptorFile` and add relevant information to `Descriptor`

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jun 16 09:09:35 UTC 2017


#22141: Deprecate `DescriptorFile` and add relevant information to `Descriptor`
---------------------------------+-----------------------------------
 Reporter:  karsten              |          Owner:  karsten
     Type:  enhancement          |         Status:  needs_review
 Priority:  Medium               |      Milestone:  metrics-lib 1.9.0
Component:  Metrics/metrics-lib  |        Version:
 Severity:  Normal               |     Resolution:
 Keywords:                       |  Actual Points:
Parent ID:                       |         Points:
 Reviewer:                       |        Sponsor:
---------------------------------+-----------------------------------

Comment (by iwakeh):

 Throwing such an exception is a valid design decision, see for example
 [https://docs.oracle.com/javase/7/docs/api/java/util/Collection.html
 collection interface], the
 [https://docs.oracle.com/javase/7/docs/api/java/lang/UnsupportedOperationException.html
 `UnsupportedOperationException`].

 The advantage is early failure with a direct message avoiding lengthy bug-
 hunts for empty/null values.
 I also would prefer to avoid (accidentally) relying on the empty/null
 return values for whatever future use-case solution.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/22141#comment:27>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list