[Esbox-commits] r955 - branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk

eswartz at garage.maemo.org eswartz at garage.maemo.org
Wed Nov 19 21:50:13 EET 2008


Author: eswartz
Date: 2008-11-19 21:50:13 +0200 (Wed, 19 Nov 2008)
New Revision: 955

Modified:
   branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java
Log:
Fix the detection of invalidated cached machine data.  (also in work_Petr branch)

Modified: branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java
===================================================================
--- branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java	2008-11-19 15:39:00 UTC (rev 954)
+++ branches/work_Ed/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/CacheUtils.java	2008-11-19 19:50:13 UTC (rev 955)
@@ -98,14 +98,14 @@
 	public void ensureCurrentMachine(String machineKey, IMachine machine) {
 		String current = (String) CacheUtils.getInstance().getCachedValue(
 				machineKey);
+		String machineURIAndType = machine.getURI().toString() + ":" + machine.getClass().getSimpleName();
 		if (current != null) {
-			String machineURIAndType = machine.getURI().toString() + ":" + machine.getClass().getSimpleName();
 			if (!current.equals(machineURIAndType)) {
 				// just zap
 				clearCachedData();
 			}
-			setCachedValue(machineKey, machineURIAndType);
 		}
+		setCachedValue(machineKey, machineURIAndType);
 	}
 
 



More information about the Esbox-commits mailing list