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 networking interface information to support bundle #24
Conversation
byte[] hardwareAddress = ni.getHardwareAddress(); | ||
|
||
// Do not have permissions or address does not exist | ||
if (hardwareAddress == null || hardwareAddress.length == 0) |
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.
As jenkins may only be bound to the loopback I think we should not break but just not dump the hardware address (or dump something special)
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
…o network Conflicts: src/test/java/com/cloudbees/jenkins/support/impl/NetworkInterfacesTest.java
bos.append(" ** Index - ").append(ni.getIndex()).append("\n"); | ||
Enumeration<InetAddress> inetAddresses = ni.getInetAddresses(); | ||
while (inetAddresses.hasMoreElements()) { | ||
NetworkInterface networkInterface = networkInterfaces.nextElement(); |
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.
I think you mean to refer to inetAddress here.
👎 also build failure needs investigating. |
@jtnord Fixed. |
new Content("nodes/master/networkInterface.md") { | ||
@Override | ||
public void writeTo(OutputStream os) throws IOException { | ||
os.write(getNetworkInterface(Jenkins.getInstance()).getBytes("utf-8")); |
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.
"utf-8" is implementation specific. Use the mandated "UTF-8" instead.
new Content("nodes/master/networkInterface.md") { | ||
@Override | ||
public void writeTo(OutputStream os) throws IOException { | ||
os.write(getNetworkInterface(Jenkins.getInstance()).getBytes("UTF-8")); |
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.
BTW there are at least two UTF_8
constants: Apache Commons and Guava.
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.
I wouldn't use either of those and wait until JDK7 and use StandardCharsets
which is even more efficient :-)
👍 |
1 similar comment
👍 |
Add networking interface information to support bundle
Add an option to obtain information about the networking interfaces that are part of the computer.
@reviewbybees