[jboss-cvs] JBossAS SVN: r95545 - projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/interceptor/processor.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Oct 24 16:03:37 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-24 16:03:37 -0400 (Sat, 24 Oct 2009)
New Revision: 95545

Modified:
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/interceptor/processor/ParserInterceptor.java
Log:
Restore format

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/interceptor/processor/ParserInterceptor.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/interceptor/processor/ParserInterceptor.java	2009-10-24 19:11:18 UTC (rev 95544)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/interceptor/processor/ParserInterceptor.java	2009-10-24 20:03:37 UTC (rev 95545)
@@ -44,46 +44,46 @@
 {
    // Provide logging
    private Logger log = LoggerFactory.getLogger(ParserInterceptor.class);
-   
+
    ParserInterceptor()
    {
       // Add the provided output
       addOutput(HttpMetadata.class);
    }
-   
-public void invoke(int state, InvocationContext context) throws LifecycleInterceptorException
-{
-   // Do nothing if the metadata is already available  
-   HttpMetadata metadata = context.getAttachment(HttpMetadata.class);
-   if (metadata != null)
-      return;
-   
-   // Parse and create metadta on STARTING
-   if (state == Bundle.STARTING)
+
+   public void invoke(int state, InvocationContext context) throws LifecycleInterceptorException
    {
-      try
+      // Do nothing if the metadata is already available  
+      HttpMetadata metadata = context.getAttachment(HttpMetadata.class);
+      if (metadata != null)
+         return;
+
+      // Parse and create metadta on STARTING
+      if (state == Bundle.STARTING)
       {
-         VirtualFile root = context.getRoot();
-         VirtualFile propsFile = root.getChild("/http-metadata.properties");
-         if (propsFile != null)
+         try
          {
-            log.info("Create and attach HttpMetadata");
-            metadata = createHttpMetadata(propsFile);
-            context.addAttachment(HttpMetadata.class, metadata);
+            VirtualFile root = context.getRoot();
+            VirtualFile propsFile = root.getChild("/http-metadata.properties");
+            if (propsFile != null)
+            {
+               log.info("Create and attach HttpMetadata");
+               metadata = createHttpMetadata(propsFile);
+               context.addAttachment(HttpMetadata.class, metadata);
+            }
          }
+         catch (IOException ex)
+         {
+            throw new LifecycleInterceptorException("Cannot parse metadata", ex);
+         }
       }
-      catch (IOException ex)
-      {
-         throw new LifecycleInterceptorException("Cannot parse metadata", ex);
-      }
    }
-}
 
    private HttpMetadata createHttpMetadata(VirtualFile propsFile) throws IOException
    {
       Properties props = new Properties();
       props.load(propsFile.openStream());
-      
+
       HttpMetadata metadata = new HttpMetadata(props.getProperty("servlet.name"));
       return metadata;
    }




More information about the jboss-cvs-commits mailing list