Skip to content

Conversation

@HelgeStenstrom
Copy link
Collaborator

It's better to know at compile time that you cannot call open(String). If open(Objet) is permitted, the error appears at runtime, not compile time.

It's better to know at compile time that you cannot call open(String). If open(Objet) is permitted, the error appears at runtime, not compile time.
@goxr3plus
Copy link
Owner

We used to have 3 open methods one for File, one for InputStream and one for URL i changed it like that because of code duplication in XR3Player but yes you are right.

@goxr3plus
Copy link
Owner

Is it fully ready :)?

@HelgeStenstrom
Copy link
Collaborator Author

Code duplication is bad, but I think it's more important to expose runtime problems at compile time, if possible.
Marking a method as deprecated doesn't remove it. But it becomes clearer exactly which data types are allowed in the overloaded open() method.
This pull request doesn't change any runtime behavior. It just makes sense.

@HelgeStenstrom
Copy link
Collaborator Author

Yes, it's ready. It's tested.

@goxr3plus
Copy link
Owner

Great Job :)

@goxr3plus goxr3plus merged commit f0983cc into goxr3plus:master Sep 16, 2019
@HelgeStenstrom HelgeStenstrom deleted the deprecateOpenObject branch September 16, 2019 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants