-
Notifications
You must be signed in to change notification settings - Fork 28
Conversation
…d reduce scope where possible.
|
||
import java.io.IOException; | ||
|
||
final class ExoPlayerErrorFactory { | ||
public final class ExoPlayerErrorFactory { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ok that is available from the client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the problem with this being accessible from the client. They will only get a specific Player.PlayerError
based on an Exception
. They can't extend it or anything else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is public a client can do ExoPlayerErrorFactory.errorFor(...)
. Is this part of the public API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We opted to rename as Mapper
and move to the package where it is used 6b400cf
@@ -12,7 +12,7 @@ public TextCues(List<Cue> cues) { | |||
this.cues = cues; | |||
} | |||
|
|||
List<Cue> cues() { | |||
public List<Cue> cues() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class needs to be public facing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It wouldn't need to be if we collapsed some more packages but all of our models now belong in the model
package meaning they need to be public
. Personally, I would find it strange if we didn't expose our NoPlayer
models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the client needs to have those models then ok, but if it doesn't then these models become a contract with the clients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TextCues
is part of the NoPlayer
contract as it's used in PlayerView
(although in it's current form it's leaking exoplayer but this is fixed in #56)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@@ -391,7 +391,7 @@ public void whenGettingAudioTracks_thenDelegatesToTrackSelector() { | |||
@Mock | |||
DrmSessionCreator drmSessionCreator; | |||
@Mock | |||
ExoPlayerDrmSessionEventListener drmSessionEventListener; | |||
DefaultDrmSessionManager.EventListener drmSessionEventListener; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not tooo fussed, it's a test 🍷 unless you really want it? 🌵
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you feel super good after doing this!!!! all those reduced scopes!!!
Leaving to @joetimmins
import java.io.IOException; | ||
import java.nio.charset.Charset; | ||
|
||
class ProvisionExecutorImpl implements ProvisionExecutor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we call this something that doesn't end in impl
? HttpPostingProvisionExecutor
or something maybe?
Problem
Lots and lots of public classes that could be package if they were in the right place.
Solution
Move classes to logically grouped areas and make them package scope.
Test(s) added
No, just updating packages.
Screenshots
No UI changes.
Paired with
@ouchadam