File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed
org.eclipse.ant.core/src_ant/org/eclipse/ant/internal/core/ant
org.eclipse.ant.launching/remote/org/eclipse/ant/internal/launching/remote
org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/model Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 5252import org .apache .tools .ant .Target ;
5353import org .apache .tools .ant .TaskAdapter ;
5454import org .apache .tools .ant .XmlLogger ;
55+ import org .apache .tools .ant .util .FileUtils ;
5556import org .apache .tools .ant .util .JavaEnvUtils ;
5657import org .eclipse .ant .core .AntCorePlugin ;
5758import org .eclipse .ant .core .AntCorePreferences ;
@@ -88,6 +89,9 @@ public class InternalAntRunner {
8889 private static boolean isSecurityManagerAllowed () {
8990 String sm = System .getProperty ("java.security.manager" ); //$NON-NLS-1$
9091 if (sm == null ) { // default is 'disallow' since 18 and was 'allow' before
92+ // There is a circularity problem if JavaEnvUtils is initialized before FileUtils on Windows
93+ // https://github.com/eclipse-platform/eclipse.platform/issues/2605
94+ FileUtils .getFileUtils ();
9195 return !JavaEnvUtils .isAtLeastJavaVersion ("18" ); //$NON-NLS-1$
9296 }
9397 // Value is either 'disallow' or 'allow' or specifies the SecurityManager class to set
Original file line number Diff line number Diff line change @@ -64,6 +64,9 @@ public class InternalAntRunner {
6464 private static boolean isSecurityManagerAllowed () {
6565 String sm = System .getProperty ("java.security.manager" ); //$NON-NLS-1$
6666 if (sm == null ) { // default is 'disallow' since 18 and was 'allow' before
67+ // There is a circularity problem if JavaEnvUtils is initialized before FileUtils on Windows
68+ // https://github.com/eclipse-platform/eclipse.platform/issues/2605
69+ FileUtils .getFileUtils ();
6770 return !JavaEnvUtils .isAtLeastJavaVersion ("18" ); //$NON-NLS-1$
6871 }
6972 // Value is either 'disallow' or 'allow' or specifies the SecurityManager class to set
Original file line number Diff line number Diff line change 4949import org .apache .tools .ant .Task ;
5050import org .apache .tools .ant .TaskAdapter ;
5151import org .apache .tools .ant .UnknownElement ;
52+ import org .apache .tools .ant .util .FileUtils ;
5253import org .apache .tools .ant .util .JavaEnvUtils ;
5354import org .eclipse .ant .core .AntCorePlugin ;
5455import org .eclipse .ant .core .AntCorePreferences ;
@@ -95,6 +96,9 @@ public class AntModel implements IAntModel {
9596 private static boolean isSecurityManagerAllowed () {
9697 String sm = System .getProperty ("java.security.manager" ); //$NON-NLS-1$
9798 if (sm == null ) { // default is 'disallow' since 18 and was 'allow' before
99+ // There is a circularity problem if JavaEnvUtils is initialized before FileUtils on Windows
100+ // https://github.com/eclipse-platform/eclipse.platform/issues/2605
101+ FileUtils .getFileUtils ();
98102 return !JavaEnvUtils .isAtLeastJavaVersion ("18" ); //$NON-NLS-1$
99103 }
100104 // Value is either 'disallow' or 'allow' or specifies the SecurityManager class to set
You can’t perform that action at this time.
0 commit comments