Modify format to adhere to style.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1559426 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
index cd85aa6..738652e 100644
--- a/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
+++ b/framework/src/main/java/org/apache/felix/framework/capabilityset/CapabilitySet.java
@@ -43,34 +43,34 @@
     private final Set<BundleCapability> m_capSet = new HashSet<BundleCapability>();
     private final static SecureAction m_secureAction = new SecureAction();
 
-public void dump()
-{
-    for (Entry<String, Map<Object, Set<BundleCapability>>> entry : m_indices.entrySet())
+    public void dump()
     {
-        boolean header1 = false;
-        for (Entry<Object, Set<BundleCapability>> entry2 : entry.getValue().entrySet())
+        for (Entry<String, Map<Object, Set<BundleCapability>>> entry : m_indices.entrySet())
         {
-            boolean header2 = false;
-            for (BundleCapability cap : entry2.getValue())
+            boolean header1 = false;
+            for (Entry<Object, Set<BundleCapability>> entry2 : entry.getValue().entrySet())
             {
-                if (cap.getRevision().getBundle().getBundleId() != 0)
+                boolean header2 = false;
+                for (BundleCapability cap : entry2.getValue())
                 {
-                    if (!header1)
+                    if (cap.getRevision().getBundle().getBundleId() != 0)
                     {
-                        System.out.println(entry.getKey() + ":");
-                        header1 = true;
+                        if (!header1)
+                        {
+                            System.out.println(entry.getKey() + ":");
+                            header1 = true;
+                        }
+                        if (!header2)
+                        {
+                            System.out.println("   " + entry2.getKey());
+                            header2 = true;
+                        }
+                        System.out.println("      " + cap);
                     }
-                    if (!header2)
-                    {
-                        System.out.println("   " + entry2.getKey());
-                        header2 = true;
-                    }
-                    System.out.println("      " + cap);
                 }
             }
         }
     }
-}
 
     public CapabilitySet(List<String> indexProps, boolean caseSensitive)
     {
@@ -573,19 +573,25 @@
                     rhsString = rhsString.trim();
                 }
 
-                try {
+                try
+                {
                     // Try to find a suitable static valueOf method
-                    Method valueOfMethod = m_secureAction.getDeclaredMethod(lhs.getClass(), VALUE_OF_METHOD_NAME, STRING_CLASS);
-                    if (valueOfMethod.getReturnType().isAssignableFrom(lhs.getClass()) &&
-                        ((valueOfMethod.getModifiers() & Modifier.STATIC) > 0)) {
+                    Method valueOfMethod = m_secureAction.getDeclaredMethod(
+                        lhs.getClass(), VALUE_OF_METHOD_NAME, STRING_CLASS);
+                    if (valueOfMethod.getReturnType().isAssignableFrom(lhs.getClass())
+                        && ((valueOfMethod.getModifiers() & Modifier.STATIC) > 0))
+                    {
                         m_secureAction.setAccesssible(valueOfMethod);
                         rhs = valueOfMethod.invoke(null, new Object[] { rhsString });
                     }
-                } catch (Exception ex) {
+                }
+                catch (Exception ex)
+                {
                     // Static valueOf fails, try the next conversion mechanism
                 }
 
-                if (rhs == null) {
+                if (rhs == null)
+                {
                     Constructor ctor = m_secureAction.getConstructor(lhs.getClass(), STRING_CLASS);
                     m_secureAction.setAccesssible(ctor);
                     rhs = ctor.newInstance(new Object[] { rhsString });
diff --git a/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java b/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
index 623def0..c5c264c 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/EventDispatcher.java
@@ -910,11 +910,14 @@
         {
             // Dispatch according to the filter.
             boolean matched;
-            if (l instanceof UnfilteredServiceListener) {
+            if (l instanceof UnfilteredServiceListener)
+            {
                 // An UnfilteredServiceListener always matches, regardless of the filter.
                 // The filter is still passed on to the Service Registry Hooks.
                 matched = true;
-            } else {
+            }
+            else
+            {
                 matched = (filter == null)
                         || filter.match(((ServiceEvent) event).getServiceReference());
             }
diff --git a/framework/src/test/java/org/apache/felix/framework/util/manifestparser/ManifestParserTest.java b/framework/src/test/java/org/apache/felix/framework/util/manifestparser/ManifestParserTest.java
index 1ce5dc2..1373f8c 100644
--- a/framework/src/test/java/org/apache/felix/framework/util/manifestparser/ManifestParserTest.java
+++ b/framework/src/test/java/org/apache/felix/framework/util/manifestparser/ManifestParserTest.java
@@ -30,8 +30,10 @@
 import org.osgi.framework.namespace.IdentityNamespace;
 import org.osgi.framework.wiring.BundleCapability;
 
-public class ManifestParserTest extends TestCase {
-    public void testIdentityCapabilityMinimal() throws BundleException {
+public class ManifestParserTest extends TestCase
+{
+    public void testIdentityCapabilityMinimal() throws BundleException
+    {
         Map<String, String> headers = new HashMap<String, String>();
         headers.put(Constants.BUNDLE_MANIFESTVERSION, "2");
         headers.put(Constants.BUNDLE_SYMBOLICNAME, "foo.bar");
@@ -43,7 +45,8 @@
         assertEquals(0, ic.getDirectives().size());
     }
 
-    public void testIdentityCapabilityFull() throws BundleException {
+    public void testIdentityCapabilityFull() throws BundleException
+    {
         Map<String, String> headers = new HashMap<String, String>();
         headers.put(Constants.BUNDLE_MANIFESTVERSION, "2");
         headers.put(Constants.BUNDLE_SYMBOLICNAME, "abc;singleton:=true");
@@ -71,9 +74,12 @@
         assertEquals("true", ic.getDirectives().get(IdentityNamespace.CAPABILITY_SINGLETON_DIRECTIVE));
     }
 
-    private BundleCapability findCapability(Collection<BundleCapability> capabilities, String namespace) {
-        for (BundleCapability capability : capabilities) {
-            if (namespace.equals(capability.getNamespace())) {
+    private BundleCapability findCapability(Collection<BundleCapability> capabilities, String namespace)
+    {
+        for (BundleCapability capability : capabilities)
+        {
+            if (namespace.equals(capability.getNamespace()))
+            {
                 return capability;
             }
         }