Used getAbsolutePath() instead of getCanonicalPath(). It screws up Unix symlink users in difficult-to-debug ways. BLD200507121800
authorjskrivanek@netbeans.org
Tue, 12 Jul 2005 08:10:57 +0000
changeset 624383182baedd16
parent 6242 0dc0f6f7e0b8
child 6244 0d9573e5ca24
Used getAbsolutePath() instead of getCanonicalPath(). It screws up Unix symlink users in difficult-to-debug ways.
xtest/src/org/netbeans/modules/xtest/XTestModule.java
xtest/src/org/netbeans/modules/xtest/XTestWizardIterator.java
     1.1 --- a/xtest/src/org/netbeans/modules/xtest/XTestModule.java	Tue Jul 12 04:13:38 2005 +0000
     1.2 +++ b/xtest/src/org/netbeans/modules/xtest/XTestModule.java	Tue Jul 12 08:10:57 2005 +0000
     1.3 @@ -13,8 +13,6 @@
     1.4  package org.netbeans.modules.xtest;
     1.5  
     1.6  import java.io.File;
     1.7 -import java.io.IOException;
     1.8 -import org.openide.ErrorManager;
     1.9  import org.openide.modules.InstalledFileLocator;
    1.10  import org.openide.modules.ModuleInstall;
    1.11  
    1.12 @@ -23,10 +21,6 @@
    1.13      public void restored () {
    1.14          File xtestHome = InstalledFileLocator.getDefault().
    1.15              locate("xtest-distribution", "org.netbeans.modules.xtest", false);  // NOI18N
    1.16 -        try {
    1.17 -            System.setProperty("xtest.home", xtestHome.getCanonicalPath()); // NOI18N
    1.18 -        } catch (IOException e) {
    1.19 -            ErrorManager.getDefault().notify(ErrorManager.EXCEPTION, e);
    1.20 -        }
    1.21 +        System.setProperty("xtest.home", xtestHome.getAbsolutePath()); // NOI18N
    1.22      }
    1.23  }
     2.1 --- a/xtest/src/org/netbeans/modules/xtest/XTestWizardIterator.java	Tue Jul 12 04:13:38 2005 +0000
     2.2 +++ b/xtest/src/org/netbeans/modules/xtest/XTestWizardIterator.java	Tue Jul 12 08:10:57 2005 +0000
     2.3 @@ -242,22 +242,22 @@
     2.4      
     2.5      private Map replaceMap;
     2.6      
     2.7 -    private Map getReplaceMap(Project project) throws IOException {
     2.8 +    private Map getReplaceMap(Project project) {
     2.9          if(replaceMap == null) {
    2.10              replaceMap = new HashMap();
    2.11              File xtestHome = InstalledFileLocator.getDefault().
    2.12                      locate("xtest-distribution", "org.netbeans.modules.xtest", false);  // NOI18N
    2.13 -            replaceMap.put("__XTEST_HOME__", xtestHome.getCanonicalPath()); // NOI18N
    2.14 +            replaceMap.put("__XTEST_HOME__", xtestHome.getAbsolutePath()); // NOI18N
    2.15              String projectName = ProjectUtils.getInformation(project).getName();
    2.16              replaceMap.put("__XTEST_MODULE__", projectName); // NOI18N
    2.17              File netbeansDestDir = InstalledFileLocator.getDefault().
    2.18                      locate("core/core.jar", null, false);  // NOI18N
    2.19              netbeansDestDir = new File(netbeansDestDir, "../../.."); // NOI18N
    2.20 -            replaceMap.put("__NETBEANS_DEST_DIR__", netbeansDestDir.getCanonicalPath()); // NOI18N
    2.21 +            replaceMap.put("__NETBEANS_DEST_DIR__", netbeansDestDir.getAbsolutePath()); // NOI18N
    2.22              File jemmyJar = InstalledFileLocator.getDefault().
    2.23                      locate("modules/ext/jemmy.jar", "org.netbeans.modules.jemmy", false);  // NOI18N
    2.24              if(jemmyJar != null) {
    2.25 -                replaceMap.put("__JEMMY_JAR__", jemmyJar.getCanonicalPath()); // NOI18N
    2.26 +                replaceMap.put("__JEMMY_JAR__", jemmyJar.getAbsolutePath()); // NOI18N
    2.27              } else {
    2.28                  replaceMap.put("__JEMMY_JAR__", "jemmy.jar"); // NOI18N
    2.29              }