# HG changeset patch # User Jesse Glick # Date 1321552034 18000 # Node ID 39650843255fe76590b78532e3349f8b2c4967f1 # Parent 2d82d84aff76d5046f1d536330937c697d80c187# Parent 0af003af0b9070a4a0894215f1f99c612dd53116 merge diff -r 2d82d84aff76 -r 39650843255f autoproject.core/nbproject/project.xml --- a/autoproject.core/nbproject/project.xml Thu Nov 17 08:02:15 2011 +0100 +++ b/autoproject.core/nbproject/project.xml Thu Nov 17 12:47:14 2011 -0500 @@ -73,6 +73,14 @@ + org.openide.modules + + + + 7.26 + + + org.openide.nodes diff -r 2d82d84aff76 -r 39650843255f autoproject.core/src/org/netbeans/modules/autoproject/spi/Cache.java --- a/autoproject.core/src/org/netbeans/modules/autoproject/spi/Cache.java Thu Nov 17 08:02:15 2011 +0100 +++ b/autoproject.core/src/org/netbeans/modules/autoproject/spi/Cache.java Thu Nov 17 12:47:14 2011 -0500 @@ -51,6 +51,7 @@ import java.util.TreeMap; import java.util.logging.Level; import java.util.logging.Logger; +import org.openide.modules.Places; import org.openide.util.EditableProperties; import org.openide.util.Exceptions; import org.openide.util.Parameters; @@ -73,16 +74,16 @@ private static final File CACHE; static { - String userdir = System.getProperty("netbeans.user"); - if (userdir != null) { - File compatibilityLocation = new File(userdir, "var/cache/autoprojects.properties"); - if (compatibilityLocation.isFile()) { - CACHE = compatibilityLocation; + File compatibilityLocation = Places.getCacheSubfile("autoprojects.properties"); + if (compatibilityLocation.isFile()) { + CACHE = compatibilityLocation; + } else { + File userdir = Places.getUserDirectory(); + if (userdir != null) { + CACHE = new File(userdir, "var/autoprojects.properties"); } else { - CACHE = new File(userdir, "var/autoprojects.properties"); + CACHE = null; } - } else { - CACHE = null; } }