michael-o edited a comment on issue #190: [HTTPCLIENT-2042] AuthScope uses 
uppercase for scheme name whereas th…
URL: 
https://github.com/apache/httpcomponents-client/pull/190#issuecomment-569505000
 
 
   > 
   > 
   > > Always consider that enums are designed to be exhaustive
   > 
   > @michael-o Out of curiosity, who decreed that?
   
   @ok2c, in my opinion this is a convention. Since a client cannot extend or 
create custom enum instances, the list remains unmodifiable, thus always 
complete. Therefore, you can use `==` for comparsion because one enum value 
exists in the class loader.
   
   I cannot say
   
   ```
   public enum EnterpriseAuthSchemes extends AuthSchemes {
   
     COOL("Cool")
   
   }
   ```
   
   Can you share a counterexample for non-exhaustive enums?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to