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 processIdOrEmpty method in Processes #518

Closed
sleberknight opened this issue Mar 16, 2021 · 0 comments · Fixed by #519
Closed

Add processIdOrEmpty method in Processes #518

sleberknight opened this issue Mar 16, 2021 · 0 comments · Fixed by #519
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

Add a new method in Processes to return OptionalLong when pid is not available from a Process:

static OptionalLong processIdOrEmpty(Process proc)

This is b/c Process#pid() can throw an UnsupportedOperationException per its javadocs and I want the option to handle this situation, however unlikely it may be.

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Mar 16, 2021
@sleberknight sleberknight added this to the 0.21.0 milestone Mar 16, 2021
@sleberknight sleberknight self-assigned this Mar 16, 2021
sleberknight added a commit that referenced this issue Mar 16, 2021
* Add processIdOrEmpty to Processes, returning OptionalLong which will
 be empty if Process#pid() throws UnsupportedOperationException for any
 reason.

Closes #518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant