Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unwanted dependency on a stream player. #58

Open
HelgeStenstrom opened this issue Sep 7, 2019 · 0 comments
Open

Unwanted dependency on a stream player. #58

HelgeStenstrom opened this issue Sep 7, 2019 · 0 comments

Comments

@HelgeStenstrom
Copy link
Contributor

import com.goxr3plus.streamplayer.stream.ThreadFactoryWithNamePrefix;

This package com.goxr3plus.xr3player.services.chromium is not about playing streams, and com.goxr3plus.streamplayer.stream has nothing to do with what a web browser needs. I think this dependency should be removed.

One way to do it, is to depend on a class of XR3Player instead, which provides the same functionality. This XR3Player class may depend on StreamPlayer, but this particular class doesn't have to.

Let every class, every package and every module have a single responsibility. Although att different abstraction levels.

What if you decide to move StreamPlayer to Java-9 modules? Would you then want to export ThreadFactoryWithNamePrefix from it? I wouldn't do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant