2006/unicorn/src/org/w3c/unicorn/util Property.java,1.2,1.3

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/util
In directory hutz:/tmp/cvs-serv31198/src/org/w3c/unicorn/util

Modified Files:
	Property.java 
Log Message:
Initialization now throws Exceptions and stops if a fatal error is encountered
+ separated init tasks on InitAction

Index: Property.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/util/Property.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Property.java	28 Aug 2009 12:39:56 -0000	1.2
+++ Property.java	31 Aug 2009 11:35:55 -0000	1.3
@@ -7,12 +7,20 @@
 public class Property {
 	
 	public static String get(String key) {
-		return Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key);
+		try {
+			return Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key);
+		} catch (java.lang.NullPointerException e) {
+			return null;
+		}
 	}
 	
 	public static String get(String key1, String key2) {
-		return Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key1) 
-			 + Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key2);
+		try {
+			return Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key1) 
+				 + Framework.getUnicornPropertiesFiles().get("unicorn.properties").getProperty(key2);
+		} catch (java.lang.NullPointerException e) {
+			return null;
+		}
 	}
 
 	public static Properties getProps(String fileName) {

Received on Monday, 31 August 2009 11:36:07 UTC