Fix for the installer crashing with NPE on line 589.

This commit is contained in:
Reinier Zwitserloot committed 2009-12-30 03:25:57 +01:00
1 parent cf11641c8a
commit 87044b0bc5
2 files changed
+18 -9

No files matched your search

@@ -103,7 +103,8 @@ public class EclipseFinder extends IdeFinder {
String eclipseLocation = findEclipseOnWindows1(dir);
if (eclipseLocation != null) {
try {
locations.add(createLocation(eclipseLocation));
IdeLocation newLocation = createLocation(eclipseLocation);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -172,7 +173,8 @@ public class EclipseFinder extends IdeFinder {
for (String guess : guesses) {
try {
locations.add(createLocation(guess));
IdeLocation newLocation = createLocation(guess);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -206,7 +208,8 @@ public class EclipseFinder extends IdeFinder {
if (!f.isDirectory()) return;
if (f.getName().toLowerCase().equals(getMacExecutableName().toLowerCase())) {
try {
locations.add(createLocation(f.getParent()));
IdeLocation newLocation = createLocation(f.getParent());
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -214,7 +217,8 @@ public class EclipseFinder extends IdeFinder {
if (f.getName().toLowerCase().contains(getDirName())) {
if (new File(f, getMacExecutableName()).exists()) {
try {
locations.add(createLocation(f.toString()));
IdeLocation newLocation = createLocation(f.toString());
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -69,7 +69,8 @@ public class NetbeansFinder extends IdeFinder {
String netbeansLocation = findNetbeansOnWindows1(dir);
if (netbeansLocation != null) {
try {
locations.add(NetbeansLocationProvider.create0(netbeansLocation));
IdeLocation newLocation = NetbeansLocationProvider.create0(netbeansLocation);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -85,7 +86,8 @@ public class NetbeansFinder extends IdeFinder {
String netbeansLocation = findNetbeansOnWindows1(dir2);
if (netbeansLocation != null) {
try {
locations.add(NetbeansLocationProvider.create0(netbeansLocation));
IdeLocation newLocation = NetbeansLocationProvider.create0(netbeansLocation);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -153,7 +155,8 @@ public class NetbeansFinder extends IdeFinder {
for (String guess : guesses) {
try {
locations.add(NetbeansLocationProvider.create0(guess));
IdeLocation newLocation = NetbeansLocationProvider.create0(guess);
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -179,7 +182,8 @@ public class NetbeansFinder extends IdeFinder {
if (!dir.isDirectory()) continue;
if (dir.getName().toLowerCase().startsWith("netbeans") && dir.getName().toLowerCase().endsWith(".app")) {
try {
locations.add(NetbeansLocationProvider.create0(dir.getAbsolutePath()));
IdeLocation newLocation = NetbeansLocationProvider.create0(dir.getAbsolutePath());
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}
@@ -189,7 +193,8 @@ public class NetbeansFinder extends IdeFinder {
if (!dir2.isDirectory()) continue;
if (dir2.getName().toLowerCase().startsWith("netbeans") && dir2.getName().toLowerCase().endsWith(".app")) {
try {
locations.add(NetbeansLocationProvider.create0(dir2.getAbsolutePath()));
IdeLocation newLocation = NetbeansLocationProvider.create0(dir2.getAbsolutePath());
if (newLocation != null) locations.add(newLocation);
} catch (CorruptedIdeLocationException e) {
problems.add(e);
}