Skip to content

Add generic type to CommPortIdentifier.getPortIdentifiers() #205

Open
@MrDOS

Description

@MrDOS

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions