Author: asoldano
Date: 2014-08-20 12:15:57 -0400 (Wed, 20 Aug 2014)
New Revision: 18852
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
Log:
Catch specific exceptions only to avoid swallowing errors that should result in deployment
failures instead
Modified:
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java
===================================================================
---
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-20
14:16:42 UTC (rev 18851)
+++
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/addressRewrite/SoapAddressRewriteHelper.java 2014-08-20
16:15:57 UTC (rev 18852)
@@ -23,7 +23,9 @@
import static org.jboss.wsf.stack.cxf.Loggers.ADDRESS_REWRITE_LOGGER;
+import java.net.MalformedURLException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.Map;
@@ -100,7 +102,7 @@
return address;
}
}
- catch (Exception e)
+ catch (MalformedURLException e)
{
ADDRESS_REWRITE_LOGGER.invalidAddressProvidedUseItWithoutRewriting(address,
"");
return address;
@@ -145,7 +147,7 @@
{
new URL(s);
}
- catch (Exception e)
+ catch (MalformedURLException e)
{
return true;
}
@@ -187,7 +189,7 @@
ADDRESS_REWRITE_LOGGER.addressRewritten(origAddress, urlStr);
return urlStr;
}
- catch (Exception e)
+ catch (MalformedURLException e)
{
ADDRESS_REWRITE_LOGGER.invalidAddressProvidedUseItWithoutRewriting(newAddress,
origAddress);
return origAddress;
@@ -223,7 +225,7 @@
String scheme = addrURI.getScheme();
return scheme != null ? scheme : HTTP;
}
- catch (Exception e)
+ catch (URISyntaxException e)
{
return HTTP;
}