Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2008-03-04 11:11:02 -0500
committerThomas Watson2008-03-04 11:11:02 -0500
commit471d9b742fb5d4c14df270e4cef6527e9d3bcfdf (patch)
tree343f2916a85b45f63f60c9afb350f977c1e5a3de /bundles/org.eclipse.osgi/resolver
parent15283df08ac2855ac93e6a2f4a53e70e19c7d3b7 (diff)
downloadrt.equinox.framework-471d9b742fb5d4c14df270e4cef6527e9d3bcfdf.tar.gz
rt.equinox.framework-471d9b742fb5d4c14df270e4cef6527e9d3bcfdf.tar.xz
rt.equinox.framework-471d9b742fb5d4c14df270e4cef6527e9d3bcfdf.zip
Bug 221339 NPE in VersionConstraintImpl.getName()v20080304
Diffstat (limited to 'bundles/org.eclipse.osgi/resolver')
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java4
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java4
2 files changed, 2 insertions, 6 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
index 040cbdecb..1566d806f 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/ImportPackageSpecificationImpl.java
@@ -49,9 +49,7 @@ public class ImportPackageSpecificationImpl extends VersionConstraintImpl implem
public String getBundleSymbolicName() {
if (Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(symbolicName)) {
StateImpl state = (StateImpl) getBundle().getContainingState();
- if (state == null)
- return Constants.getInternalSymbolicName();
- return ((StateImpl) getBundle().getContainingState()).getSystemBundle();
+ return state == null ? Constants.getInternalSymbolicName() : state.getSystemBundle();
}
return symbolicName;
}
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
index 7c2fdbc8b..c4dcbe9f3 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/VersionConstraintImpl.java
@@ -23,9 +23,7 @@ public abstract class VersionConstraintImpl implements VersionConstraint {
public String getName() {
if (Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(name)) {
StateImpl state = (StateImpl) getBundle().getContainingState();
- if (state == null)
- return Constants.getInternalSymbolicName();
- return ((StateImpl) bundle.getContainingState()).getSystemBundle();
+ return state == null ? Constants.getInternalSymbolicName() : state.getSystemBundle();
}
return name;
}

Back to the top