Return-Path: X-Original-To: apmail-streams-dev-archive@minotaur.apache.org Delivered-To: apmail-streams-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B0ED5111C8 for ; Mon, 14 Jul 2014 19:48:08 +0000 (UTC) Received: (qmail 41806 invoked by uid 500); 14 Jul 2014 19:48:08 -0000 Delivered-To: apmail-streams-dev-archive@streams.apache.org Received: (qmail 41764 invoked by uid 500); 14 Jul 2014 19:48:08 -0000 Mailing-List: contact dev-help@streams.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@streams.incubator.apache.org Delivered-To: mailing list dev@streams.incubator.apache.org Received: (qmail 41753 invoked by uid 99); 14 Jul 2014 19:48:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 19:48:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 14 Jul 2014 19:48:07 +0000 Received: (qmail 40835 invoked by uid 99); 14 Jul 2014 19:47:46 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 19:47:46 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9D4BA931A24; Mon, 14 Jul 2014 19:47:46 +0000 (UTC) From: robdouglas To: dev@streams.incubator.apache.org Reply-To: dev@streams.incubator.apache.org References: In-Reply-To: Subject: [GitHub] incubator-streams pull request: Streams 132 Content-Type: text/plain Message-Id: <20140714194746.9D4BA931A24@tyr.zones.apache.org> Date: Mon, 14 Jul 2014 19:47:46 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user robdouglas commented on a diff in the pull request: https://github.com/apache/incubator-streams/pull/54#discussion_r14899145 --- Diff: streams-contrib/streams-processor-regex/src/main/java/org/apache/streams/regex/AbstractRegexExtensionExtractor.java --- @@ -56,31 +61,43 @@ public String getPattern() { @Override public List process(StreamsDatum entry) { - if(!(entry.getDocument() instanceof Activity)) { - return Lists.newArrayList(); - } - if(Strings.isNullOrEmpty(pattern)) { - prepare(null); - } - Activity activity = (Activity)entry.getDocument(); - Map> matches = RegexUtils.extractMatches(pattern, activity.getContent()); - Collection entities = ensureTargetObject(activity); - for(String key : matches.keySet()) { - entities.add(prepareObject(key)); + try { + if (!(entry.getDocument() instanceof Activity)) { + return Lists.newArrayList(); + } + if (Strings.isNullOrEmpty(pattern)) { + prepare(null); + } + Activity activity = (Activity) entry.getDocument(); + Map> matches = RegexUtils.extractMatches(pattern, activity.getContent()); + Collection entities = ensureTargetObject(activity); + for (String key : matches.keySet()) { + entities.add(prepareObject(key)); + } + return Lists.newArrayList(entry); + } catch (Throwable e) { --- End diff -- Ok, it has been taken out --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---