[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-9054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15000252#comment-15000252
 ] 

ASF GitHub Bot commented on CLOUDSTACK-9054:
--------------------------------------------

GitHub user DaanHoogland opened a pull request:

    https://github.com/apache/cloudstack/pull/1060

    CLOUDSTACK-9054 use of google-optional as PoC

    this is using guave optional as suggested by @miguelaferreira in #1056. I 
am not convinced it is appropriate for that case (as opposed to throwing an 
exception) but we are going to use Optionals in someway or another. I familiar 
with the concept (except for in rust) and want to see if the 1.8 is 
different/better/worse as well.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DaanHoogland/cloudstack CLOUDSTACK-9054

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1060.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1060
    
----
commit c4dbcb261811c6ce0578f93e3cbd6a3ac4521175
Author: Daan Hoogland <[email protected]>
Date:   2015-11-11T11:14:09Z

    CLOUDSTACK-9054 use of google-optional as PoC

----


> countIp6InRange(final String ip6Range) does not handle open range
> -----------------------------------------------------------------
>
>                 Key: CLOUDSTACK-9054
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9054
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Daan Hoogland
>            Assignee: Daan Hoogland
>
> in case of '-1::0' or "0::0-" errors are thrown while the meaning of the 
> range is clear
> In the testcase for this method an exception is thrown because of this:
> 2015-11-11 10:20:57,997 ERROR [utils.net.NetUtils] (main:) Failed to convert 
> a string to an IPv6 address
> java.lang.IllegalArgumentException: can not parse []
>       at 
> com.googlecode.ipv6.IPv6Address.tryParseStringArrayIntoLongArray(IPv6Address.java:94)
>       at com.googlecode.ipv6.IPv6Address.fromString(IPv6Address.java:80)
>       at com.cloud.utils.net.NetUtils.countIp6InRange(NetUtils.java:1332)
>       at 
> com.cloud.utils.net.NetUtilsTest.testCountIp6InRangeWithNullStart(NetUtilsTest.java:153)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
>       at 
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>       at 
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
>       at 
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>       at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
>       at 
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>       at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
>       at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
>       at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
>       at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
>       at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
>       at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
>       at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to