Author: hdu Date: Tue Jan 15 16:38:54 2013 New Revision: 1433502 URL: http://svn.apache.org/viewvc?rev=1433502&view=rev Log: allow automatic testing on machines without network access
Modified: openoffice/trunk/test/testcommon/source/org/openoffice/test/common/XMLReporter.java Modified: openoffice/trunk/test/testcommon/source/org/openoffice/test/common/XMLReporter.java URL: http://svn.apache.org/viewvc/openoffice/trunk/test/testcommon/source/org/openoffice/test/common/XMLReporter.java?rev=1433502&r1=1433501&r2=1433502&view=diff ============================================================================== --- openoffice/trunk/test/testcommon/source/org/openoffice/test/common/XMLReporter.java (original) +++ openoffice/trunk/test/testcommon/source/org/openoffice/test/common/XMLReporter.java Tue Jan 15 16:38:54 2013 @@ -177,9 +177,10 @@ public class XMLReporter extends RunList System.setProperty("info.os.name", SystemUtil.getOSName()); System.setProperty("info.os.version", SystemUtil.getOSVersion()); System.setProperty("info.os.arch", SystemUtil.getOSArch()); - System.setProperty("info.os.arch", SystemUtil.getOSArch()); - System.setProperty("info.ip", SystemUtil.getIPAddress()); - System.setProperty("info.hostname", SystemUtil.getHostName()); + String ipaddrStr = SystemUtil.getIPAddress(); + System.setProperty("info.ip", (ipaddrStr!=null) ? ipaddrStr : "UNKNOWN"); + String hostnameStr = SystemUtil.getHostName(); + System.setProperty("info.hostname", (hostnameStr!=null) ? hostnameStr : "UNKNOWN"); Set<Entry<Object, Object>> entries = System.getProperties().entrySet(); for (Entry<Object, Object> e : entries) { Element prop = doc.createElement("property"); @@ -198,3 +199,4 @@ public class XMLReporter extends RunList } } +