commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NET-529) SubnetUtils throws exception on valid input
Date Wed, 19 Mar 2014 20:45:43 GMT

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

Sebb commented on NET-529:
--------------------------

NET-511 added the check for address == 0

> SubnetUtils throws exception on valid input
> -------------------------------------------
>
>                 Key: NET-529
>                 URL: https://issues.apache.org/jira/browse/NET-529
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 3.3
>            Reporter: Putinas Piliponis
>              Labels: SubnetUtils
>
> I think that xx.yy.zz.aa/0 should be accepted value by SubnetUtils, where xx.yy.zz.aa
is any valid IPv4 IP address.
> Test case:
> SubnetUtils subnetUtils = new SubnetUtils("10.10.10.10/0");
> However it throws exception:
> java.lang.IllegalArgumentException: Value [0] not in range (0,32]
> 	org.apache.commons.net.util.SubnetUtils.rangeCheck(SubnetUtils.java:304)
> 	org.apache.commons.net.util.SubnetUtils.calculate(SubnetUtils.java:229)
> 	org.apache.commons.net.util.SubnetUtils.<init>(SubnetUtils.java:52)
> (I have updated issue description from original, to reflect that issue is not only with
0.0.0.0/0)



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message