Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A119A200B17 for ; Tue, 21 Jun 2016 16:17:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F99A160A4F; Tue, 21 Jun 2016 14:17:53 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E6CFC160A07 for ; Tue, 21 Jun 2016 16:17:52 +0200 (CEST) Received: (qmail 85486 invoked by uid 500); 21 Jun 2016 14:17:52 -0000 Mailing-List: contact commits-help@manifoldcf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@manifoldcf.apache.org Delivered-To: mailing list commits@manifoldcf.apache.org Received: (qmail 85477 invoked by uid 99); 21 Jun 2016 14:17:52 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 14:17:52 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4622E180290 for ; Tue, 21 Jun 2016 14:17:51 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.374 X-Spam-Level: X-Spam-Status: No, score=0.374 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id OZH2x5w5y0C8 for ; Tue, 21 Jun 2016 14:17:50 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 697A15F3F3 for ; Tue, 21 Jun 2016 14:17:49 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 8BE5BE0069 for ; Tue, 21 Jun 2016 14:17:48 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 160253A006B for ; Tue, 21 Jun 2016 14:17:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1749522 - in /manifoldcf/trunk: CHANGES.txt connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Date: Tue, 21 Jun 2016 14:17:47 -0000 To: commits@manifoldcf.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20160621141748.160253A006B@svn01-us-west.apache.org> archived-at: Tue, 21 Jun 2016 14:17:53 -0000 Author: kwright Date: Tue Jun 21 14:17:47 2016 New Revision: 1749522 URL: http://svn.apache.org/viewvc?rev=1749522&view=rev Log: Fix for CONNECTORS-1324. Modified: manifoldcf/trunk/CHANGES.txt manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Modified: manifoldcf/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1749522&r1=1749521&r2=1749522&view=diff ============================================================================== --- manifoldcf/trunk/CHANGES.txt (original) +++ manifoldcf/trunk/CHANGES.txt Tue Jun 21 14:17:47 2016 @@ -3,6 +3,10 @@ $Id$ ======================= 2.5-dev ===================== +CONNECTORS-1324: Fix (again) the SharePoint connector's "use all metadata" +option. +(Konstantin Avdeev) + CONNECTORS-1323: When there were multiple outputs, the second, third, etc outputs would not have their activities properly logged. (Karl Wright) Modified: manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1749522&r1=1749521&r2=1749522&view=diff ============================================================================== --- manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java (original) +++ manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Tue Jun 21 14:17:47 2016 @@ -852,12 +852,15 @@ public class SharePointRepository extend continue; } + // Note well: There's been a lot of back-and forth about this code. + // See CONNECTORS-1324. + // The fieldNames map returned by proxy.getFieldList() has the internal name as a key, and the display name as a value. + // Since we want the complete list of fields here, by *internal* name, we iterate over the keySet(), not the values. String[] fields = new String[fieldNames.size()]; int j = 0; for (String field : fieldNames.keySet()) { - String value = fieldNames.get(field); - fields[j++] = (value==null)?field:value; + fields[j++] = field; } String[] accessTokens; @@ -958,6 +961,7 @@ public class SharePointRepository extend continue; } + // Get the fields we want (internal field names only at this point), given the list of all fields (internal field names again). String[] sortedMetadataFields = getInterestingFieldSetSorted(metadataInfo,listFields); // Sort access tokens so they are comparable in the version string @@ -1305,12 +1309,13 @@ public class SharePointRepository extend continue; } + // See CONNECTORS-1324. We want internal field names only, + // which are the keys of the map. String[] fields = new String[fieldNames.size()]; int j = 0; for (String field : fieldNames.keySet()) { - String value = fieldNames.get(field); - fields[j++] = (value==null)?field:value; + fields[j++] = field; } String[] accessTokens; @@ -1403,6 +1408,7 @@ public class SharePointRepository extend } String encodedSitePath = encodePath(sitePath); + // Get the fields we want (internal field names only at this point), given the list of all fields (internal field names again). String[] sortedMetadataFields = getInterestingFieldSetSorted(metadataInfo,libFields); // Sort access tokens