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

Improve SerialPortManager.getIdentifiers() JavaDoc #1471

Merged
merged 2 commits into from May 13, 2020

Conversation

wborn
Copy link
Member

@wborn wborn commented May 12, 2020

The current JavaDocs do not clearly state that it does not always return all identifiers.
E.g. it will not return any RFC2217 identifiers or undiscovered RXTX port identifiers.
So it should not be used to search for an identifier when the serial port name is known.
This method is useful for listing available port options in UIs and logging.


Related to:

The current JavaDocs do not clearly state that it does not always return all identifiers.
E.g. it will not return any RFC2217 identifiers or undiscovered RXTX port identifiers.
So it should not be used to search for an identifier when the serial port name is known.
This method is useful for listing available port options in UIs and logging.

Signed-off-by: Wouter Born <github@maindrain.net>
*
* @return stream of serial port identifiers
* {@link SerialPortProvider}s may not be able to discover any or all identifiers.
* When the port name is known, the preferred way to get an identifier is by using {@link #getIdentifier(String).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A missing curly bracket? Isn't it?

Suggested change
* When the port name is known, the preferred way to get an identifier is by using {@link #getIdentifier(String).
* When the port name is known, the preferred way to get an identifier is by using {@link #getIdentifier(String)}.

Copy link
Member Author

@wborn wborn May 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well spotted! The curly has returned from its absence. :-)

Signed-off-by: Wouter Born <github@maindrain.net>
@cweitkamp cweitkamp added this to the 3.0 milestone May 13, 2020
Copy link
Contributor

@cweitkamp cweitkamp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@cweitkamp cweitkamp merged commit 583ea02 into openhab:master May 13, 2020
@wborn wborn deleted the spm-javadoc branch May 13, 2020 07:43
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
* Improve SerialPortManager.getIdentifiers() JavaDoc

The current JavaDocs do not clearly state that it does not always return all identifiers.
E.g. it will not return any RFC2217 identifiers or undiscovered RXTX port identifiers.
So it should not be used to search for an identifier when the serial port name is known.
This method is useful for listing available port options in UIs and logging.

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: 583ea02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants