[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpcomponents-commits
Subject:    [httpcomponents-core] branch master updated: More test coverage of parsing of malformed URI authorit
From:       olegk () apache ! org
Date:       2020-09-29 10:07:44
Message-ID: 160137406416.909.5627523978718779947 () gitbox ! apache ! org
[Download RAW message or body]

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git


The following commit(s) were added to refs/heads/master by this push:
     new a420582  More test coverage of parsing of malformed URI authority
a420582 is described below

commit a420582e9247b1b753f79cec82e08160db598769
Author: Oleg Kalnichevski <olegk@apache.org>
AuthorDate: Tue Sep 29 12:07:28 2020 +0200

    More test coverage of parsing of malformed URI authority
---
 .../src/test/java/org/apache/hc/core5/net/TestURIAuthority.java      | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/httpcore5/src/test/java/org/apache/hc/core5/net/TestURIAuthority.java \
b/httpcore5/src/test/java/org/apache/hc/core5/net/TestURIAuthority.java index \
                1b2a807..8aa4a22 100644
--- a/httpcore5/src/test/java/org/apache/hc/core5/net/TestURIAuthority.java
+++ b/httpcore5/src/test/java/org/apache/hc/core5/net/TestURIAuthority.java
@@ -184,6 +184,11 @@ public class TestURIAuthority {
                 CoreMatchers.equalTo(new URIAuthority("somehost", 8080)));
         MatcherAssert.assertThat(URIAuthority.parse("test:test@localhost:38339"),
                 CoreMatchers.equalTo(new URIAuthority("test:test", "localhost", \
38339))); +        try {
+            URIAuthority.create("blah@goggle.com:80@google.com/");
+            Assert.fail("URISyntaxException expected");
+        } catch (final URISyntaxException expected) {
+        }
     }
 
     @Test


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic