[Arakhnę-Dev] [318] * Add log message.

[ Thread Index | Date Index | More arakhne.org/dev Archives ]


Revision: 318
Author:   galland
Date:     2011-11-30 10:10:39 +0100 (Wed, 30 Nov 2011)
Log Message:
-----------
* Add log message.

Modified Paths:
--------------
    trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/OperatingSystemInfo.java

Modified: trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/OperatingSystemInfo.java
===================================================================
--- trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/OperatingSystemInfo.java	2011-11-14 16:41:10 UTC (rev 317)
+++ trunk/arakhneVmutils/java/src/main/java/org/arakhne/vmutil/OperatingSystemInfo.java	2011-11-30 09:10:39 UTC (rev 318)
@@ -19,7 +19,9 @@
 
 package org.arakhne.vmutil;
 
+import java.io.FileNotFoundException;
 
+
 /**
  * This class print on the standard output several informations
  * about your operating system.
@@ -43,10 +45,10 @@
 		showValue(name, System.getProperty(name));
 	}
 	
-	private static void showValue(String name, String value) {
+	private static void showValue(String name, Object value) {
 		System.out.print(name);
 		System.out.print(" = "); //$NON-NLS-1$
-		System.out.println(value);
+		System.out.println((value==null) ? null : value.toString());
 	}
 
 	/**
@@ -68,6 +70,16 @@
 		showPropertyValue("user.name"); //$NON-NLS-1$
 		showPropertyValue("user.home"); //$NON-NLS-1$
 		
+		showTitle("FileSystem"); //$NON-NLS-1$
+
+		showValue("getUserHomeDirectoryName()", FileSystem.getUserHomeDirectoryName()); //$NON-NLS-1$
+		try {
+			showValue("getUserHomeDirectory()", FileSystem.getUserHomeDirectory()); //$NON-NLS-1$
+		}
+		catch (FileNotFoundException e) {
+			e.printStackTrace();
+		}
+
 		showTitle("OperatingSystem"); //$NON-NLS-1$
 		
 		showValue("getCurrentOSName()", OperatingSystem.getCurrentOSName()); //$NON-NLS-1$


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/