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

Reply via email to