[freenet-cvs] r11934 - trunk/freenet/src/freenet/config

mario at freenetproject.org mario at freenetproject.org
Wed Feb 28 22:26:36 UTC 2007


Author: mario
Date: 2007-02-28 22:26:21 +0000 (Wed, 28 Feb 2007)
New Revision: 11934

Modified:
   trunk/freenet/src/freenet/config/PersistentConfig.java
Log:
catch exception

Modified: trunk/freenet/src/freenet/config/PersistentConfig.java
===================================================================
--- trunk/freenet/src/freenet/config/PersistentConfig.java	2007-02-28 21:23:50 UTC (rev 11933)
+++ trunk/freenet/src/freenet/config/PersistentConfig.java	2007-02-28 22:26:21 UTC (rev 11934)
@@ -34,14 +34,18 @@
 	public synchronized SimpleFieldSet exportFieldSet(boolean withDefaults) {
 		SimpleFieldSet fs = new SimpleFieldSet(true);
 		SubConfig[] configs;
-		synchronized(this) {
-			configs = (SubConfig[]) configsByPrefix.values().toArray(new SubConfig[configsByPrefix.size()]);
+		try {
+			synchronized(this) {
+				configs = (SubConfig[]) configsByPrefix.values().toArray(new SubConfig[configsByPrefix.size()]);
+			}
+			for(int i=0;i<configs.length;i++) {
+				SimpleFieldSet scfs = configs[i].exportFieldSet(withDefaults);
+				fs.tput(configs[i].prefix, scfs);
+			}
+		} catch (NoSuchFieldError e) {
+			Logger.error(this, "Caught exception " + e);
 		}
-		for(int i=0;i<configs.length;i++) {
-			SimpleFieldSet scfs = configs[i].exportFieldSet(withDefaults);
-			fs.tput(configs[i].prefix, scfs);
-		}
-		return fs;
+		return fs; 
 	}
 	
 	public void onRegister(SubConfig config, Option o) {




More information about the cvs mailing list