-
Notifications
You must be signed in to change notification settings - Fork 23
Description
I don't often post to issues and I'm still very new to this kind of thing so I'm sorry if this question has already been answered or is perhaps obvious.
I'm currently trying to check whether or not a stream is online. I thought to use the isOnline() method in the JavaDoc Stream class. If the stream is online, this will return true. If it is offline, it returns a NullPointerException.
I have looked at this issue #18 which implies that the entire stream will be null if the Twitch stream is offline, which would explain why I am getting this NullPointerException. However the JavaDoc makes reference that the isOnline() method should return false if it is offline.
My entire code looks like this:
@Override
public void onSuccess(Stream stream) {
log.info("" + stream.isOnline());
}
My question isn't so much how to check if my Twitch stream is online, but rather what is the correct usage of isOnline()?