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.
Per the JCA,
CommPortIdentifier.getPortIdentifiers()
[is declared as](https://docs.oracle.com/cd/E17802_01/products/products/javacomm/reference/api/javax/comm/CommPortIdentifier.html#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:
This would make the API considerably easier to consume at no binary compatibility cost.