Author: cziegeler
Date: Thu Sep 16 06:48:14 2010
New Revision: 997605
URL: http://svn.apache.org/viewvc?rev=997605&view=rev
Log:
No need for extra type constants
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java?rev=997605&r1=997604&r2=997605&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
Thu Sep 16 06:48:14 2010
@@ -56,9 +56,6 @@ import org.osgi.service.cm.Configuration
public class RegisteredResourceImpl
implements RegisteredResource, Serializable {
- private static final String ENTITY_BUNDLE_PREFIX = "bundle:";
- private static final String ENTITY_CONFIG_PREFIX = "config:";
-
private static final long serialVersionUID = 5L;
/** The resource url. */
@@ -155,7 +152,7 @@ public class RegisteredResourceImpl
throw new IOException("Bundle resource does not contain a
bundle " + this.url);
}
this.digest = (digest != null && digest.length() > 0 ? digest
: id + ":" + computeDigest(this.dataFile));
- entity = ENTITY_BUNDLE_PREFIX + name;
+ entity = resourceType + ':' + name;
} finally {
is.close();
}
@@ -184,7 +181,7 @@ public class RegisteredResourceImpl
factoryPid = null;
configPid = pid;
}
- entity = ENTITY_CONFIG_PREFIX + (factoryPid == null ? "" :
factoryPid + ".") + configPid;
+ entity = resourceType + ':' + (factoryPid == null ? "" :
factoryPid + ".") + configPid;
attributes.put(Constants.SERVICE_PID, configPid);
// Add pseudo-properties