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 6ADF1113F5 for ; Mon, 14 Jul 2014 14:10:04 +0000 (UTC) Received: (qmail 82625 invoked by uid 500); 14 Jul 2014 14:10:04 -0000 Delivered-To: apmail-streams-dev-archive@streams.apache.org Received: (qmail 82588 invoked by uid 500); 14 Jul 2014 14:10:04 -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 82567 invoked by uid 99); 14 Jul 2014 14:10:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2014 14:10:03 +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 14:10:05 +0000 Received: (qmail 82430 invoked by uid 99); 14 Jul 2014 14:09:39 -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 14:09:39 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 690478BDA86; Mon, 14 Jul 2014 14:09:39 +0000 (UTC) From: mfranklin 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: <20140714140939.690478BDA86@tyr.zones.apache.org> Date: Mon, 14 Jul 2014 14:09:39 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Github user mfranklin commented on a diff in the pull request: https://github.com/apache/incubator-streams/pull/54#discussion_r14879006 --- 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 -- What is the purpose for the try/catch/wrap? Are there new checked exceptions that you are wrapping? --- 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. ---