You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@manifoldcf.apache.org by "Karl Wright (JIRA)" <ji...@apache.org> on 2019/06/24 12:34:00 UTC

[jira] [Created] (CONNECTORS-1613) Array Index Out of Bounds exception, JDBC connector with attributes

Karl Wright created CONNECTORS-1613:
---------------------------------------

             Summary: Array Index Out of Bounds exception, JDBC connector with attributes
                 Key: CONNECTORS-1613
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1613
             Project: ManifoldCF
          Issue Type: Bug
          Components: JDBC connector
    Affects Versions: ManifoldCF 2.13
            Reporter: Karl Wright
            Assignee: Karl Wright
             Fix For: ManifoldCF 2.14


The following method can throw AIOOBE:

{code}
  protected void applyMultiAttributeValues(final RepositoryDocument rd, final Map<String, Set<String>> values)
    throws ManifoldCFException
  {
    if (values == null)
    {
      return;
    }

    for (final String attributeName : values.keySet())
    {
      final Set<String> attributes = values.get(attributeName);
      final String[] attributeValues = new String[values.size()];
      int i = 0;
      for (final String attributeValue : attributes)
      {
        attributeValues[i++] = attributeValue;
      }
      rd.addField(attributeName, attributeValues);
    }
  }
{code}




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)