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: Gplus fix
Date Tue, 18 Nov 2014 00:04:46 GMT
Github user robdouglas commented on a diff in the pull request:

    https://github.com/apache/incubator-streams/pull/133#discussion_r20476363
  
    --- Diff: streams-contrib/streams-provider-google/google-gplus/src/main/java/com/google/gplus/provider/GPlusConfigurator.java
---
    @@ -18,37 +18,53 @@
     
     package com.google.gplus.provider;
     
    +import com.fasterxml.jackson.databind.ObjectMapper;
    +import com.google.common.base.Preconditions;
     import com.typesafe.config.Config;
    +import com.typesafe.config.ConfigRenderOptions;
     import org.apache.streams.config.StreamsConfigurator;
     import org.apache.streams.google.gplus.GPlusConfiguration;
     import org.apache.streams.google.gplus.GPlusOAuthConfiguration;
    +import org.apache.streams.jackson.StreamsJacksonMapper;
     import org.slf4j.Logger;
     import org.slf4j.LoggerFactory;
     
    +import java.io.IOException;
    +
     /**
      * Created by sblackmon on 12/10/13.
      */
     public class GPlusConfigurator {
     
         private final static Logger LOGGER = LoggerFactory.getLogger(GPlusConfigurator.class);
    +    private static final ObjectMapper MAPPER = StreamsJacksonMapper.getInstance();
     
         public static GPlusConfiguration detectConfiguration(Config config) {
    -        Config oauth = StreamsConfigurator.config.getConfig("gplus.oauth");
    -
    -        GPlusConfiguration gplusConfiguration = new GPlusConfiguration();
    -
    -        gplusConfiguration.setProtocol(config.getString("protocol"));
    -        gplusConfiguration.setHost(config.getString("host"));
    -        gplusConfiguration.setPort(config.getLong("port"));
    -        gplusConfiguration.setVersion(config.getString("version"));
    -        GPlusOAuthConfiguration gPlusOAuthConfiguration = new GPlusOAuthConfiguration();
    -        gPlusOAuthConfiguration.setConsumerKey(oauth.getString("consumerKey"));
    -        gPlusOAuthConfiguration.setConsumerSecret(oauth.getString("consumerSecret"));
    -        gPlusOAuthConfiguration.setAccessToken(oauth.getString("accessToken"));
    -        gPlusOAuthConfiguration.setAccessTokenSecret(oauth.getString("accessTokenSecret"));
    -        gplusConfiguration.setOauth(gPlusOAuthConfiguration);
    -
    -        return gplusConfiguration;
    +//        Config oauth = StreamsConfigurator.config.getConfig("gplus.oauth");
    --- End diff --
    
    Do these commented lines need to stay in the code?


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