streams-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trevor Grant <trevor.d.gr...@gmail.com>
Subject provider.prepare(null) kicks NullPointerException
Date Thu, 03 Nov 2016 13:33:43 GMT
Sorry,

would normally put this on user@ but we don't seem to have one yet.

creating a facebook provider.

The following code give a NullPointerException

```scala
import org.apache.streams.facebook.FacebookUserstreamConfiguration
import org.apache.streams.facebook.provider.FacebookFriendFeedProvider

val typesafe = ConfigFactory.parseString(credentials)
val config = new
ComponentConfigurator(classOf[FacebookUserstreamConfiguration]).detectConfiguration(typesafe,
"facebook");
val provider = new FacebookFriendFeedProvider(config);

provider.prepare(null)
```

java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191)
at
org.apache.streams.facebook.provider.FacebookFriendFeedProvider.prepare(FacebookFriendFeedProvider.java:200)

Upon examining the source:
https://github.com/apache/incubator-streams/blob/d1022dceed6020f37d6f78bffe403f51be8a10d5/streams-contrib/streams-provider-facebook/src/main/java/org/apache/streams/facebook/provider/FacebookFriendFeedProvider.java#L200

It seems we have some Class klass

So after groking the code for a while this morning- I can't for the life of
me figure out what Class klass is even supposed to do (other than jam me
up).

Can someone please help / explain what and where I have gone wrong?

tg


Trevor Grant
Data Scientist
https://github.com/rawkintrevo
http://stackexchange.com/users/3002022/rawkintrevo
http://trevorgrant.org

*"Fortunate is he, who is able to know the causes of things."  -Virgil*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message