ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mario Ivankovits (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-928) Array out of bounds in IgniteUtils.filterReachable
Date Wed, 20 May 2015 14:42:59 GMT
Mario Ivankovits created IGNITE-928:

             Summary: Array out of bounds in IgniteUtils.filterReachable
                 Key: IGNITE-928
                 URL: https://issues.apache.org/jira/browse/IGNITE-928
             Project: Ignite
          Issue Type: Bug
          Components: general
         Environment: Ignite 1.0.5
            Reporter: Mario Ivankovits

There is an "Array out of bounds" exception in IgniteUtils.filterReachable.
You ask for list size == 1 and then get(1) instead of get(0)

    public static List<InetAddress> filterReachable(List<InetAddress> addrs) {
        final int reachTimeout = 2000;

        if (addrs.isEmpty())
            return Collections.emptyList();

        if (addrs.size() == 1) {
>>>            if (reachable(addrs.get(1), reachTimeout))
>>>                return Collections.singletonList(addrs.get(1));

            return Collections.emptyList();


This message was sent by Atlassian JIRA

View raw message