streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robdouglas <...@git.apache.org>
Subject [GitHub] incubator-streams pull request: Streams 132
Date Mon, 14 Jul 2014 19:47:46 GMT
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<StreamsDatum> process(StreamsDatum entry) {
    -        if(!(entry.getDocument() instanceof Activity)) {
    -            return Lists.newArrayList();
    -        }
    -        if(Strings.isNullOrEmpty(pattern)) {
    -            prepare(null);
    -        }
    -        Activity activity = (Activity)entry.getDocument();
    -        Map<String, List<Integer>> matches = RegexUtils.extractMatches(pattern,
activity.getContent());
    -        Collection<T> 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<String, List<Integer>> matches = RegexUtils.extractMatches(pattern,
activity.getContent());
    +            Collection<T> 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.
---

Mime
View raw message