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

Add generic type to CommPortIdentifier.getPortIdentifiers() #205

Open
MrDOS opened this issue Jan 21, 2021 · 1 comment
Open

Add generic type to CommPortIdentifier.getPortIdentifiers() #205

MrDOS opened this issue Jan 21, 2021 · 1 comment
Milestone

Comments

@MrDOS
Copy link
Contributor

MrDOS commented Jan 21, 2021

Per the JCA, CommPortIdentifier.getPortIdentifiers() is declared as:

public static java.util.Enumeration getPortIdentifiers()

...which makes sense, because even JCA 3.0 predates the introduction of generics in Java 1.5. But generics were implemented in a backwards-compatible manner. There should be nothing stopping us from specifying the type of the returned enumeration:

public static java.util.Enumeration<CommPortIdentifier> getPortIdentifiers()

This would make the API considerably easier to consume at no binary compatibility cost.

@madhephaestus
Copy link
Member

love it, great idea!

@MrDOS MrDOS added this to the v5.3.0 milestone May 4, 2021
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

No branches or pull requests

2 participants