You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2020/01/07 20:06:46 UTC

[GitHub] [netbeans] blackleg commented on a change in pull request #1765: Tests in core network module

blackleg commented on a change in pull request #1765: Tests in core network module
URL: https://github.com/apache/netbeans/pull/1765#discussion_r363928085
 
 

 ##########
 File path: platform/core.network/src/org/netbeans/core/network/utils/LocalAddressUtils.java
 ##########
 @@ -111,7 +111,7 @@
             SOMEADDR_IPV4 = InetAddress.getByAddress("some-ipv4-dummy", SOMEADDR_IPV4_RAW);
             SOMEADDR_IPV6 = InetAddress.getByAddress("some-ipv6-dummy", SOMEADDR_IPV6_RAW);
         } catch (UnknownHostException ex) {
-            // Cannot happen by definition
+            LOG.log(Level.SEVERE, "Cannot happen by definition", ex);
 
 Review comment:
   @lbruun Could you check this? I prepared this pull request before merge https://github.com/apache/netbeans/pull/1835, but it's failing now.
   
   `InetAddress.getByAddress("some-ipv4-dummy", SOMEADDR_IPV4_RAW)` throws an exception when it is excuted in linux or macOS environment.
   
   ```
   Jan 07, 2020 8:59:27 PM org.netbeans.core.network.utils.LocalAddressUtils <clinit>
   SEVERE: Cannot happen by definition
   java.net.UnknownHostException: addr is of illegal length
   	at java.base/java.net.InetAddress.getByAddress(InetAddress.java:1208)
   	at org.netbeans.core.network.utils.LocalAddressUtils.<clinit>(LocalAddressUtils.java:111)
   	at org.netbeans.core.network.utils.LocalAddressUtilsTest.testGetLoopbackAddress(LocalAddressUtilsTest.java:77)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
   	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
   	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
   	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
   	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
   	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
   	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
   	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
   	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
   	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
   	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
   	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
   	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
   	at org.apache.tools.ant.taskdefs.optional.junit.JUnit4TestMethodAdapter.run(JUnit4TestMethodAdapter.java:109)
   	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:534)
   	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1196)
   	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:1041)
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists