Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2018-02-23 17:11:14 +0000
committerThomas Watson2018-02-23 17:11:14 +0000
commitb1bb45b665c8cd9568d9c492b615b817acbb2fe0 (patch)
treef651b072cb02e3395ecc40cf746a39387d5070e0
parent2d6be23f55e3a7e87b18708597c0a0afac8bf2be (diff)
downloadrt.equinox.framework-b1bb45b665c8cd9568d9c492b615b817acbb2fe0.tar.gz
rt.equinox.framework-b1bb45b665c8cd9568d9c492b615b817acbb2fe0.tar.xz
rt.equinox.framework-b1bb45b665c8cd9568d9c492b615b817acbb2fe0.zip
Update the felix resolver code to have the correct formatting
Just making sure the source is identical to the felix project here. Change-Id: Ic2bf1e34f2a5deabcba4652cb1aa463628e3f8bb Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
-rwxr-xr-xbundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Candidates.java6
-rwxr-xr-xbundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java31
2 files changed, 17 insertions, 20 deletions
diff --git a/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Candidates.java b/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Candidates.java
index f2ef54f52..cc55266e4 100755
--- a/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Candidates.java
+++ b/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/Candidates.java
@@ -1235,14 +1235,14 @@ class Candidates
for (Requirement dependent : dependents)
{
CandidateSelector dependentSelector = m_candidateMap.get(
- dependent);
+ dependent);
// If the dependent selector only has one capability left then check if
// the current candidate is the selector's current candidate.
if (dependentSelector != null
- && dependentSelector.getRemainingCandidateCount() <= 1)
+ && dependentSelector.getRemainingCandidateCount() <= 1)
{
if (current.equals(
- dependentSelector.getCurrentCandidate()))
+ dependentSelector.getCurrentCandidate()))
{
// return false since we do not want to allow this requirement
// to substitute the capability
diff --git a/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java b/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
index 146a9c563..e2203595e 100755
--- a/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
+++ b/bundles/org.eclipse.osgi/felix/src/org/apache/felix/resolver/ResolverImpl.java
@@ -1351,7 +1351,6 @@ public class ResolverImpl implements Resolver
}
}
}
-
// IMPLEMENTATION NOTE:
// Below we track the mutated reqs that have been permuted
// in a single candidates permutation. This permutation may contain a
@@ -1378,10 +1377,10 @@ public class ResolverImpl implements Resolver
if (!isCompatible(exportBlame, usedBlames.m_cap, resourcePkgMap))
{
mutated = (mutated != null)
- ? mutated
- : new HashSet<Requirement>();
+ ? mutated
+ : new HashSet<Requirement>();
rethrow = permuteUsedBlames(session, rethrow, allCandidates, resource,
- pkgName, null, usedBlames, permRef1, permRef2, mutated);
+ pkgName, null, usedBlames, permRef1, permRef2, mutated);
}
}
@@ -1433,9 +1432,8 @@ public class ResolverImpl implements Resolver
if (!isCompatible(requirementBlames, usedBlames.m_cap, resourcePkgMap))
{
mutated = (mutated != null)
- ? mutated
- : new HashSet<Requirement>();
- // Split packages, need to think how to get a good message for split packages (sigh)
+ ? mutated
+ : new HashSet<Requirement>();// Split packages, need to think how to get a good message for split packages (sigh)
// For now we just use the first requirement that brings in the package that conflicts
Blame requirementBlame = requirementBlames.get(0);
rethrow = permuteUsedBlames(session, rethrow, allCandidates, resource, pkgName, requirementBlame, usedBlames, permRef1, permRef2, mutated);
@@ -1521,12 +1519,12 @@ public class ResolverImpl implements Resolver
}
return null;
}
-
+
private ResolutionError permuteUsedBlames(ResolveSession session,
- ResolutionError rethrow, Candidates allCandidates, Resource resource,
- String pkgName, Blame requirementBlame, UsedBlames usedBlames,
- AtomicReference<Candidates> permRef1, AtomicReference<Candidates> permRef2,
- Set<Requirement> mutated)
+ ResolutionError rethrow, Candidates allCandidates, Resource resource,
+ String pkgName, Blame requirementBlame, UsedBlames usedBlames,
+ AtomicReference<Candidates> permRef1, AtomicReference<Candidates> permRef2,
+ Set<Requirement> mutated)
{
for (Blame usedBlame : usedBlames.m_blames)
{
@@ -1542,12 +1540,12 @@ public class ResolverImpl implements Resolver
if (requirementBlame == null)
{
rethrow = new UseConstraintError(session.getContext(), allCandidates,
- resource, pkgName, usedBlame);
+ resource, pkgName, usedBlame);
}
else
{
rethrow = new UseConstraintError(session.getContext(), allCandidates,
- resource, pkgName, requirementBlame, usedBlame);
+ resource, pkgName, requirementBlame, usedBlame);
}
}
@@ -1587,8 +1585,7 @@ public class ResolverImpl implements Resolver
return rethrow;
}
- private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated,
- Candidates permutation)
+ private boolean permuteUsedBlameRequirement(Requirement req, Set<Requirement> mutated, Candidates permutation)
{
// Sanity check for multiple.
if (Util.isMultiple(req))
@@ -1614,7 +1611,7 @@ public class ResolverImpl implements Resolver
}
return false;
}
-
+
private static OpenHashMap<String, Blame> calculateExportedPackages(
ResolveSession session,
Candidates allCandidates,

Back to the top