You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2008/10/10 20:09:43 UTC
svn commit: r703542 -
/felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java
Author: rickhall
Date: Fri Oct 10 11:09:42 2008
New Revision: 703542
URL: http://svn.apache.org/viewvc?rev=703542&view=rev
Log:
More BundleInfo refactoring improvements. (FELIX-753)
Modified:
felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java
Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java?rev=703542&r1=703541&r2=703542&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/RegularBundleInfo.java Fri Oct 10 11:09:42 2008
@@ -18,16 +18,12 @@
*/
package org.apache.felix.framework;
-import java.io.IOException;
-import java.net.URL;
-import java.security.ProtectionDomain;
import java.util.*;
import org.apache.felix.framework.cache.BundleArchive;
import org.apache.felix.framework.searchpolicy.ModuleDefinition;
import org.apache.felix.framework.util.manifestparser.ManifestParser;
import org.apache.felix.moduleloader.ICapability;
-import org.apache.felix.moduleloader.IContentLoader;
import org.apache.felix.moduleloader.IModule;
import org.osgi.framework.*;
@@ -143,27 +139,7 @@
public Map getCurrentHeader()
{
- Map headerMap = null;
- // Special case the system bundle
- if (getBundleId() == 0)
- {
- // TODO: REFACTOR - This is sort of a hack, we should just expose
- // the bundle symbolic name from our API.
- try
- {
- headerMap = m_archive.getRevision(0).getManifestHeader();
- }
- catch (Exception ex)
- {
- // This should never happen.
- }
- }
- else
- {
- headerMap = ((ModuleDefinition) getCurrentModule().getDefinition()).getHeaders();
- }
-
- return headerMap;
+ return ((ModuleDefinition) getCurrentModule().getDefinition()).getHeaders();
}
public long getLastModified()