Skip to content

Commit

Permalink
Avoid usage of Guava from ProcessTree (#8467)
Browse files Browse the repository at this point in the history
* Avoid usage of Guava from `ProcessTree`

* Update core/src/main/java/hudson/util/ProcessTree.java

Co-authored-by: Vincent Latombe <[email protected]>

---------

Co-authored-by: Vincent Latombe <[email protected]>
  • Loading branch information
basil and Vlatombe authored Sep 9, 2023
1 parent fb6a03c commit 830cb8a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/src/main/java/hudson/util/ProcessTree.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import static java.util.logging.Level.FINER;
import static java.util.logging.Level.FINEST;

import com.google.common.primitives.Ints;
import com.sun.jna.LastErrorException;
import com.sun.jna.Memory;
import com.sun.jna.Native;
Expand Down Expand Up @@ -750,7 +749,7 @@ abstract static class Unix extends Local {
@CheckForNull
@Override
public OSProcess get(@NonNull Process proc) {
return get(Ints.checkedCast(proc.pid()));
return get(Math.toIntExact(proc.pid()));
}

@Override
Expand Down

0 comments on commit 830cb8a

Please sign in to comment.