Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java3
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/compositeArtifacts.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/compositeArtifacts.xml)1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/one/artifacts.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/one/artifacts.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/three/artifacts.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/three/artifacts.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/compositeArtifacts.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/compositeArtifacts.xml)2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/one/artifacts.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/one/artifacts.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/compositeContent.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml)1
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/one/content.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/three/content.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/three/content.xml)0
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/compositeContent.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/compositeContent.xml)2
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/one/content.xml (renamed from bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/one/content.xml)0
14 files changed, 14 insertions, 14 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
index 2a8701242..e17405051 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/repository/CompositeArtifactRepository.java
@@ -40,8 +40,7 @@ public class CompositeArtifactRepository extends AbstractArtifactRepository impl
public static final String PI_REPOSITORY_TYPE = "compositeArtifactRepository"; //$NON-NLS-1$
static final public String PROP_ATOMIC_LOADING = "p2.atomic.composite.loading"; //$NON-NLS-1$
- // by default, require that all children of a composite can be loaded; default may be changed to enforce old behavior (see bug 356561)
- static final public boolean ATOMIC_LOADING_DEFAULT = !"false".equals(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$//$NON-NLS-2$;
+ static final public boolean ATOMIC_LOADING_DEFAULT = Boolean.parseBoolean(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$
// keep a list of the child URIs. they can be absolute or relative. they may or may not point
// to a valid reachable repo
diff --git a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
index a1ac23620..ff4d5f28b 100644
--- a/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
+++ b/bundles/org.eclipse.equinox.p2.metadata.repository/src/org/eclipse/equinox/internal/p2/metadata/repository/CompositeMetadataRepository.java
@@ -38,8 +38,7 @@ public class CompositeMetadataRepository extends AbstractMetadataRepository impl
static final public String PI_REPOSITORY_TYPE = "compositeMetadataRepository"; //$NON-NLS-1$
static final public String PROP_ATOMIC_LOADING = "p2.atomic.composite.loading"; //$NON-NLS-1$
- // by default, require that all children of a composite can be loaded; default may be changed to enforce old behavior (see bug 356561)
- static final public boolean ATOMIC_LOADING_DEFAULT = !"false".equals(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$//$NON-NLS-2$;
+ static final public boolean ATOMIC_LOADING_DEFAULT = Boolean.parseBoolean(Activator.getContext().getProperty("eclipse.p2.atomic.composite.loading.default")); //$NON-NLS-1$
static final private Integer REPOSITORY_VERSION = new Integer(1);
static final public String XML_EXTENSION = ".xml"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
index 23769f6d9..0e329b73c 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/CompositeArtifactRepositoryTest.java
@@ -1386,11 +1386,11 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest {
IArtifactRepository repo = null;
IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- File repoFile = getTestData("Strict composite with missing child", "/testData/artifactRepo/compositeBadChildren");
+ File repoFile = getTestData("Atomic composite with missing child", "/testData/artifactRepo/composite/missingChild/atomicLoading");
URI correctChildURI = URIUtil.append(repoFile.toURI(), "one");
URI repoURI = repoFile.getAbsoluteFile().toURI();
- File alreadyLoadedChildFile = getTestData("Strict composite with missing child", "/testData/artifactRepo/compositeBadChildren/three");
+ File alreadyLoadedChildFile = getTestData("Atomic composite with missing child", "/testData/artifactRepo/composite/missingChild/atomicLoading/three");
IArtifactRepository alreadyLoadedChild = manager.loadRepository(alreadyLoadedChildFile.toURI(), null);
assertNotNull(alreadyLoadedChild);
URI previouslyAddedChildURI = URIUtil.append(repoFile.toURI(), "three");
@@ -1406,7 +1406,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest {
}
assertNull(repo);
assertTrue("an exception should have been reported", exception);
- assertFalse("Successfully loaded child should be removed when composite loading mode is set to strict", manager.contains(correctChildURI));
+ assertFalse("Successfully loaded child should be removed when composite loading mode is set to atomic", manager.contains(correctChildURI));
assertTrue("Periously loaded child should remain in repo manager", manager.contains(previouslyAddedChildURI));
}
@@ -1416,7 +1416,7 @@ public class CompositeArtifactRepositoryTest extends AbstractProvisioningTest {
IArtifactRepository repo = null;
IArtifactRepositoryManager manager = getArtifactRepositoryManager();
- File repoFile = getTestData("Composite with missing child", "/testData/artifactRepo/compositeBadChildrenLenient");
+ File repoFile = getTestData("Composite with missing child", "/testData/artifactRepo/composite/missingChild/nonAtomicLoading");
URI correctChildURI = URIUtil.append(repoFile.toURI(), "one");
assertFalse("Child should not be available in repo manager", manager.contains(correctChildURI));
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
index e52d7b431..e01be13d1 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/CompositeMetadataRepositoryTest.java
@@ -685,11 +685,11 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest {
IMetadataRepository repo = null;
IMetadataRepositoryManager manager = getMetadataRepositoryManager();
- File repoFile = getTestData("Strict composite with missing child", "/testData/metadataRepo/compositeBadChildren");
+ File repoFile = getTestData("Atomic composite with missing child", "/testData/metadataRepo/composite/missingChild/atomicLoading");
URI correctChildURI = URIUtil.append(repoFile.toURI(), "one");
URI repoURI = repoFile.getAbsoluteFile().toURI();
- File alreadyLoadedChildFile = getTestData("Strict composite with missing child", "/testData/metadataRepo/compositeBadChildren/three");
+ File alreadyLoadedChildFile = getTestData("Atomic composite with missing child", "/testData/metadataRepo/composite/missingChild/atomicLoading/three");
IMetadataRepository alreadyLoadedChild = manager.loadRepository(alreadyLoadedChildFile.toURI(), null);
assertNotNull(alreadyLoadedChild);
URI previouslyAddedChildURI = URIUtil.append(repoFile.toURI(), "three");
@@ -705,7 +705,7 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest {
}
assertNull(repo);
assertTrue("an exception should have been reported", exception);
- assertFalse("Successfully loaded child should be removed when composite loading mode is set to strict", manager.contains(correctChildURI));
+ assertFalse("Successfully loaded child should be removed when composite loading mode is set to atomic", manager.contains(correctChildURI));
assertTrue("Periously loaded child should remain in repo manager", manager.contains(previouslyAddedChildURI));
}
@@ -715,7 +715,7 @@ public class CompositeMetadataRepositoryTest extends AbstractProvisioningTest {
IMetadataRepository repo = null;
IMetadataRepositoryManager manager = getMetadataRepositoryManager();
- File repoFile = getTestData("Composite with missing child", "/testData/metadataRepo/compositeBadChildrenLenient");
+ File repoFile = getTestData("Composite with missing child", "/testData/metadataRepo/composite/missingChild/nonAtomicLoading");
URI correctChildURI = URIUtil.append(repoFile.toURI(), "one");
assertFalse("Child should not be available in repo manager", manager.contains(correctChildURI));
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/compositeArtifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/compositeArtifacts.xml
index 72be2b001..8b544dabe 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/compositeArtifacts.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/compositeArtifacts.xml
@@ -4,6 +4,7 @@
<properties size='2'>
<property name='p2.compressed' value='false'/>
<property name='p2.timestamp' value='1234'/>
+ <property name='p2.atomic.composite.loading' value='true'/>
</properties>
<children size='3'>
<child location='one'/>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/one/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/one/artifacts.xml
index 19e55d746..19e55d746 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/one/artifacts.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/one/artifacts.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/three/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/three/artifacts.xml
index 6c73323c4..6c73323c4 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildren/three/artifacts.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/atomicLoading/three/artifacts.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/compositeArtifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/compositeArtifacts.xml
index e798958bb..cacef3f38 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/compositeArtifacts.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/compositeArtifacts.xml
@@ -4,7 +4,7 @@
<properties size='2'>
<property name='p2.compressed' value='false'/>
<property name='p2.timestamp' value='1234'/>
- <property name='p2.atomic.composite.loading' value='false'/>
+ <!-- this is the default: <property name='p2.atomic.composite.loading' value='false'/> -->
</properties>
<children size='2'>
<child location='one'/>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/one/artifacts.xml b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/one/artifacts.xml
index 19e55d746..19e55d746 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/compositeBadChildrenLenient/one/artifacts.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/artifactRepo/composite/missingChild/nonAtomicLoading/one/artifacts.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/compositeContent.xml
index 1d2b887c4..420982854 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/compositeContent.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/compositeContent.xml
@@ -4,6 +4,7 @@
<properties size='2'>
<property name='p2.compressed' value='false'/>
<property name='p2.timestamp' value='1234'/>
+ <property name='p2.atomic.composite.loading' value='true'/>
</properties>
<children size='3'>
<child location='one'/>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/one/content.xml
index 41f172f48..41f172f48 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/one/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/one/content.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/three/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/three/content.xml
index 41f172f48..41f172f48 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildren/three/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/atomicLoading/three/content.xml
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/compositeContent.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/compositeContent.xml
index a4e258836..0b3e79484 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/compositeContent.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/compositeContent.xml
@@ -4,7 +4,7 @@
<properties size='2'>
<property name='p2.compressed' value='false'/>
<property name='p2.timestamp' value='1234'/>
- <property name='p2.atomic.composite.loading' value='false'/>
+ <!-- this is the default: <property name='p2.atomic.composite.loading' value='false'/> -->
</properties>
<children size='2'>
<child location='one'/>
diff --git a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/one/content.xml b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/one/content.xml
index 41f172f48..41f172f48 100644
--- a/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/compositeBadChildrenLenient/one/content.xml
+++ b/bundles/org.eclipse.equinox.p2.tests/testData/metadataRepo/composite/missingChild/nonAtomicLoading/one/content.xml

Back to the top