tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r1094830 - in /tapestry/tapestry5/trunk/tapestry-core/src: main/java/org/apache/tapestry5/internal/event/ main/java/org/apache/tapestry5/internal/services/ main/java/org/apache/tapestry5/internal/services/assets/ main/java/org/apache/tapest...
Date Tue, 19 Apr 2011 00:18:48 GMT
Author: hlship
Date: Tue Apr 19 00:18:48 2011
New Revision: 1094830

URL: http://svn.apache.org/viewvc?rev=1094830&view=rev
Log:
TAP5-1508: Strip out more tracking of file change timestamps when in production, except for
asset resources, where tracking is needed to inform the client agent about the correct modification
timestamp

Modified:
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/event/InvalidationEventHubImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MessagesSourceImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
    tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InvalidationEventHub.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImplTest.java
    tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImplTest.java

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/event/InvalidationEventHubImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/event/InvalidationEventHubImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/event/InvalidationEventHubImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/event/InvalidationEventHubImpl.java
Tue Apr 19 00:18:48 2011
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -14,25 +14,40 @@
 
 package org.apache.tapestry5.internal.event;
 
-import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newThreadSafeList;
+import java.util.List;
+
+import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
 import org.apache.tapestry5.services.InvalidationEventHub;
 import org.apache.tapestry5.services.InvalidationListener;
 
-import java.util.List;
-
 /**
- * Base implementation class for classes (especially services) that need to manage a list
of {@link
- * org.apache.tapestry5.services.InvalidationListener}s.
+ * Base implementation class for classes (especially services) that need to manage a list
of
+ * {@link org.apache.tapestry5.services.InvalidationListener}s.
  */
 public class InvalidationEventHubImpl implements InvalidationEventHub
 {
-    private final List<InvalidationListener> listeners = newThreadSafeList();
+    private final List<InvalidationListener> listeners;
+
+    protected InvalidationEventHubImpl(boolean productionMode)
+    {
+        if (productionMode)
+        {
+            listeners = null;
+        }
+        else
+        {
+            listeners = CollectionFactory.newThreadSafeList();
+        }
+    }
 
     /**
      * Notifies all {@link InvalidationListener listener}s.
      */
     protected final void fireInvalidationEvent()
     {
+        if (listeners == null)
+            return;
+
         for (InvalidationListener listener : listeners)
         {
             listener.objectWasInvalidated();
@@ -41,6 +56,9 @@ public class InvalidationEventHubImpl im
 
     public final void addInvalidationListener(InvalidationListener listener)
     {
+        if (listeners == null)
+            return;
+
         listeners.add(listener);
     }
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImpl.java
Tue Apr 19 00:18:48 2011
@@ -111,9 +111,11 @@ public final class ComponentInstantiator
         }
     }
 
-    public ComponentInstantiatorSourceImpl(Logger logger, ClassLoader parent, ComponentClassTransformer
transformer,
-            InternalRequestGlobals internalRequestGlobals, ClasspathURLConverter classpathURLConverter)
+    public ComponentInstantiatorSourceImpl(boolean productionMode, Logger logger, ClassLoader
parent,
+            ComponentClassTransformer transformer, InternalRequestGlobals internalRequestGlobals,
ClasspathURLConverter classpathURLConverter)
     {
+        super(productionMode);
+        
         this.parent = parent;
         this.transformer = transformer;
         this.logger = logger;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImpl.java
Tue Apr 19 00:18:48 2011
@@ -69,21 +69,23 @@ public class ComponentMessagesSourceImpl
         }
     }
 
-    public ComponentMessagesSourceImpl(List<Resource> appCatalogResources, PropertiesFileParser
parser,
+    public ComponentMessagesSourceImpl(@Symbol(SymbolConstants.PRODUCTION_MODE)
+    boolean productionMode, List<Resource> appCatalogResources, PropertiesFileParser
parser,
             ClasspathURLConverter classpathURLConverter)
     {
-        this(appCatalogResources, parser, new URLChangeTracker(classpathURLConverter));
+        this(productionMode, appCatalogResources, parser, new URLChangeTracker(classpathURLConverter));
     }
 
-    ComponentMessagesSourceImpl(Resource appCatalogResource, PropertiesFileParser parser,
URLChangeTracker tracker)
+    ComponentMessagesSourceImpl(boolean productionMode, Resource appCatalogResource, PropertiesFileParser
parser,
+            URLChangeTracker tracker)
     {
-        this(Arrays.asList(appCatalogResource), parser, tracker);
+        this(productionMode, Arrays.asList(appCatalogResource), parser, tracker);
     }
 
-    ComponentMessagesSourceImpl(List<Resource> appCatalogResources, PropertiesFileParser
parser,
-            URLChangeTracker tracker)
+    ComponentMessagesSourceImpl(boolean productionMode, List<Resource> appCatalogResources,
+            PropertiesFileParser parser, URLChangeTracker tracker)
     {
-        messagesSource = new MessagesSourceImpl(tracker, parser);
+        messagesSource = new MessagesSourceImpl(productionMode, productionMode ? null : tracker,
parser);
 
         appCatalogBundle = createAppCatalogBundle(appCatalogResources);
     }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImpl.java
Tue Apr 19 00:18:48 2011
@@ -92,14 +92,17 @@ public final class ComponentTemplateSour
         }
     };
 
-    public ComponentTemplateSourceImpl(TemplateParser parser, @Primary
+    public ComponentTemplateSourceImpl(boolean productionMode, TemplateParser parser, @Primary
     ComponentTemplateLocator templateLocator, ClasspathURLConverter classpathURLConverter)
     {
-        this(parser, templateLocator, new URLChangeTracker(classpathURLConverter));
+        this(productionMode, parser, templateLocator, new URLChangeTracker(classpathURLConverter));
     }
 
-    ComponentTemplateSourceImpl(TemplateParser parser, ComponentTemplateLocator locator,
URLChangeTracker tracker)
+    ComponentTemplateSourceImpl(boolean productionMode, TemplateParser parser, ComponentTemplateLocator
locator,
+            URLChangeTracker tracker)
     {
+        super(productionMode);
+
         this.parser = parser;
         this.locator = locator;
         this.tracker = tracker;

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalModule.java
Tue Apr 19 00:18:48 2011
@@ -61,13 +61,19 @@ public class InternalModule
 
     private final InvalidationEventHub classesInvalidationEventHub;
 
+    private final boolean productionMode;
+
     public InternalModule(UpdateListenerHub updateListenerHub, RequestGlobals requestGlobals,
 
+    @Symbol(SymbolConstants.PRODUCTION_MODE)
+    boolean productionMode,
+
     @ComponentClasses
     InvalidationEventHub classesInvalidationEventHub)
     {
         this.updateListenerHub = updateListenerHub;
         this.requestGlobals = requestGlobals;
+        this.productionMode = productionMode;
         this.classesInvalidationEventHub = classesInvalidationEventHub;
     }
 
@@ -128,7 +134,7 @@ public class InternalModule
 
     ClasspathURLConverter classpathURLConverter)
     {
-        ComponentInstantiatorSourceImpl source = new ComponentInstantiatorSourceImpl(logger,
+        ComponentInstantiatorSourceImpl source = new ComponentInstantiatorSourceImpl(productionMode,
logger,
                 classFactory.getClassLoader(), transformer, internalRequestGlobals, classpathURLConverter);
 
         updateListenerHub.addUpdateListener(source);
@@ -222,7 +228,7 @@ public class InternalModule
     public ComponentTemplateSource buildComponentTemplateSource(TemplateParser parser, @Primary
     ComponentTemplateLocator locator, ClasspathURLConverter classpathURLConverter)
     {
-        ComponentTemplateSourceImpl service = new ComponentTemplateSourceImpl(parser, locator,
classpathURLConverter);
+        ComponentTemplateSourceImpl service = new ComponentTemplateSourceImpl(productionMode,
parser, locator, classpathURLConverter);
 
         updateListenerHub.addUpdateListener(service);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MessagesSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MessagesSourceImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MessagesSourceImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/MessagesSourceImpl.java
Tue Apr 19 00:18:48 2011
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008, 2010 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -32,8 +32,7 @@ import org.apache.tapestry5.services.mes
  * A utility class that encapsulates all the logic for reading properties files and assembling
{@link Messages} from
  * them, in accordance with extension rules and locale. This represents code that was refactored
out of
  * {@link ComponentMessagesSourceImpl}. This class can be used as a base class, though the
existing code base uses it as
- * a
- * utility. Composition trumps inheritance!
+ * a utility. Composition trumps inheritance!
  * <p/>
  * The message catalog for a component is the combination of all appropriate properties files
for the component, plus
  * any keys inherited form base components and, ultimately, the application global message
catalog. At some point we
@@ -66,15 +65,18 @@ public class MessagesSourceImpl extends 
 
     private final Map<String, String> emptyMap = Collections.emptyMap();
 
-    public MessagesSourceImpl(URLChangeTracker tracker, PropertiesFileParser propertiesFileParser)
+    public MessagesSourceImpl(boolean productionMode, URLChangeTracker tracker,
+            PropertiesFileParser propertiesFileParser)
     {
+        super(productionMode);
+
         this.tracker = tracker;
         this.propertiesFileParser = propertiesFileParser;
     }
 
     public void checkForUpdates()
     {
-        if (tracker.containsChanges())
+        if (tracker != null && tracker.containsChanges())
         {
             messagesByBundleIdAndLocale.clear();
             cookedProperties.clear();
@@ -206,7 +208,10 @@ public class MessagesSourceImpl extends 
         if (!resource.exists())
             return emptyMap;
 
-        tracker.add(resource.toURL());
+        if (tracker != null)
+        {
+            tracker.add(resource.toURL());
+        }
 
         try
         {

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/ResourceChangeTrackerImpl.java
Tue Apr 19 00:18:48 2011
@@ -14,9 +14,11 @@
 
 package org.apache.tapestry5.internal.services.assets;
 
+import org.apache.tapestry5.SymbolConstants;
 import org.apache.tapestry5.internal.event.InvalidationEventHubImpl;
 import org.apache.tapestry5.ioc.Resource;
 import org.apache.tapestry5.ioc.annotations.PostInjection;
+import org.apache.tapestry5.ioc.annotations.Symbol;
 import org.apache.tapestry5.ioc.internal.util.URLChangeTracker;
 import org.apache.tapestry5.ioc.services.ClasspathURLConverter;
 import org.apache.tapestry5.services.UpdateListener;
@@ -27,8 +29,12 @@ public class ResourceChangeTrackerImpl e
 {
     private final URLChangeTracker tracker;
 
-    public ResourceChangeTrackerImpl(ClasspathURLConverter classpathURLConverter)
+    public ResourceChangeTrackerImpl(ClasspathURLConverter classpathURLConverter,
+            @Symbol(SymbolConstants.PRODUCTION_MODE)
+            boolean productionMode)
     {
+        super(productionMode);
+        
         // Use granularity of seconds (not milliseconds) since that works properly
         // with response headers for identifying last modified. Don't track
         // folder changes, just changes to actual files.

Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InvalidationEventHub.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InvalidationEventHub.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InvalidationEventHub.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/InvalidationEventHub.java
Tue Apr 19 00:18:48 2011
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//     http://www.apache.org/licenses/LICENSE-2.0
+// http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,17 +18,25 @@ package org.apache.tapestry5.services;
  * An object which manages a list of {@link org.apache.tapestry5.services.InvalidationListener}s.
There are multiple
  * event hub services implementing this interface, each with a specific marker annotation;
each can register listeners
  * and fire events; these are based on the type of resource that has been invalidated. Tapestry
has built-in support
- * for: <dl> <dt>message catalog resources <dd>{@link org.apache.tapestry5.services.ComponentMessages}
marker annotation
- * <dt>component templates <dd>{@link org.apache.tapestry5.services.ComponentTemplates}
 marker annotation <dt>component
- * classes <dd>{@link org.apache.tapestry5.services.ComponentClasses} marker annotation
</dl>
- *
+ * for:
+ * <dl>
+ * <dt>message catalog resources
+ * <dd>{@link org.apache.tapestry5.services.ComponentMessages} marker annotation
+ * <dt>component templates
+ * <dd>{@link org.apache.tapestry5.services.ComponentTemplates} marker annotation
+ * <dt>component classes
+ * <dd>{@link org.apache.tapestry5.services.ComponentClasses} marker annotation
+ * </dl>
+ * <p>
+ * Starting in Tapestry 5.3, these services are disabled in production (it does nothing).
+ * 
  * @since 5.1.0.0
  */
 public interface InvalidationEventHub
 {
     /**
      * Adds a listener, who needs to know when an underlying resource of a given category
has changed (so that the
-     * receiver may discard any cached data that may  have been invalidated).
+     * receiver may discard any cached data that may have been invalidated). Does nothing
in production mode.
      */
     void addInvalidationListener(InvalidationListener listener);
 }

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImplTest.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentInstantiatorSourceImplTest.java
Tue Apr 19 00:18:48 2011
@@ -77,8 +77,8 @@ public class ComponentInstantiatorSource
 
         replay();
 
-        ComponentInstantiatorSourceImpl e = new ComponentInstantiatorSourceImpl(logger, contextLoader,
transformer,
-                null, converter);
+        ComponentInstantiatorSourceImpl e = new ComponentInstantiatorSourceImpl(false, logger,
contextLoader,
+                transformer, null, converter);
 
         assertEquals(e.inControlledPackage("foo.bar.Baz"), false);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImplTest.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentMessagesSourceImplTest.java
Tue Apr 19 00:18:48 2011
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2009, 2010 The Apache Software Foundation
+// Copyright 2006, 2007, 2009, 2010, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -48,8 +48,8 @@ public class ComponentMessagesSourceImpl
     private final Resource simpleComponentResource = new ClasspathResource(
             "org/apache/tapestry5/internal/services/SimpleComponent.class");
 
-    private final ComponentMessagesSourceImpl source = new ComponentMessagesSourceImpl(simpleComponentResource
-            .forFile("AppCatalog.properties"), new PropertiesFileParserImpl(), tracker);
+    private final ComponentMessagesSourceImpl source = new ComponentMessagesSourceImpl(false,
+            simpleComponentResource.forFile("AppCatalog.properties"), new PropertiesFileParserImpl(),
tracker);
 
     @Test
     public void simple_component()
@@ -211,8 +211,8 @@ public class ComponentMessagesSourceImpl
         Resource resource = simpleComponentResource.forFile("NoSuchAppCatalog.properties");
         List<Resource> resources = Arrays.asList(resource);
 
-        ComponentMessagesSource source = new ComponentMessagesSourceImpl(resources, new PropertiesFileParserImpl(),
-                converter);
+        ComponentMessagesSource source = new ComponentMessagesSourceImpl(true, resources,
+                new PropertiesFileParserImpl(), converter);
 
         Messages messages = source.getMessages(model, Locale.ENGLISH);
 

Modified: tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImplTest.java?rev=1094830&r1=1094829&r2=1094830&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/internal/services/ComponentTemplateSourceImplTest.java
Tue Apr 19 00:18:48 2011
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008, 2010 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010, 2011 The Apache Software Foundation
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -92,7 +92,7 @@ public class ComponentTemplateSourceImpl
 
         replay();
 
-        ComponentTemplateSource source = new ComponentTemplateSourceImpl(parser, locator,
converter);
+        ComponentTemplateSource source = new ComponentTemplateSourceImpl(true, parser, locator,
converter);
 
         assertSame(source.getTemplate(model, Locale.ENGLISH), template);
 
@@ -142,7 +142,7 @@ public class ComponentTemplateSourceImpl
 
         replay();
 
-        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(parser, locator,
converter);
+        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(false, parser,
locator, converter);
         source.addInvalidationListener(listener);
 
         assertSame(source.getTemplate(model, Locale.ENGLISH), template);
@@ -210,7 +210,7 @@ public class ComponentTemplateSourceImpl
 
         replay();
 
-        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(parser, locator,
converter);
+        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(true, parser,
locator, converter);
 
         assertSame(source.getTemplate(model, Locale.ENGLISH), template);
 
@@ -249,7 +249,7 @@ public class ComponentTemplateSourceImpl
 
         replay();
 
-        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(parser, locator,
converter);
+        ComponentTemplateSourceImpl source = new ComponentTemplateSourceImpl(true, parser,
locator, converter);
 
         ComponentTemplate template = source.getTemplate(model, Locale.ENGLISH);
 
@@ -283,7 +283,7 @@ public class ComponentTemplateSourceImpl
 
         replay();
 
-        ComponentTemplateSource source = new ComponentTemplateSourceImpl(parser, locator,
converter);
+        ComponentTemplateSource source = new ComponentTemplateSourceImpl(true, parser, locator,
converter);
 
         assertSame(source.getTemplate(model, Locale.ENGLISH), template);
 



Mime
View raw message