apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shubham-pathak22 <...@git.apache.org>
Subject [GitHub] apex-malhar pull request #348: APEXMALHAR-2157 Json formatter improvements
Date Thu, 21 Jul 2016 08:34:36 GMT
Github user shubham-pathak22 commented on a diff in the pull request:

    https://github.com/apache/apex-malhar/pull/348#discussion_r71666404
  
    --- Diff: library/src/main/java/com/datatorrent/lib/formatter/JsonFormatter.java ---
    @@ -45,58 +38,30 @@
     @org.apache.hadoop.classification.InterfaceStability.Evolving
     public class JsonFormatter extends Formatter<String>
     {
    +  private transient ObjectMapper objMapper;
       private transient ObjectWriter writer;
    -  protected String dateFormat;
     
    +  @SuppressWarnings("deprecation")
       @Override
       public void setup(OperatorContext context)
       {
    -    try {
    -      ObjectMapper mapper = new ObjectMapper();
    -      if (dateFormat != null) {
    -        mapper.setDateFormat(new SimpleDateFormat(dateFormat));
    -      }
    -      writer = mapper.writerWithType(clazz);
    -      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_FIELDS, true);
    -      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_GETTERS, true);
    -      mapper.configure(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS, true);
    -    } catch (Throwable e) {
    -      throw new RuntimeException("Unable find provided class");
    --- End diff --
    
    this is removed


---
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