tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r569893 [6/6] - in /tapestry/tapestry5/trunk: ./ .settings/ quickstart/src/main/resources/archetype-resources/src/main/java/services/ src/site/ src/site/resources/ src/site/xdoc/ support/ tapestry-core/ tapestry-core/src/main/java/org/apach...
Date Sun, 26 Aug 2007 22:24:07 GMT
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java
Sun Aug 26 15:23:55 2007
@@ -17,9 +17,9 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.Orderable;
 import org.apache.tapestry.ioc.internal.IOCInternalTestCase;
+import org.slf4j.Logger;
 import org.testng.annotations.Test;
 
 public class OrdererTest extends IOCInternalTestCase
@@ -27,11 +27,11 @@
     @Test
     public void no_dependencies()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY");
@@ -48,13 +48,13 @@
     @Test
     public void missing_constraint_type()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(UtilMessages.constraintFormat("fred", "barney"));
+        logger.warn(UtilMessages.constraintFormat("fred", "barney"));
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY", "fred");
@@ -71,13 +71,13 @@
     @Test
     public void unknown_constraint_type()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn(UtilMessages.constraintFormat("nearby:fred", "barney"));
+        logger.warn(UtilMessages.constraintFormat("nearby:fred", "barney"));
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY", "nearby:fred");
@@ -94,11 +94,11 @@
     @Test
     public void nulls_not_included_in_result()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY");
@@ -117,11 +117,11 @@
     @Test
     public void duplicate_id()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY");
@@ -129,7 +129,7 @@
 
         verify();
 
-        log.warn(UtilMessages.duplicateOrderer("fred"), null);
+        logger.warn(UtilMessages.duplicateOrderer("fred"));
 
         replay();
 
@@ -151,11 +151,11 @@
     @Test
     public void leader()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY", "before:*");
@@ -172,11 +172,11 @@
     @Test
     public void trailer()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED");
         o.add("barney", "BARNEY", "after:*");
@@ -193,11 +193,11 @@
     @Test
     public void prereqs()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED", "after:wilma");
         o.add("barney", "BARNEY", "after:fred,betty");
@@ -214,11 +214,11 @@
     @Test
     public void pre_and_post_reqs()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED", "after:wilma");
         o.add("barney", "BARNEY", "after:fred,betty");
@@ -231,15 +231,15 @@
 
         verify();
     }
-    
+
     @Test
     public void case_insensitivity()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED", "after:Wilma");
         o.add("barney", "BARNEY", "after:Fred,BETTY");
@@ -253,19 +253,18 @@
         verify();
     }
 
-
     @Test
     public void dependency_cycle()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
-        log.warn("Unable to add 'barney' as a dependency of 'betty', as that forms a "
+        logger.warn("Unable to add 'barney' as a dependency of 'betty', as that forms a "
                 + "dependency cycle ('betty' depends on itself via 'barney'). "
-                + "The dependency has been ignored.", null);
+                + "The dependency has been ignored.");
 
         replay();
 
-        Orderer<String> o = new Orderer<String>(log);
+        Orderer<String> o = new Orderer<String>(logger);
 
         o.add("fred", "FRED", "after:wilma");
         o.add("barney", "BARNEY", "after:fred,betty");
@@ -296,25 +295,25 @@
     @Test
     public void toString_DependencyNode()
     {
-        Log log = mockLog();
+        Logger logger = mockLogger();
 
         replay();
 
-        DependencyNode<String> node1 = new DependencyNode<String>(log, new Orderable("node1",
+        DependencyNode<String> node1 = new DependencyNode<String>(logger, new
Orderable("node1",
                 "NODE1"));
 
         assertEquals(node1.toString(), "[node1]");
 
-        DependencyNode<String> node2 = new DependencyNode<String>(log, new Orderable("node2",
+        DependencyNode<String> node2 = new DependencyNode<String>(logger, new
Orderable("node2",
                 "NODE2"));
 
-        DependencyNode<String> node3 = new DependencyNode<String>(log, new Orderable("node3",
+        DependencyNode<String> node3 = new DependencyNode<String>(logger, new
Orderable("node3",
                 "NODE3"));
 
-        DependencyNode<String> node4 = new DependencyNode<String>(log, new Orderable("node4",
+        DependencyNode<String> node4 = new DependencyNode<String>(logger, new
Orderable("node4",
                 "NODE4"));
 
-        DependencyNode<String> node5 = new DependencyNode<String>(log, new Orderable("node5",
+        DependencyNode<String> node5 = new DependencyNode<String>(logger, new
Orderable("node5",
                 "NODE5"));
 
         node2.addDependency(node1);

Modified: tapestry/tapestry5/trunk/tapestry-spring/pom.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/pom.xml?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/pom.xml (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/pom.xml Sun Aug 26 15:23:55 2007
@@ -26,7 +26,7 @@
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
-      <version>1.2.8</version>
+      <version>2.0</version>
       <scope>provided</scope>
     </dependency>
     <dependency>

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
Sun Aug 26 15:23:55 2007
@@ -149,7 +149,7 @@
         return Collections.emptySet();
     }
 
-    public String getLogName()
+    public String getLoggerName()
     {
         return "Spring";
     }

Modified: tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry/test/RandomDataSource.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry/test/RandomDataSource.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry/test/RandomDataSource.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-test/src/main/java/org/apache/tapestry/test/RandomDataSource.java
Sun Aug 26 15:23:55 2007
@@ -25,9 +25,6 @@
 import java.util.List;
 import java.util.Random;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 /**
  * Provides access to random data that can be used when populating a test database with "reasonable"
  * data. The majority of this is access to random words from an american english dictionary,
which
@@ -35,8 +32,6 @@
  */
 public final class RandomDataSource
 {
-    private final Log _log = LogFactory.getLog(getClass());
-
     private final Random _random = new Random(System.currentTimeMillis());
 
     private final List<String> _words = new ArrayList<String>();
@@ -49,12 +44,12 @@
         for (int i = 0; i < 3; i++)
             readWords("american." + i);
 
-        _log.info(format("Dictionary contains %d words", _words.size()));
+        System.out.printf("Dictionary contains %d words\n", _words.size());
     }
 
     private void readWords(String name)
     {
-        _log.info("Reading " + name + " ...");
+        System.out.println("Reading " + name + " ...");
 
         int count = 0;
 
@@ -85,7 +80,7 @@
             throw new RuntimeException(format("Error reading '%s': %s", name + ex.getMessage()),
ex);
         }
 
-        _log.info(format("... %d words", count));
+        System.out.printf("... %d words\n", count);
     }
 
     public boolean maybe(int percent)

Modified: tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java?rev=569893&r1=569892&r2=569893&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-tutorial1/src/main/java/org/apache/tapestry/tutorial/services/AppModule.java
Sun Aug 26 15:23:55 2007
@@ -16,7 +16,6 @@
 
 import java.io.IOException;
 
-import org.apache.commons.logging.Log;
 import org.apache.tapestry.ioc.MappedConfiguration;
 import org.apache.tapestry.ioc.OrderedConfiguration;
 import org.apache.tapestry.ioc.annotations.InjectService;
@@ -24,6 +23,7 @@
 import org.apache.tapestry.services.RequestFilter;
 import org.apache.tapestry.services.RequestHandler;
 import org.apache.tapestry.services.Response;
+import org.slf4j.Logger;
 
 /**
  * This module is automatically included as part of the Tapestry IoC Registry, it's a good
place to
@@ -39,10 +39,9 @@
         // locales to just "en" (English). As you add localised message catalogs and other
assets,
         // you can extend this list of locales (it's a comma seperated series of locale names;
         // the first locale name is the default when there's no reasonable match).
-        
+
         configuration.add("tapestry.supported-locales", "en");
     }
-    
 
     /**
      * This is a service definition, the service will be named TimingFilter. The interface,
@@ -50,8 +49,8 @@
      * RequestHandler service configuration. Tapestry IoC is responsible for passing in an
      * appropriate Log instance. Requests for static resources are handled at a higher level,
so
      * this filter will only be invoked for Tapestry related requests.
-     */    
-    public RequestFilter buildTimingFilter(final Log log)
+     */
+    public RequestFilter buildTimingFilter(final Logger logger)
     {
         return new RequestFilter()
         {
@@ -65,14 +64,14 @@
                     // The reponsibility of a filter is to invoke the corresponding method
                     // in the handler. When you chain multiple filters together, each filter
                     // received a handler that is a bridge to the next filter.
-                    
+
                     return handler.service(request, response);
                 }
                 finally
                 {
                     long elapsed = System.currentTimeMillis() - startTime;
 
-                    log.info(String.format("Request time: %d ms", elapsed));
+                    logger.info(String.format("Request time: %d ms", elapsed));
                 }
             }
         };
@@ -90,7 +89,7 @@
         // Each contribution to an ordered configuration has a name, When necessary, you
may
         // set constraints to precisely control the invocation order of the contributed filter
         // within the pipeline.
-        
+
         configuration.add("Timing", filter);
     }
 }



Mime
View raw message