antonio 2004/04/01 04:11:26
Modified: src/java/org/apache/cocoon/generation StatusGenerator.java
Log:
Use o.a.commons.lang.SystemUtils
Revision Changes Path
1.5 +12 -12
cocoon-2.1/src/java/org/apache/cocoon/generation/StatusGenerator.java
Index: StatusGenerator.java
===================================================================
RCS file:
/home/cvs//cocoon-2.1/src/java/org/apache/cocoon/generation/StatusGenerator.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- StatusGenerator.java 5 Mar 2004 13:02:55 -0000 1.4
+++ StatusGenerator.java 1 Apr 2004 12:11:26 -0000 1.5
@@ -27,6 +27,7 @@
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
+import org.apache.commons.lang.SystemUtils;
import org.apache.excalibur.store.Store;
import org.apache.excalibur.store.StoreJanitor;
import org.xml.sax.Attributes;
@@ -148,10 +149,10 @@
// The local host.
try {
localHost = InetAddress.getLocalHost().getHostName();
- } catch ( UnknownHostException e ) {
+ } catch (UnknownHostException e) {
getLogger().debug("StatusGenerator:UnknownHost", e);
localHost = "";
- } catch ( SecurityException e ) {
+ } catch (SecurityException e) {
getLogger().debug("StatusGenerator:Security", e);
localHost = "";
}
@@ -180,27 +181,27 @@
// BEGIN JRE
startGroup(ch, "jre");
- addValue(ch, "version", System.getProperty("java.version"));
+ addValue(ch, "version", SystemUtils.JAVA_VERSION);
atts.clear();
// qName = prefix + ':' + localName
atts.addAttribute(xlinkNamespace, "type", xlinkPrefix + ":type",
"CDATA", "simple");
atts.addAttribute(xlinkNamespace, "href", xlinkPrefix + ":href",
"CDATA",
- System.getProperty("java.vendor.url") );
- addValue(ch, "java-vendor", System.getProperty("java.vendor"), atts);
+ SystemUtils.JAVA_VENDOR_URL);
+ addValue(ch, "java-vendor", SystemUtils.JAVA_VENDOR, atts);
endGroup(ch);
// END JRE
// BEGIN Operating system
startGroup(ch, "operating-system");
- addValue(ch, "name", System.getProperty("os.name"));
- addValue(ch, "architecture", System.getProperty("os.arch"));
- addValue(ch, "version", System.getProperty("os.version"));
+ addValue(ch, "name", SystemUtils.OS_NAME);
+ addValue(ch, "architecture", SystemUtils.OS_ARCH);
+ addValue(ch, "version", SystemUtils.OS_VERSION);
endGroup(ch);
// END operating system
- String classpath = System.getProperty("java.class.path");
+ String classpath = SystemUtils.JAVA_CLASS_PATH;
List paths = new ArrayList();
- StringTokenizer tokenizer = new StringTokenizer(classpath,
System.getProperty("path.separator"));
+ StringTokenizer tokenizer = new StringTokenizer(classpath,
SystemUtils.PATH_SEPARATOR);
while (tokenizer.hasMoreTokens()) {
paths.add(tokenizer.nextToken());
}
@@ -361,7 +362,6 @@
ch.endElement(namespace, "line", "line");
}
}
-
ch.endElement(namespace, "value", "value");
}
}