Last active
          August 29, 2015 14:16 
        
      - 
      
- 
        Save spencergibb/ced5199c80f7a6c89499 to your computer and use it in GitHub Desktop. 
    underscores in domains and java's URI class
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.net.URI; | |
| public class Test { | |
| public static void main(String[] args) { | |
| String r = "http://user:password@foo_bar:8761/eureka/apps"; | |
| URI uri = URI.create(r); | |
| System.out.println(uri.getHost()); | |
| // prints null | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment