You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Antonis L (JIRA)" <ji...@apache.org> on 2017/02/16 17:33:41 UTC

[jira] [Created] (HTTPCORE-447) HttpHost.create does not throw IllegalArgumentException for empty string

Antonis L created HTTPCORE-447:
----------------------------------

             Summary: HttpHost.create does not throw IllegalArgumentException for empty string
                 Key: HTTPCORE-447
                 URL: https://issues.apache.org/jira/browse/HTTPCORE-447
             Project: HttpComponents HttpCore
          Issue Type: Bug
          Components: HttpCore
    Affects Versions: 4.4.4
            Reporter: Antonis L
            Priority: Minor


We are currently using httpcore 4.4.1, but the issue still exists in the latest code of the 4.4.x branch. 

HttpHost.create("") does not throw an IllegalArgumentException which I think should be the expected behavior. 

Test to reproduce: 

{code}   
 @Test
    public void testCreateFromEmptyString() throws Exception {
    try {
            HttpHost.create("");
            Assert.fail("IllegalArgumentException expected");
        } catch (final IllegalArgumentException expected) {
        }
    }
{code}






--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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