Bug 143416 - AntSecurityException whilst trying to edit a build file
Signed-off-by: Sarika Sinha <sarika.sinha@in.ibm.com>
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
index dfbf9f9..d7a4707 100644
--- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
+++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model/AntModel.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -419,7 +419,12 @@
}
private void initializeProject(Project project, ClassLoader loader) {
- processAntHome(false);
+ try {
+ processAntHome(false);
+ }
+ catch (AntSecurityException ex) {
+ // do nothing - Ant home can not be set from this thread
+ }
project.init();
setProperties(project);
setTasks(project, loader);