Extract exchange from URI
Signed-off-by: SirWayne <dennis.melzer@bosch-si.com>
This commit is contained in:
@@ -108,8 +108,7 @@ public final class IpUtil {
|
||||
* If the given string not parsable
|
||||
*/
|
||||
public static URI createAmqpUri(final String virtualHost, final String exchange) {
|
||||
// TODO check
|
||||
return createUri(AMPQP_SCHEME, virtualHost).resolve(exchange);
|
||||
return createUri(AMPQP_SCHEME, virtualHost).resolve("/" + exchange);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -121,7 +121,7 @@ public class IpUtilTest {
|
||||
assertFalse(IpUtil.isHttpUri(amqpUri));
|
||||
assertEquals(host, amqpUri.getHost());
|
||||
assertEquals("amqp", amqpUri.getScheme());
|
||||
assertEquals("path", amqpUri.getPath());
|
||||
assertEquals("/path", amqpUri.getRawPath());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
|
||||
Reference in New Issue
Block a user