Bug 578820 - Use new FileLocator.getBundleFileLocation(Bundle)
Change-Id: I2923fbbdc48304da870da3813c5736e85d270d66
Signed-off-by: Hannes Wellmann <wellmann.hannes1@gmx.net>
Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform/+/191882
Tested-by: Sarika Sinha <sarika.sinha@in.ibm.com>
Reviewed-by: Sarika Sinha <sarika.sinha@in.ibm.com>
diff --git a/ant/org.eclipse.ant.core/META-INF/MANIFEST.MF b/ant/org.eclipse.ant.core/META-INF/MANIFEST.MF
index 342f222..e1023fb 100644
--- a/ant/org.eclipse.ant.core/META-INF/MANIFEST.MF
+++ b/ant/org.eclipse.ant.core/META-INF/MANIFEST.MF
@@ -15,7 +15,7 @@
org.eclipse.ant.internal.core.ant;x-friends:="org.eclipse.ant.launching",
org.eclipse.ant.internal.core.contentDescriber;x-internal:=true
Require-Bundle: org.eclipse.core.variables;bundle-version="[3.1.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)"
+ org.eclipse.core.runtime;bundle-version="[3.25.0,4.0.0)"
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.ant.internal.core.contentDescriber"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ClassPath: .
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
index 1ba8d18..695ad3e 100644
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
@@ -651,7 +651,7 @@
private URL getClasspathEntryURL(Bundle bundle, String library) throws IOException {
File urlFile = null;
if (library.equals("/")) { //$NON-NLS-1$
- urlFile = FileLocator.getBundleFile(bundle);
+ urlFile = FileLocator.getBundleFileLocation(bundle).orElseThrow();
} else {
try {
URL fileURL = FileLocator.toFileURL(bundle.getEntry(library));