avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject cvs commit: avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground ContextualizationHandler.java StandardComponent.java StandardContext.java StandardContextImp.java
Date Wed, 16 Apr 2003 14:45:55 GMT
leosimons    2003/04/16 07:45:55

  Modified:    merlin/merlin-core/src/test/org/apache/avalon/merlin
                        AbstractTestCase.java PlaygroundTestCase.java
               merlin/merlin-core/src/test/org/apache/avalon/playground
                        ContextualizationHandler.java
                        StandardComponent.java StandardContext.java
                        StandardContextImp.java
  Log:
  optimize imports, remove unused stuff.
  
  Revision  Changes    Path
  1.2       +4 -13     avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/merlin/AbstractTestCase.java
  
  Index: AbstractTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/merlin/AbstractTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractTestCase.java	15 Apr 2003 03:02:08 -0000	1.1
  +++ AbstractTestCase.java	16 Apr 2003 14:45:54 -0000	1.2
  @@ -51,22 +51,13 @@
   package org.apache.avalon.merlin;
   
   import java.io.File;
  -import junit.framework.TestCase;
  -import org.apache.avalon.assembly.locator.DefaultLocator;
  -import org.apache.avalon.assembly.logging.LoggingManager;
  -import org.apache.avalon.assembly.logging.TargetDescriptor;
  -import org.apache.avalon.assembly.logging.LoggingDescriptor;
  -import org.apache.avalon.assembly.logging.DefaultLoggingManager;
  +
   import org.apache.avalon.assembly.locator.DefaultLocator;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.logger.Logger;
  -import org.apache.avalon.meta.model.Category;
   import org.apache.avalon.merlin.block.Block;
  -import org.apache.avalon.merlin.kernel.impl.DefaultKernel;
  -import org.apache.avalon.merlin.kernel.KernelException;
   import org.apache.avalon.merlin.kernel.Kernel;
  +import org.apache.avalon.merlin.kernel.impl.DefaultKernel;
  +
  +import junit.framework.TestCase;
   
   /**
    * A testcase for the @link{DefaultTypeManager}.
  
  
  
  1.2       +2 -34     avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/merlin/PlaygroundTestCase.java
  
  Index: PlaygroundTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/merlin/PlaygroundTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PlaygroundTestCase.java	15 Apr 2003 03:02:08 -0000	1.1
  +++ PlaygroundTestCase.java	16 Apr 2003 14:45:54 -0000	1.2
  @@ -2,42 +2,10 @@
   
   package org.apache.avalon.merlin;
   
  -import java.io.File;
  -import java.io.IOException;
  -import java.io.FileInputStream;
  -import java.io.InputStream;
  -import java.io.IOException;
  -import java.io.FileNotFoundException;
  -import java.util.StringTokenizer;
  -import java.util.Enumeration;
  -import java.util.List;
  -import java.util.Iterator;
  -import java.util.jar.JarFile;
  -import java.util.ArrayList;
  -import java.util.Map;
  -import java.util.jar.Attributes;
  -import java.util.jar.Manifest;
  -import java.net.URLClassLoader;
   import java.net.URL;
  -import java.util.zip.ZipEntry;
  -import java.net.MalformedURLException;
  -import java.net.JarURLConnection;
   
  -import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.configuration.ConfigurationException;
  -import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.DefaultContext;
  -import org.apache.avalon.framework.context.Contextualizable;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.meta.info.ReferenceDescriptor;
  -import org.apache.avalon.merlin.block.Block;
  -import org.apache.avalon.merlin.kernel.KernelException;
  -import org.apache.avalon.assembly.util.ExceptionHelper;
  -import org.apache.avalon.assembly.locator.DefaultLocator;
  -import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.util.ExceptionHelper;
  -import junit.framework.TestCase;
  +import org.apache.avalon.merlin.block.Block;
   
   public class PlaygroundTestCase extends AbstractTestCase
   {
  @@ -55,7 +23,7 @@
       {
           try
           {
  -            URL root = (URL) super.getRootBlock().getURL();
  +            URL root = super.getRootBlock().getURL();
               URL url = new URL( root, "/");
               assertTrue( url.getContent() != null );
               assertTrue( url.getContent() instanceof Block );
  
  
  
  1.2       +26 -28    avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/ContextualizationHandler.java
  
  Index: ContextualizationHandler.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/ContextualizationHandler.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ContextualizationHandler.java	13 Mar 2003 01:05:19 -0000	1.1
  +++ ContextualizationHandler.java	16 Apr 2003 14:45:55 -0000	1.2
  @@ -1,14 +1,14 @@
  -/* ==================================================================== 
  - * The Apache Software License, Version 1.1 
  - * 
  - * Copyright (c) 2002 The Apache Software Foundation. All rights 
  - * reserved. 
  - * 
  - * Redistribution and use in source and binary forms, with or without 
  - * modification, are permitted provided that the following conditions 
  - * are met: 
  - * 
  - * 1. Redistributions of source code must retain the above copyright 
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2002 The Apache Software Foundation. All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
  @@ -20,13 +20,13 @@
    *    if any, must include the following acknowledgment:
    *    "This product includes software developed by the
    *    Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software 
  - *    itself, if and wherever such third-party acknowledgments  
  + *    Alternately, this acknowledgment may appear in the software
  + *    itself, if and wherever such third-party acknowledgments
    *    normally appear.
    *
  - * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation" 
  + * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation"
    *    must not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,19 +49,17 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation. For more
  - * information on the Apache Software Foundation, please see 
  + * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */ 
  + */
   
   package org.apache.avalon.playground;
   
  -import java.util.Map;
   import java.lang.reflect.Constructor;
  +import java.util.Map;
   
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -import org.apache.avalon.assembly.appliance.Appliance;
   import org.apache.avalon.assembly.lifecycle.context.Contextualization;
  +import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.meta.model.ContextDirective;
   
   /**
  @@ -82,8 +80,8 @@
        * @param context the deployment context
        * @exception ContextException if a contextualization error occurs
        */
  -    public void contextualize( 
  -      ContextDirective directive, Object object, Map map ) 
  +    public void contextualize(
  +      ContextDirective directive, Object object, Map map )
         throws ContextException
       {
           if( object instanceof Contextualizable )
  @@ -95,7 +93,7 @@
               }
               else
               {
  -                final String error = 
  +                final String error =
                     "Supplied context does not implement the StandardContext interface.";
                   throw new ContextException( error );
               }
  @@ -110,7 +108,7 @@
       }
   
      /**
  -    * Returns a instance of a class established using the supplied map as a 
  +    * Returns a instance of a class established using the supplied map as a
       * constructor argument.
       *
       * @param descriptor the context descriptor
  @@ -133,7 +131,7 @@
           {
               throw new NullPointerException( "map" );
           }
  -        
  +
           String classname = directive.getClassname();
           Class base;
           if( classname != null )
  @@ -161,8 +159,8 @@
           }
           catch( NoSuchMethodException e )
           {
  -            final String error = 
  -              "Custom context class: [" + classname 
  +            final String error =
  +              "Custom context class: [" + classname
                 + "] does not implement a constructor pattern <init>{ Map }.";
               throw new ContextException( error, e );
           }
  
  
  
  1.2       +18 -20    avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardComponent.java
  
  Index: StandardComponent.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardComponent.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardComponent.java	13 Mar 2003 01:05:20 -0000	1.1
  +++ StandardComponent.java	16 Apr 2003 14:45:55 -0000	1.2
  @@ -1,14 +1,14 @@
  -/* ==================================================================== 
  - * The Apache Software License, Version 1.1 
  - * 
  - * Copyright (c) 2002 The Apache Software Foundation. All rights 
  - * reserved. 
  - * 
  - * Redistribution and use in source and binary forms, with or without 
  - * modification, are permitted provided that the following conditions 
  - * are met: 
  - * 
  - * 1. Redistributions of source code must retain the above copyright 
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2002 The Apache Software Foundation. All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
  @@ -20,13 +20,13 @@
    *    if any, must include the following acknowledgment:
    *    "This product includes software developed by the
    *    Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software 
  - *    itself, if and wherever such third-party acknowledgments  
  + *    Alternately, this acknowledgment may appear in the software
  + *    itself, if and wherever such third-party acknowledgments
    *    normally appear.
    *
  - * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation" 
  + * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation"
    *    must not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,15 +49,13 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation. For more
  - * information on the Apache Software Foundation, please see 
  + * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */ 
  + */
   
   package org.apache.avalon.playground;
   
   import java.io.File;
  -import java.net.URL;
  -import java.net.URLClassLoader;
   
   import org.apache.avalon.framework.activity.Disposable;
   import org.apache.avalon.framework.activity.Initializable;
  @@ -122,7 +120,7 @@
        */
       public void initialize() throws Exception
       {
  -        m_message = 
  +        m_message =
             "\n  home: " + m_home
             + "\n  work: " + m_work
             + "\n  name: " + m_name
  
  
  
  1.3       +18 -17    avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- StandardContext.java	3 Apr 2003 22:14:06 -0000	1.2
  +++ StandardContext.java	16 Apr 2003 14:45:55 -0000	1.3
  @@ -1,14 +1,14 @@
  -/* ==================================================================== 
  - * The Apache Software License, Version 1.1 
  - * 
  - * Copyright (c) 2002 The Apache Software Foundation. All rights 
  - * reserved. 
  - * 
  - * Redistribution and use in source and binary forms, with or without 
  - * modification, are permitted provided that the following conditions 
  - * are met: 
  - * 
  - * 1. Redistributions of source code must retain the above copyright 
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2002 The Apache Software Foundation. All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
  @@ -20,13 +20,13 @@
    *    if any, must include the following acknowledgment:
    *    "This product includes software developed by the
    *    Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software 
  - *    itself, if and wherever such third-party acknowledgments  
  + *    Alternately, this acknowledgment may appear in the software
  + *    itself, if and wherever such third-party acknowledgments
    *    normally appear.
    *
  - * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation" 
  + * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation"
    *    must not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,13 +49,14 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation. For more
  - * information on the Apache Software Foundation, please see 
  + * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */ 
  + */
   
   package org.apache.avalon.playground;
   
   import java.io.File;
  +
   import org.apache.avalon.framework.context.Context;
   
   /**
  
  
  
  1.2       +18 -18    avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardContextImp.java
  
  Index: StandardContextImp.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-core/src/test/org/apache/avalon/playground/StandardContextImp.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StandardContextImp.java	13 Mar 2003 01:05:21 -0000	1.1
  +++ StandardContextImp.java	16 Apr 2003 14:45:55 -0000	1.2
  @@ -1,14 +1,14 @@
  -/* ==================================================================== 
  - * The Apache Software License, Version 1.1 
  - * 
  - * Copyright (c) 2002 The Apache Software Foundation. All rights 
  - * reserved. 
  - * 
  - * Redistribution and use in source and binary forms, with or without 
  - * modification, are permitted provided that the following conditions 
  - * are met: 
  - * 
  - * 1. Redistributions of source code must retain the above copyright 
  +/* ====================================================================
  + * The Apache Software License, Version 1.1
  + *
  + * Copyright (c) 2002 The Apache Software Foundation. All rights
  + * reserved.
  + *
  + * Redistribution and use in source and binary forms, with or without
  + * modification, are permitted provided that the following conditions
  + * are met:
  + *
  + * 1. Redistributions of source code must retain the above copyright
    *    notice, this list of conditions and the following disclaimer.
    *
    * 2. Redistributions in binary form must reproduce the above copyright
  @@ -20,13 +20,13 @@
    *    if any, must include the following acknowledgment:
    *    "This product includes software developed by the
    *    Apache Software Foundation (http://www.apache.org/)."
  - *    Alternately, this acknowledgment may appear in the software 
  - *    itself, if and wherever such third-party acknowledgments  
  + *    Alternately, this acknowledgment may appear in the software
  + *    itself, if and wherever such third-party acknowledgments
    *    normally appear.
    *
  - * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation" 
  + * 4. The names "Jakarta", "Avalon", and "Apache Software Foundation"
    *    must not be used to endorse or promote products derived from this
  - *    software without prior written permission. For written 
  + *    software without prior written permission. For written
    *    permission, please contact apache@apache.org.
    *
    * 5. Products derived from this software may not be called "Apache",
  @@ -49,15 +49,15 @@
    *
    * This software consists of voluntary contributions made by many
    * individuals on behalf of the Apache Software Foundation. For more
  - * information on the Apache Software Foundation, please see 
  + * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
  - */ 
  + */
   
   package org.apache.avalon.playground;
   
   import java.io.File;
   import java.util.Map;
  -import org.apache.avalon.framework.context.Context;
  +
   import org.apache.avalon.framework.context.ContextException;
   import org.apache.avalon.framework.context.DefaultContext;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message