felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r566976 - in /felix/trunk/framework/src/main/java/org: apache/felix/framework/cache/ apache/felix/framework/searchpolicy/ apache/felix/framework/util/ osgi/framework/
Date Fri, 17 Aug 2007 09:10:45 GMT
Author: cziegeler
Date: Fri Aug 17 02:10:42 2007
New Revision: 566976

URL: http://svn.apache.org/viewvc?view=rev&rev=566976
Log:
Organize imports, remove unused casts and remove trailing spaces - no other changes this time

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
    felix/trunk/framework/src/main/java/org/osgi/framework/AdminPermission.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/BundleRevision.java
Fri Aug 17 02:10:42 2007
@@ -19,10 +19,7 @@
 package org.apache.felix.framework.cache;
 
 import java.io.File;
-import java.io.InputStream;
-import java.security.cert.*;
-import java.util.*;
-import java.util.jar.*;
+import java.util.Map;
 
 import org.apache.felix.framework.Logger;
 import org.apache.felix.moduleloader.IContent;

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/DirectoryRevision.java
Fri Aug 17 02:10:42 2007
@@ -18,17 +18,21 @@
  */
 package org.apache.felix.framework.cache;
 
-import java.io.*;
-import java.net.MalformedURLException;
-import java.security.cert.X509Certificate;
-import java.util.*;
-import java.util.jar.*;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.Manifest;
 
 import org.apache.felix.framework.Logger;
 import org.apache.felix.framework.util.FelixConstants;
 import org.apache.felix.framework.util.StringMap;
 import org.apache.felix.framework.util.manifestparser.ManifestParser;
-import org.apache.felix.moduleloader.*;
+import org.apache.felix.moduleloader.DirectoryContent;
+import org.apache.felix.moduleloader.IContent;
+import org.apache.felix.moduleloader.JarContent;
 
 /**
  * <p>

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/cache/JarRevision.java
Fri Aug 17 02:10:42 2007
@@ -18,12 +18,18 @@
  */
 package org.apache.felix.framework.cache;
 
-import java.io.*;
-import java.net.*;
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
 import java.security.PrivilegedActionException;
-import java.security.cert.X509Certificate;
-import java.util.*;
-import java.util.jar.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
 import java.util.zip.ZipEntry;
 
 import org.apache.felix.framework.Logger;
@@ -31,7 +37,9 @@
 import org.apache.felix.framework.util.StringMap;
 import org.apache.felix.framework.util.Util;
 import org.apache.felix.framework.util.manifestparser.ManifestParser;
-import org.apache.felix.moduleloader.*;
+import org.apache.felix.moduleloader.ContentDirectoryContent;
+import org.apache.felix.moduleloader.IContent;
+import org.apache.felix.moduleloader.JarContent;
 
 /**
  * <p>
@@ -378,7 +386,7 @@
         }
         catch (PrivilegedActionException ex)
         {
-            throw ((PrivilegedActionException) ex).getException();
+            throw ex.getException();
         }
     }
 

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java
Fri Aug 17 02:10:42 2007
@@ -22,13 +22,36 @@
 import java.lang.reflect.Proxy;
 import java.net.URL;
 import java.security.ProtectionDomain;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
 
 import org.apache.felix.framework.Logger;
-import org.apache.felix.framework.util.*;
-import org.apache.felix.framework.util.manifestparser.*;
-import org.apache.felix.moduleloader.*;
-import org.osgi.framework.*;
+import org.apache.felix.framework.util.SecurityManagerEx;
+import org.apache.felix.framework.util.Util;
+import org.apache.felix.framework.util.manifestparser.Capability;
+import org.apache.felix.framework.util.manifestparser.ManifestParser;
+import org.apache.felix.framework.util.manifestparser.R4Directive;
+import org.apache.felix.framework.util.manifestparser.R4Library;
+import org.apache.felix.framework.util.manifestparser.Requirement;
+import org.apache.felix.moduleloader.ICapability;
+import org.apache.felix.moduleloader.IModule;
+import org.apache.felix.moduleloader.IModuleFactory;
+import org.apache.felix.moduleloader.IRequirement;
+import org.apache.felix.moduleloader.IWire;
+import org.apache.felix.moduleloader.ModuleEvent;
+import org.apache.felix.moduleloader.ModuleImpl;
+import org.apache.felix.moduleloader.ModuleListener;
+import org.apache.felix.moduleloader.ResourceNotFoundException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.PackagePermission;
+import org.osgi.framework.Version;
 
 public class R4SearchPolicyCore implements ModuleListener
 {
@@ -649,7 +672,7 @@
 
         // Now we need to calculate the "uses" constraints of every package
         // accessible to the provider module based on its current candidates.
-        Map usesMap = usesMap = calculateUsesConstraints(provider, moduleMap, candidatesMap);
+        Map usesMap = calculateUsesConstraints(provider, moduleMap, candidatesMap);
 
         // Verify that none of the provider's implied "uses" constraints
         // in the uses map conflict with anything in the importing module's
@@ -1107,7 +1130,7 @@
                 for (Iterator iter = candidatesMap.entrySet().iterator();
                     iter.hasNext(); )
                 {
-                    candidatesList.add((List) ((Map.Entry) iter.next()).getValue());
+                    candidatesList.add(((Map.Entry) iter.next()).getValue());
                 }
             }
 
@@ -1538,7 +1561,7 @@
             ? calculateImplicitImportedPackagesResolved(
                 targetModule, targetCapability, cycleMap)
             : calculateImplicitImportedPackagesUnresolved(
-                targetModule, targetCapability, candidatesMap, cycleMap);      
+                targetModule, targetCapability, candidatesMap, cycleMap);
     }
 
     // TODO: EXPERIMENTAL - This is currently not defined recursively, but it should be.
@@ -1618,7 +1641,7 @@
                 psTarget.m_module, psTarget.m_capability, candidatesMap, cycleMap);
         }
 
-        return null;      
+        return null;
     }
 
     private Map calculateExportedPackages(IModule targetModule)
@@ -1649,7 +1672,7 @@
     {
         return (candidatesMap.get(targetModule) == null)
             ? calculateRequiredPackagesResolved(targetModule)
-            : calculateRequiredPackagesUnresolved(targetModule, candidatesMap);      
+            : calculateRequiredPackagesUnresolved(targetModule, candidatesMap);
     }
 
     private Map calculateRequiredPackagesUnresolved(IModule targetModule, Map candidatesMap)
@@ -1753,7 +1776,7 @@
     {
         return (candidatesMap.get(psTarget.m_module) == null)
             ? calculateExportedAndReexportedPackagesResolved(psTarget.m_module, cycleMap)
-            : calculateExportedAndReexportedPackagesUnresolved(psTarget, candidatesMap, cycleMap);
     
+            : calculateExportedAndReexportedPackagesUnresolved(psTarget, candidatesMap, cycleMap);
     }
 
     private Map calculateExportedAndReexportedPackagesUnresolved(
@@ -2183,7 +2206,7 @@
                     cs.m_candidates[cs.m_idx].m_module,
                     cs.m_candidates[cs.m_idx].m_capability));
 
-                // TODO: EXPERIMENTAL - The following is part of an experimental 
+                // TODO: EXPERIMENTAL - The following is part of an experimental
                 //       implicit imported wire concept. The above code is how
                 //       the wire should normally be created.
                 // Add wires for any implicitly imported package from provider.

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
Fri Aug 17 02:10:42 2007
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -20,11 +20,24 @@
 
 import java.security.AccessController;
 import java.security.PrivilegedAction;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.EventListener;
+import java.util.EventObject;
 
-import org.apache.felix.framework.Felix;
 import org.apache.felix.framework.Logger;
-import org.osgi.framework.*;
+import org.osgi.framework.AllServiceListener;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkEvent;
+import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceListener;
+import org.osgi.framework.ServicePermission;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.SynchronousBundleListener;
 
 public class EventDispatcher
 {
@@ -88,7 +101,7 @@
 
         return eventDispatcher;
     }
-    
+
     public static void shutdown()
     {
         synchronized (m_threadLock)
@@ -105,7 +118,7 @@
             {
                 return;
             }
-            
+
             // Signal dispatch thread.
             m_stopping = true;
             synchronized (m_requestList)
@@ -124,7 +137,7 @@
                 {
                 }
             }
-            
+
             // remove the thread reference
             m_thread = null;
         }
@@ -445,7 +458,7 @@
             {
                 listeners = m_serviceListeners;
             }
-    
+
             // See if the listener is already registered, if so then
             // handle it according to the spec.
             for (int i = 0; i < listeners.length; i += LISTENER_ARRAY_INCREMENT)
@@ -685,7 +698,7 @@
         if (objectClass != null)
         {
             boolean hasPermission = false;
-            
+
             Object sm = System.getSecurityManager();
             if ((acc != null) && (sm != null))
             {
@@ -693,15 +706,15 @@
                     !hasPermission && (i < objectClass.length);
                     i++)
                 {
-                    try 
+                    try
                     {
                         ServicePermission perm =
                             new ServicePermission(
                                 objectClass[i], ServicePermission.GET);
                         ((SecurityManager) sm).checkPermission(perm, acc);
                         hasPermission = true;
-                    } 
-                    catch (Exception ex) 
+                    }
+                    catch (Exception ex)
                     {
                     }
                 }

Modified: felix/trunk/framework/src/main/java/org/osgi/framework/AdminPermission.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/osgi/framework/AdminPermission.java?view=diff&rev=566976&r1=566975&r2=566976
==============================================================================
--- felix/trunk/framework/src/main/java/org/osgi/framework/AdminPermission.java (original)
+++ felix/trunk/framework/src/main/java/org/osgi/framework/AdminPermission.java Fri Aug 17
02:10:42 2007
@@ -1,4 +1,4 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -18,10 +18,19 @@
  */
 package org.osgi.framework;
 
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.security.*;
-import java.util.*;
+import java.security.AccessController;
+import java.security.BasicPermission;
+import java.security.Permission;
+import java.security.PermissionCollection;
+import java.security.PrivilegedAction;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.StringTokenizer;
 
 import org.apache.felix.framework.FilterImpl;
 
@@ -214,7 +223,7 @@
                     public Object run()
                     {
                         m_bundleDict.put("location", m_bundle.getLocation());
-                        
+
                         createSigner(m_bundle, m_bundleDict);
                         return null;
                     }
@@ -236,9 +245,9 @@
             Method method = bundle.getClass().getDeclaredMethod(
                 "getSignerMatcher", null);
             method.setAccessible(true);
-            
+
             Object signer = method.invoke(bundle, null);
-            
+
             if (signer != null)
             {
                 dict.put("signer", signer);



Mime
View raw message