Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2013-04-12 16:32:07 -0400
committerIan Bull2013-04-12 16:32:07 -0400
commita6167da69e88b22dc13248c6a6d4efd8ee7371eb (patch)
tree5b7c875776cb751c8a2c4907f9848bf1adb6aed2 /bundles/org.eclipse.equinox.p2.repository
parent1a33ad63b2700f40043128a0e9fdaa69005bf249 (diff)
downloadrt.equinox.p2-a6167da69e88b22dc13248c6a6d4efd8ee7371eb.tar.gz
rt.equinox.p2-a6167da69e88b22dc13248c6a6d4efd8ee7371eb.tar.xz
rt.equinox.p2-a6167da69e88b22dc13248c6a6d4efd8ee7371eb.zip
bug 399668: URL for p2.index is not being generated properlyI20130416-0800
Adds a test case and removes compiler warnings for the change of how we compute the p2.index URI.
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
index 554820293..27d495053 100644
--- a/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
+++ b/bundles/org.eclipse.equinox.p2.repository/src/org/eclipse/equinox/internal/p2/repository/helpers/AbstractRepositoryManager.java
@@ -719,8 +719,6 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
localStream = new FileInputStream(indexFile);
locationProperties = LocationProperties.create(localStream);
}
- } catch (URISyntaxException e) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, e.getMessage(), e));
} finally {
if (localStream != null)
localStream.close();
@@ -734,12 +732,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
//Handle non local repos (i.e. not file:)
ByteArrayOutputStream index = new ByteArrayOutputStream();
IStatus indexFileStatus = null;
- try {
- indexFileStatus = getTransport().download(getIndexFileURI(location), index, monitor);
- } catch (URISyntaxException uriSyntaxException) {
- LogHelper.log(new Status(IStatus.ERROR, Activator.ID, uriSyntaxException.getMessage(), uriSyntaxException));
- indexFileStatus = null;
- }
+ indexFileStatus = getTransport().download(getIndexFileURI(location), index, monitor);
if (indexFileStatus != null && indexFileStatus.isOK())
locationProperties = LocationProperties.create(new ByteArrayInputStream(index.toByteArray()));
@@ -1184,7 +1177,7 @@ public abstract class AbstractRepositoryManager<T> implements IRepositoryManager
}
}
- private static URI getIndexFileURI(URI base) throws URISyntaxException {
+ private static URI getIndexFileURI(URI base) {
final String name = INDEX_FILE;
String spec = base.toString();
if (spec.endsWith(name))

Back to the top