TheFinestArtist / YouTubePlayerActivity

Android Youtube Player Activity. Simply pass a url to play youtube video in new activity. It supports screen orientation, media volume control and etc.
https://play.google.com/store/apps/details?id=com.thefinestartist.ytpa.sample
MIT License
395 stars 113 forks source link

Matcher.group(1) does this safe if we access directly index 1? #24

Open mochadwi opened 5 years ago

mochadwi commented 5 years ago

https://github.com/TheFinestArtist/YouTubePlayerActivity/blob/fc4baabb6d0fac7883e0a447c3aa5ae5df18a7ad/library/src/main/java/com/thefinestartist/ytpa/utils/YouTubeUrlParser.java#L23

Referenced from your line above, is this safe for future reference?

I mean, if there's any change from youtube URL and the result from matchers.find() return 1 size, does this will thrown the arrayindexoutofboundsexception instead?

@TheFinestArtist