Author: jim.ma
Date: 2015-04-02 20:30:20 -0400 (Thu, 02 Apr 2015)
New Revision: 19613
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/Helper.java
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/udp/UDPEndpointAPITestCase.java
Log:
Fix NPE on windows
Modified:
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/Helper.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/Helper.java 2015-04-02
09:00:11 UTC (rev 19612)
+++
stack/cxf/trunk/modules/testsuite/cxf-spring-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/in_container_client/Helper.java 2015-04-03
00:30:20 UTC (rev 19613)
@@ -56,7 +56,7 @@
log.error("Expected instance of " + JBossWSBusFactory.class + "
but got: " + factory.getClass());
return false;
}
- Bus bus = ((JBossWSBusFactory)factory).createBus("cxf.xml"); //force
Spring bus construction、
+ Bus bus = ((JBossWSBusFactory)factory).createBus("cxf.xml"); //force
Spring bus construction
try
{
BusFactory.setThreadDefaultBus(bus);
Modified:
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/udp/UDPEndpointAPITestCase.java
===================================================================
---
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/udp/UDPEndpointAPITestCase.java 2015-04-02
09:00:11 UTC (rev 19612)
+++
stack/cxf/trunk/modules/testsuite/cxf-tests/src/test/java/org/jboss/test/ws/jaxws/cxf/udp/UDPEndpointAPITestCase.java 2015-04-03
00:30:20 UTC (rev 19613)
@@ -133,12 +133,21 @@
}
private boolean isBroadcastAddressAvailable(NetworkInterface networkInterface) {
- for (InterfaceAddress interfaceAddress : networkInterface.getInterfaceAddresses())
{
- InetAddress broadcast = interfaceAddress.getBroadcast();
- if (broadcast != null) {
- return true;
+ try
+ {
+ for (InterfaceAddress interfaceAddress :
networkInterface.getInterfaceAddresses())
+ {
+ InetAddress broadcast = interfaceAddress.getBroadcast();
+ if (broadcast != null)
+ {
+ return true;
+ }
}
}
+ catch (Throwable e)
+ {
+ //in case networkInterface.getInterfaceAddresses() throws NPE on windows
+ }
return false;
}
Show replies by date