You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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()?
The text was updated successfully, but these errors were encountered:
id is a long value and it means defalt value is 0, but the root object null itself. I guess idea was to create empty object with default id value. But in my opinion checking object for null faster rather getting value from this object and check it for specific value.
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 JavaDocStream
class. If the stream is online, this will return true. If it is offline, it returns aNullPointerException
.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 theisOnline()
method should return false if it is offline.My entire code looks like this:
My question isn't so much how to check if my Twitch stream is online, but rather what is the correct usage of
isOnline()
?The text was updated successfully, but these errors were encountered: