public static String oneLineNetString(Workspace workspace) {
if (workspace == null) {
return null; // *** EARLY RETURN ***
}
final Networking networking = workspace.getCurrentNetworking();
String netStr = "[no networking]";
if (networking != null) {
// assuming IP presence at least
final Nic[] nics = networking.nics();
if (nics.length > 1) {
netStr = networking.nicNum() + " NICs: ";
netStr += nics[0].getIpAddress();
final String host = nics[0].getHostname();
if (host != null) {
netStr += " ['" + host + "']";
}