You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/12/29 13:21:27 UTC

[GitHub] [httpcomponents-client] michael-o edited a comment on issue #190: [HTTPCLIENT-2042] AuthScope uses uppercase for scheme name whereas th…

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org