[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #22141 [Metrics/metrics-lib]: Deprecate `DescriptorFile` and add relevant information to `Descriptor`
#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
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs