-
-
Notifications
You must be signed in to change notification settings - Fork 862
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
Proactively free more Structure allocations #2091
Conversation
} | ||
try (SocketFdInfo si = new SocketFdInfo()) { | ||
int ret = SystemB.INSTANCE.proc_pidfdinfo(pid, fd, PROC_PIDFDSOCKETINFO, si, si.size()); | ||
if (si.size() == ret && si.psi.soi_family == AF_INET || si.psi.soi_family == AF_INET6) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OperatorPrecedence: Use grouping parenthesis to make the operator precedence explicit
if (si.size() == ret && si.psi.soi_family == AF_INET || si.psi.soi_family == AF_INET6) { | |
if ((si.size() == ret && si.psi.soi_family == AF_INET) || si.psi.soi_family == AF_INET6) { |
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
// Usually this works. If it doesn't, fall back to text parsing. | ||
// Boot time will be the first consecutive string of digits. | ||
BOOTTIME = ParseUtil.parseLongOrDefault( | ||
ExecutingCommand.getFirstAnswer("sysctl -n kern.boottime").split(",")[0].replaceAll("\\D", ""), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StringSplitter: String.split(String) has surprising behavior
ExecutingCommand.getFirstAnswer("sysctl -n kern.boottime").split(",")[0].replaceAll("\\D", ""), | |
Iterables.get(Splitter.on(',').split(ExecutingCommand.getFirstAnswer("sysctl -n kern.boottime")), 0).replaceAll("\\D", ""), |
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
super(pid); | ||
this.majorVersion = major; | ||
this.minorVersion = minor; | ||
updateAttributes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INTERFACE_NOT_THREAD_SAFE: Unprotected call to method SystemB.getgrgid(...)
of un-annotated interface com.sun.jna.platform.mac.SystemB
. Consider annotating the interface with @ThreadSafe
or adding a lock.
Reporting because the current class is annotated @ThreadSafe
.
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
No description provided.