streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steveblackmon <>
Subject [GitHub] incubator-streams pull request: Resolves STREAMS-141
Date Wed, 06 Aug 2014 15:00:32 GMT
Github user steveblackmon commented on a diff in the pull request:
    --- Diff: streams-contrib/streams-provider-twitter/src/main/java/org/apache/streams/twitter/serializer/
    @@ -68,7 +71,14 @@ public StreamsTwitterMapper() {
                     addDeserializer(DateTime.class, new StdDeserializer<DateTime>(DateTime.class)
                         public DateTime deserialize(JsonParser jpar, DeserializationContext
context) throws IOException, JsonProcessingException {
    -                        return TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    +                        DateTime result = null;
    +                        try {
    +                            result = TWITTER_FORMAT.parseDateTime(jpar.getValueAsString());
    --- End diff --
    same response as on the datasift PR.  non-standard date parsing should be the modules
responsibility.  i'd support creation of an advanced date parser that could pick up dates
without knowing the format before-hand, but not an approach where every new one-off date format
that is discovered requires a change to streams-pojo to add a new format string + try/catch.

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 or file a JIRA ticket
with INFRA.

View raw message