You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2006/10/27 20:00:09 UTC
svn commit: r468481 [2/3] - in /tapestry/tapestry5/tapestry-core/trunk: ./
src/main/aspect/org/apache/tapestry/internal/aspects/
src/main/java/org/apache/tapestry/
src/main/java/org/apache/tapestry/annotations/
src/main/java/org/apache/tapestry/dom/ sr...
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentClassTransformerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentClassTransformerImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentClassTransformerImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentClassTransformerImpl.java Fri Oct 27 11:00:05 2006
@@ -14,7 +14,7 @@
package org.apache.tapestry.internal.services;
-import static org.apache.tapestry.util.CollectionFactory.newMap;
+import static org.apache.tapestry.util.CollectionFactory.newThreadSafeMap;
import java.util.Map;
@@ -26,7 +26,6 @@
import org.apache.tapestry.annotations.ComponentClass;
import org.apache.tapestry.events.InvalidationListener;
import org.apache.tapestry.internal.ClasspathResource;
-import org.apache.tapestry.internal.annotations.Concurrent;
import org.apache.tapestry.internal.model.MutableComponentModelImpl;
import org.apache.tapestry.ioc.LogSource;
import org.apache.tapestry.model.ComponentModel;
@@ -36,14 +35,13 @@
/**
* Implementation of {@link org.apache.tapestry.internal.services.ComponentClassTransformer}.
*/
-@Concurrent
public class ComponentClassTransformerImpl implements ComponentClassTransformer,
InvalidationListener
{
/** Map from class name to class transformation. */
- private final Map<String, InternalClassTransformation> _nameToClassTransformation = newMap();
+ private final Map<String, InternalClassTransformation> _nameToClassTransformation = newThreadSafeMap();
- private final Map<String, ComponentModel> _nameToComponentModel = newMap();
+ private final Map<String, ComponentModel> _nameToComponentModel = newThreadSafeMap();
private final ComponentClassTransformWorker _workerChain;
@@ -64,14 +62,12 @@
* Clears the cache of {@link InternalClassTransformation} instances whenever the class loader
* is invalidated.
*/
- @Concurrent.Write
public void objectWasInvalidated()
{
_nameToClassTransformation.clear();
_nameToComponentModel.clear();
}
- @Concurrent.Write
public void transformComponentClass(CtClass ctClass, ClassLoader classLoader)
{
String classname = ctClass.getName();
@@ -129,7 +125,6 @@
_nameToComponentModel.put(classname, model);
}
- @Concurrent.Read
public Instantiator createInstantiator(Class componentClass)
{
String className = componentClass.getName();
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentEventImpl.java Fri Oct 27 11:00:05 2006
@@ -16,14 +16,9 @@
import org.apache.tapestry.ComponentEventHandler;
import org.apache.tapestry.ComponentResources;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.ioc.services.TypeCoercer;
import org.apache.tapestry.runtime.ComponentEvent;
-/**
- *
- */
-@SuppressNullCheck
public class ComponentEventImpl implements ComponentEvent
{
private final String _eventType;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ComponentTemplateSourceImpl.java Fri Oct 27 11:00:05 2006
@@ -14,7 +14,7 @@
package org.apache.tapestry.internal.services;
-import static org.apache.tapestry.util.CollectionFactory.newMap;
+import static org.apache.tapestry.util.CollectionFactory.newThreadSafeMap;
import java.util.Locale;
import java.util.Map;
@@ -22,17 +22,13 @@
import org.apache.tapestry.Resource;
import org.apache.tapestry.events.UpdateListener;
import org.apache.tapestry.internal.ClasspathResource;
-import org.apache.tapestry.internal.annotations.Concurrent;
import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
import org.apache.tapestry.internal.parser.ComponentTemplate;
import org.apache.tapestry.internal.util.URLChangeTracker;
/**
* Service implementation that manages a cache of parsed component templates.
- *
- *
*/
-@Concurrent
public final class ComponentTemplateSourceImpl extends InvalidationEventHubImpl implements
ComponentTemplateSource, UpdateListener
{
@@ -46,12 +42,12 @@
* parsed from the same "foo.html" resource). The resource may end up being null, meaning the
* template does not exist in any locale.
*/
- private final Map<String, Resource> _templateResources = newMap();
+ private final Map<String, Resource> _templateResources = newThreadSafeMap();
/**
* Cache of parsed templates, keyed on resource.
*/
- private final Map<Resource, ComponentTemplate> _templates = newMap();
+ private final Map<Resource, ComponentTemplate> _templates = newThreadSafeMap();
private final URLChangeTracker _tracker = new URLChangeTracker();
@@ -71,7 +67,6 @@
* (the combination of component name and locale is resolved to a resource). The localized
* resource is used as the key to a cache of {@link ComponentTemplate}s.
*/
- @Concurrent.Read
public ComponentTemplate getTemplate(String componentName, Locale locale)
{
String key = componentName + ":" + locale.toString();
@@ -95,7 +90,6 @@
return _templates.get(resource);
}
- @Concurrent.Write
private void parseTemplate(Resource r)
{
// In a race condition, we may parse the same template more than once. This will likely add
@@ -108,7 +102,6 @@
_templates.put(r, template);
}
- @Concurrent.Write
private void locateTemplateResource(String componentName, Locale locale, String key)
{
// TODO: Currently hard-coded to a ".html" extension! Need to locate the
@@ -121,7 +114,8 @@
// In a race condition, we may hit this method a couple of times, and overrite previous
// results with identical new results.
- _templateResources.put(key, localized);
+ if (localized != null)
+ _templateResources.put(key, localized);
}
/**
@@ -129,7 +123,6 @@
* cleared, and an invalidation event is fired. This is brute force ... a more targetted
* dependency management strategy may come later.
*/
- @Concurrent.Write
public void checkForUpdates()
{
if (_tracker.containsChanges())
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ConstructorArg.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ConstructorArg.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ConstructorArg.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ConstructorArg.java Fri Oct 27 11:00:05 2006
@@ -18,12 +18,8 @@
import javassist.CtClass;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-
/**
* Stores transformation type data about one argument to a class constructor.
- *
- *
*/
public class ConstructorArg
{
@@ -39,7 +35,6 @@
* @param value
* value to be injected via the constructor (may be null)
*/
- @SuppressNullCheck
ConstructorArg(CtClass type, Object value)
{
_type = notNull(type, "type");
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InfrastructureImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InfrastructureImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InfrastructureImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InfrastructureImpl.java Fri Oct 27 11:00:05 2006
@@ -16,18 +16,15 @@
import java.util.Map;
-import org.apache.tapestry.internal.annotations.Concurrent;
import org.apache.tapestry.ioc.ObjectProvider;
import org.apache.tapestry.ioc.ServiceLocator;
import org.apache.tapestry.services.Infrastructure;
import org.apache.tapestry.services.InfrastructureManager;
+import org.apache.tapestry.util.Defense;
/**
* TODO: Extra configuration to support application overrides.
- *
- *
*/
-@Concurrent
public class InfrastructureImpl implements Infrastructure, ObjectProvider
{
private InfrastructureManager _manager;
@@ -51,25 +48,15 @@
// Probably don't need to make this concurrent, since it executes at startup,
// before multithreading takes hold.
- @Concurrent.Write
- public void setMode(String mode)
+ public synchronized void setMode(String mode)
{
- _mode = mode;
+ _mode = Defense.notNull(mode, "mode");
+
+ deriveProperties();
}
- @Concurrent.Write
private void deriveProperties()
{
- // In a race condition between two or more threads, the first one will create
- // the properties, the later ones will gain access later and see that
- // the properties already exist.
-
- if (_properties != null)
- return;
-
- if (_mode == null)
- throw new RuntimeException(ServicesMessages.infrastructureModeNotSet());
-
_properties = _manager.getContributionsForMode(_mode);
// Don't need this again.
@@ -77,13 +64,10 @@
_manager = null;
}
- @Concurrent.Read
public <T> T provide(String expression, Class<T> objectType, ServiceLocator locator)
{
- // Lazily create the _properties
-
if (_properties == null)
- deriveProperties();
+ throw new RuntimeException(ServicesMessages.infrastructureModeNotSet());
Object object = _properties.get(expression);
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalClassTransformationImpl.java Fri Oct 27 11:00:05 2006
@@ -46,7 +46,6 @@
import org.apache.commons.logging.Log;
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.internal.InternalComponentResources;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.util.InternalUtils;
import org.apache.tapestry.model.ComponentModel;
import org.apache.tapestry.runtime.ComponentLifecycle;
@@ -122,7 +121,6 @@
* This is a constructor for the root class, the class that directly contains the ComponentClass
* annotation.
*/
- @SuppressNullCheck
public InternalClassTransformationImpl(CtClass ctClass, ClassLoader loader, Log log,
ComponentModel componentModel)
{
@@ -156,7 +154,6 @@
addMethod(sig, "return " + _resourcesFieldName + ";");
}
- @SuppressNullCheck
public InternalClassTransformationImpl(CtClass ctClass,
InternalClassTransformation parentTransformation, ClassLoader loader, Log log,
ComponentModel componentModel)
@@ -952,7 +949,6 @@
return fieldName;
}
- @SuppressNullCheck
public String addInjectedField(Class type, String suggestedName, Object value)
{
notNull(type, "type");
@@ -1036,7 +1032,6 @@
_constructor.append(format(" %s = $%d;\n", fieldName, _constructorArgs.size()));
}
- @SuppressNullCheck
public void injectField(String fieldName, Object value)
{
notNull(fieldName, "fieldName");
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/InternalModule.java Fri Oct 27 11:00:05 2006
@@ -27,7 +27,6 @@
import org.apache.tapestry.Location;
import org.apache.tapestry.events.InvalidationListener;
import org.apache.tapestry.internal.InternalConstants;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.bindings.LiteralBinding;
import org.apache.tapestry.internal.bindings.PropBindingFactory;
import org.apache.tapestry.ioc.LogSource;
@@ -65,7 +64,6 @@
*
*/
@Id("tapestry.internal")
-@SuppressNullCheck
public final class InternalModule
{
private final ComponentInstantiatorSource _componentInstantiatorSource;
@@ -337,7 +335,6 @@
_keywords.put("null", null);
}
- @SuppressNullCheck
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
@@ -352,7 +349,7 @@
BindingFactory thisFactory = new BindingFactory()
{
- @SuppressNullCheck
+
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
@@ -367,7 +364,6 @@
{
private final Pattern _pattern = Pattern.compile("^\\s*(-?\\d+)\\s*$");
- @SuppressNullCheck
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
@@ -389,7 +385,6 @@
private final Pattern _pattern = Pattern
.compile("^\\s*(-?\\d+)\\s*\\.\\.\\s*(-?\\d+)\\s*$");
- @SuppressNullCheck
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
@@ -415,7 +410,6 @@
private final Pattern _pattern = Pattern
.compile("^\\s*(\\-?((\\d+\\.)|(\\d*\\.\\d+)))\\s*$");
- @SuppressNullCheck
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
@@ -438,7 +432,6 @@
private final Pattern _pattern = Pattern.compile("^\\s*'(.*)'\\s*$");
- @SuppressNullCheck
public Binding newBinding(String description, ComponentResources component,
String expression, Location location)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/LinkFactoryImpl.java Fri Oct 27 11:00:05 2006
@@ -15,7 +15,6 @@
package org.apache.tapestry.internal.services;
import org.apache.tapestry.Link;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.structure.ComponentPageElement;
import org.apache.tapestry.internal.structure.Page;
import org.apache.tapestry.services.ComponentClassResolver;
@@ -23,10 +22,6 @@
import org.apache.tapestry.services.WebResponse;
import org.apache.tapestry.util.Defense;
-/**
- *
- */
-@SuppressNullCheck
public class LinkFactoryImpl implements LinkFactory
{
private final WebRequest _request;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/MixinWorker.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.internal.services;
import java.util.List;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageElementFactoryImpl.java Fri Oct 27 11:00:05 2006
@@ -20,7 +20,6 @@
import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.internal.InternalConstants;
import org.apache.tapestry.internal.TapestryException;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.parser.AttributeToken;
import org.apache.tapestry.internal.parser.ExpansionToken;
import org.apache.tapestry.internal.parser.StartElementToken;
@@ -44,7 +43,7 @@
* Null check suppressed as much as to simplify testing (yea! I can pass a null TypeCoercer) as it
* is for efficiency.
*/
-@SuppressNullCheck
+
public class PageElementFactoryImpl implements PageElementFactory
{
private final ComponentInstantiatorSource _componentInstantiatorSource;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PageLoaderImpl.java Fri Oct 27 11:00:05 2006
@@ -26,7 +26,6 @@
import org.apache.tapestry.events.InvalidationListener;
import org.apache.tapestry.internal.InternalConstants;
import org.apache.tapestry.internal.TapestryException;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.event.InvalidationEventHubImpl;
import org.apache.tapestry.internal.parser.AttributeToken;
import org.apache.tapestry.internal.parser.ComponentTemplate;
@@ -47,9 +46,6 @@
import org.apache.tapestry.util.CollectionFactory;
import org.apache.tapestry.util.IdAllocator;
-/**
- *
- */
public class PageLoaderImpl extends InvalidationEventHubImpl implements PageLoader,
InvalidationListener
{
@@ -67,7 +63,6 @@
private Locale _locale;
- @SuppressNullCheck
public PageLoaderImpl(ComponentTemplateSource templateSource,
PageElementFactory pageElementFactory, BindingSource bindingSource,
LinkFactory linkFactory, PersistentFieldManager persistentFieldManager)
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldBundleImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldBundleImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldBundleImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldBundleImpl.java Fri Oct 27 11:00:05 2006
@@ -19,11 +19,9 @@
import java.util.Collection;
import java.util.Map;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.services.PersistentFieldBundle;
import org.apache.tapestry.services.PersistentFieldChange;
-@SuppressNullCheck
public class PersistentFieldBundleImpl implements PersistentFieldBundle
{
/**
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldChangeImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldChangeImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldChangeImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldChangeImpl.java Fri Oct 27 11:00:05 2006
@@ -14,11 +14,9 @@
package org.apache.tapestry.internal.services;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.services.PersistentFieldChange;
import org.apache.tapestry.util.Defense;
-@SuppressNullCheck
public class PersistentFieldChangeImpl implements PersistentFieldChange
{
private final String _componentId;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldManagerImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldManagerImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldManagerImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/PersistentFieldManagerImpl.java Fri Oct 27 11:00:05 2006
@@ -17,7 +17,6 @@
import java.util.Collection;
import java.util.Map;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.util.InternalUtils;
import org.apache.tapestry.services.PersistentFieldBundle;
import org.apache.tapestry.services.PersistentFieldChange;
@@ -25,7 +24,6 @@
import org.apache.tapestry.services.PersistentFieldStrategy;
import org.apache.tapestry.util.CollectionFactory;
-@SuppressNullCheck
public class PersistentFieldManagerImpl implements PersistentFieldManager
{
private final Map<String, PersistentFieldStrategy> _strategies;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/ServicesMessages.java Fri Oct 27 11:00:05 2006
@@ -23,15 +23,17 @@
import org.apache.tapestry.Messages;
import org.apache.tapestry.Resource;
import org.apache.tapestry.internal.MessagesImpl;
-import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.internal.util.InternalUtils;
import org.apache.tapestry.runtime.RenderCommand;
import org.apache.tapestry.services.MethodSignature;
-@Utility
class ServicesMessages
{
private static final Messages MESSAGES = MessagesImpl.forClass(ServicesMessages.class);
+
+ private ServicesMessages()
+ {
+ }
static final String duplicateContribution(Object conflict, String name, Object existing)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategy.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategy.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategy.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/services/SessionPersistentFieldStrategy.java Fri Oct 27 11:00:05 2006
@@ -21,7 +21,6 @@
import java.util.Collections;
import java.util.List;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.services.PersistentFieldChange;
import org.apache.tapestry.services.PersistentFieldStrategy;
import org.apache.tapestry.services.WebRequest;
@@ -33,7 +32,7 @@
* Builds attribute names as:
* <code>state:<em>page-name</em>:<em>component-id</em>:<em>field-name</em></code>
*/
-@SuppressNullCheck
+
public class SessionPersistentFieldStrategy implements PersistentFieldStrategy
{
/**
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/ComponentPageElementImpl.java Fri Oct 27 11:00:05 2006
@@ -30,7 +30,6 @@
import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.internal.InternalComponentResources;
import org.apache.tapestry.internal.TapestryException;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.services.ComponentEventImpl;
import org.apache.tapestry.internal.services.Instantiator;
import org.apache.tapestry.internal.util.InternalUtils;
@@ -129,7 +128,7 @@
* @param location
* location of the element (within a template), used as part of exception reporting
*/
- @SuppressNullCheck
+
public ComponentPageElementImpl(Page page, ComponentPageElement container, String id,
Instantiator instantiator, TypeCoercer typeCoercer, Location location)
{
@@ -284,7 +283,7 @@
private RenderCommand _setupRender = new RenderCommand()
{
- @SuppressNullCheck
+
public void render(MarkupWriter writer, RenderQueue queue)
{
_rendering = true;
@@ -307,7 +306,7 @@
private RenderCommand _beginRender = new RenderCommand()
{
- @SuppressNullCheck
+
public void render(MarkupWriter writer, RenderQueue queue)
{
LifecycleEvent<Boolean> event = newEvent(true);
@@ -329,7 +328,7 @@
private RenderCommand _beforeRenderBody = new RenderCommand()
{
- @SuppressNullCheck
+
public void render(MarkupWriter writer, RenderQueue queue)
{
LifecycleEvent<Boolean> event = newEvent(true);
@@ -351,7 +350,7 @@
private RenderCommand _afterRender = new RenderCommand()
{
- @SuppressNullCheck
+
public void render(MarkupWriter writer, RenderQueue queue)
{
LifecycleEvent<Boolean> event = newEvent(false);
@@ -375,7 +374,7 @@
private RenderCommand _cleanupRender = new RenderCommand()
{
- @SuppressNullCheck
+
public void render(MarkupWriter writer, RenderQueue queue)
{
LifecycleEvent<Boolean> event = newEvent(false);
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/InternalComponentResourcesImpl.java Fri Oct 27 11:00:05 2006
@@ -24,7 +24,6 @@
import org.apache.tapestry.Link;
import org.apache.tapestry.internal.InternalComponentResources;
import org.apache.tapestry.internal.TapestryException;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.services.Instantiator;
import org.apache.tapestry.ioc.services.TypeCoercer;
import org.apache.tapestry.model.ComponentModel;
@@ -35,7 +34,7 @@
* resources to the component, including access to its parameters, parameter bindings, and
* persistent field data.
*/
-@SuppressNullCheck
+
public class InternalComponentResourcesImpl implements InternalComponentResources
{
private final ComponentModel _componentModel;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/PageImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/PageImpl.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/PageImpl.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/PageImpl.java Fri Oct 27 11:00:05 2006
@@ -21,14 +21,11 @@
import org.apache.commons.logging.Log;
import org.apache.tapestry.Link;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.services.LinkFactory;
import org.apache.tapestry.runtime.PageLifecycleListener;
import org.apache.tapestry.services.PersistentFieldBundle;
import org.apache.tapestry.services.PersistentFieldManager;
-/** */
-@SuppressNullCheck
public class PageImpl implements Page
{
private final String _name;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/StructureMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/StructureMessages.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/StructureMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/structure/StructureMessages.java Fri Oct 27 11:00:05 2006
@@ -18,13 +18,15 @@
import org.apache.tapestry.Messages;
import org.apache.tapestry.internal.MessagesImpl;
-import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.internal.util.InternalUtils;
-@Utility
-final class StructureMessages
+class StructureMessages
{
private static final Messages MESSAGES = MessagesImpl.forClass(StructureMessages.class);
+
+ private StructureMessages()
+ {
+ }
static String missingParameters(List<String> parameters, ComponentPageElement element)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/test/InternalBaseTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/test/InternalBaseTestCase.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/test/InternalBaseTestCase.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/test/InternalBaseTestCase.java Fri Oct 27 11:00:05 2006
@@ -28,7 +28,6 @@
import org.apache.tapestry.Location;
import org.apache.tapestry.Resource;
import org.apache.tapestry.internal.InternalComponentResources;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.ioc.InternalRegistry;
import org.apache.tapestry.internal.ioc.Module;
import org.apache.tapestry.internal.parser.ComponentTemplate;
@@ -65,10 +64,8 @@
/**
* Contains additional factory and training methods related to internal interfaces.
- *
- *
*/
-@SuppressNullCheck
+
public class InternalBaseTestCase extends BaseTestCase implements Registry
{
private static Registry _registry;
@@ -284,7 +281,8 @@
setReturnValue(page);
}
- protected final void train_getComponentResources(ComponentPageElement element, InternalComponentResources resources)
+ protected final void train_getComponentResources(ComponentPageElement element,
+ InternalComponentResources resources)
{
element.getComponentResources();
setReturnValue(resources);
@@ -296,7 +294,8 @@
setReturnValue(className);
}
- protected final void train_newRenderBodyElement(PageElementFactory elementFactory, ComponentPageElement component, PageElement body)
+ protected final void train_newRenderBodyElement(PageElementFactory elementFactory,
+ ComponentPageElement component, PageElement body)
{
elementFactory.newRenderBodyElement(component);
setReturnValue(body);
@@ -313,7 +312,9 @@
setReturnValue(Arrays.asList(names));
}
- protected final void train_newComponentElement(PageElementFactory elementFactory, ComponentPageElement container, String embeddedId, String embeddedType, String componentClassName, Location location, ComponentPageElement embedded)
+ protected final void train_newComponentElement(PageElementFactory elementFactory,
+ ComponentPageElement container, String embeddedId, String embeddedType,
+ String componentClassName, Location location, ComponentPageElement embedded)
{
elementFactory.newComponentElement(
isA(Page.class),
@@ -331,7 +332,8 @@
setReturnValue(componentType);
}
- protected final void train_getEmbeddedComponentModel(ComponentModel model, String embeddedId, EmbeddedComponentModel emodel)
+ protected final void train_getEmbeddedComponentModel(ComponentModel model, String embeddedId,
+ EmbeddedComponentModel emodel)
{
model.getEmbeddedComponentModel(embeddedId);
setReturnValue(emodel);
@@ -378,11 +380,12 @@
protected final void train_getEmbeddedIds(ComponentModel model, String... ids)
{
model.getEmbeddedComponentIds();
-
+
setReturnValue(Arrays.asList(ids));
}
- protected void train_getTemplate(ComponentTemplateSource templateSource, String className, Locale locale, ComponentTemplate template)
+ protected void train_getTemplate(ComponentTemplateSource templateSource, String className,
+ Locale locale, ComponentTemplate template)
{
templateSource.getTemplate(className, locale);
setReturnValue(template);
@@ -394,7 +397,8 @@
setReturnValue(model);
}
- protected final void train_newRootComponentElement(PageElementFactory elementFactory, String className, ComponentPageElement rootElement)
+ protected final void train_newRootComponentElement(PageElementFactory elementFactory,
+ String className, ComponentPageElement rootElement)
{
elementFactory.newRootComponentElement(isA(Page.class), eq(className));
setReturnValue(rootElement);
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/DependencyNode.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/DependencyNode.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/DependencyNode.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/DependencyNode.java Fri Oct 27 11:00:05 2006
@@ -22,7 +22,6 @@
import java.util.List;
import org.apache.commons.logging.Log;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.ioc.Orderable;
/**
@@ -31,7 +30,7 @@
*
* @param <T>
*/
-@SuppressNullCheck
+
class DependencyNode<T>
{
private final Log _log;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/InternalUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/InternalUtils.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/InternalUtils.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/InternalUtils.java Fri Oct 27 11:00:05 2006
@@ -29,8 +29,6 @@
import org.apache.tapestry.Locatable;
import org.apache.tapestry.Location;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.ioc.ServiceLocator;
import org.apache.tapestry.ioc.annotations.Inject;
import org.apache.tapestry.ioc.annotations.InjectService;
@@ -39,7 +37,7 @@
* Utilities used within various internal implemenations of Tapestry IOC and the rest of the
* tapestry-core framework.
*/
-@Utility
+
public class InternalUtils
{
/**
@@ -48,6 +46,10 @@
*/
public static final String NAME_PREFIX = "_$";
+ private InternalUtils()
+ {
+ }
+
/**
* Converts a method to a user presentable string consisting of the containing class name, the
* method name, and the short form of the parameter list (the class name of each parameter type,
@@ -81,7 +83,7 @@
}
/** Returns the size of an object array, or null if the array is empty. */
- @SuppressNullCheck
+
public static int size(Object[] array)
{
return array == null ? 0 : array.length;
@@ -267,13 +269,12 @@
* Returns true if the input is null, or is a zero length string (excluding leading/trailing
* whitespace).
*/
- @SuppressNullCheck
+
public static boolean isBlank(String input)
{
return input == null || input.length() == 0 || input.trim().length() == 0;
}
- @SuppressNullCheck
public static boolean isNonBlank(String input)
{
return !isBlank(input);
@@ -292,7 +293,7 @@
* Sniffs the object to see if it is a {@link Location} or {@link Locatable}. Returns null if
* null or not convertable to a location.
*/
- @SuppressNullCheck
+
public static Location locationOf(Object location)
{
if (location == null)
@@ -315,7 +316,7 @@
* the map to extract keys from (may be null)
* @return the sorted keys, or the empty set if map is null
*/
- @SuppressNullCheck
+
public static List<String> sortedKeys(Map map)
{
if (map == null)
@@ -341,7 +342,7 @@
* @param key
* @return the value from the map, or null if the map is null
*/
- @SuppressNullCheck
+
public static <K, V> V get(Map<K, V> map, K key)
{
if (map == null)
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/Orderer.java Fri Oct 27 11:00:05 2006
@@ -22,8 +22,6 @@
import java.util.Map;
import org.apache.commons.logging.Log;
-import org.apache.tapestry.internal.annotations.OneShot;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.ioc.IdMatcherImpl;
import org.apache.tapestry.ioc.IOCUtilities;
import org.apache.tapestry.ioc.IdMatcher;
@@ -34,9 +32,10 @@
* Used to order objects into an "execution" order. Each object must have a unique id. It may
* specify a list of constraints which identify the ordering of the objects.
*/
-@OneShot
public class Orderer<T>
{
+ private final OneShotLock _lock = new OneShotLock();
+
private final Log _log;
private final List<Orderable> _orderables = newList();
@@ -89,6 +88,8 @@
*/
public void add(Orderable<T> orderable)
{
+ _lock.check();
+
String id = orderable.getId();
if (_orderablesById.containsKey(id))
@@ -113,15 +114,18 @@
* optional, variable constraints
* @see #add(Orderable)
*/
- @SuppressNullCheck
+
public void add(String id, T target, String... constraints)
{
+ _lock.check();
+
add(new Orderable<T>(id, target, constraints));
}
- @OneShot.Lockdown
public List<T> getOrdered()
{
+ _lock.lock();
+
initializeGraph();
List<T> result = newList();
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/internal/util/UtilMessages.java Fri Oct 27 11:00:05 2006
@@ -18,16 +18,15 @@
import org.apache.tapestry.Messages;
import org.apache.tapestry.internal.MessagesImpl;
-import org.apache.tapestry.internal.annotations.Utility;
-/**
- *
- */
-@Utility
-final class UtilMessages
+class UtilMessages
{
private static final Messages MESSAGES = MessagesImpl.forClass(UtilMessages.class);
+ private UtilMessages()
+ {
+ }
+
static String unableToReadLastModified(URL url, Throwable cause)
{
return MESSAGES.format("unable-to-read-last-modified", url, cause);
@@ -48,4 +47,8 @@
return MESSAGES.format("constraint-format", constraint, id);
}
+ static String oneShotLock(StackTraceElement element)
+ {
+ return MESSAGES.format("one-shot-lock", element);
+ }
}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCConstants.java Fri Oct 27 11:00:05 2006
@@ -14,12 +14,6 @@
package org.apache.tapestry.ioc;
-import org.apache.tapestry.internal.annotations.Utility;
-
-/**
- *
- */
-@Utility
public class IOCConstants
{
public static final String DEFAULT_LIFECYCLE = "singleton";
@@ -27,4 +21,8 @@
public static final String MODULE_BUILDER_MANIFEST_ENTRY_NAME = "Tapestry-Module-Classes";
public static final String MASTER_OBJECT_PROVIDER_SERVICE_ID = "tapestry.ioc.MasterObjectProvider";
+
+ private IOCConstants()
+ {
+ }
}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCUtilities.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCUtilities.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCUtilities.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/IOCUtilities.java Fri Oct 27 11:00:05 2006
@@ -23,18 +23,16 @@
import java.util.Enumeration;
import java.util.jar.Manifest;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* A collection of utility methods for a couple of different areas, including creating the initial
* {@link org.apache.tapestry.ioc.Registry}.
- *
- *
*/
-@Utility
public final class IOCUtilities
{
+ private IOCUtilities()
+ {
+ }
+
/**
* Construct a default registry, including modules identify via the Tapestry-Module-Classes
* Manifest entry.
@@ -150,7 +148,7 @@
* Qualifies a list of interceptor service ids provided for an interceptor contribution. The
* special value "*" is not qualified.
*/
- @SuppressNullCheck
+
public static String qualifySimpleIdList(String sourceModuleId, String list)
{
if (list == null || list.equals("") || list.equals("*"))
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/Orderable.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/Orderable.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/Orderable.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/Orderable.java Fri Oct 27 11:00:05 2006
@@ -16,8 +16,6 @@
import static org.apache.tapestry.util.Defense.notBlank;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-
/**
* A wrapper that allows objects of a target type to be ordered. Each Orderable object is given a
* unique id and a set of pre-requisites (objects which should be ordered earlier) and
@@ -40,7 +38,7 @@
* the object to be ordered; this may also be null (in which case the id represents a
* placeholder)
*/
- @SuppressNullCheck
+
public Orderable(String id, T target, String... constraints)
{
_id = notBlank(id, "id");
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/RegistryBuilder.java Fri Oct 27 11:00:05 2006
@@ -23,11 +23,11 @@
import java.util.Map;
import org.apache.commons.logging.Log;
-import org.apache.tapestry.internal.annotations.OneShot;
import org.apache.tapestry.internal.ioc.DefaultModuleDefImpl;
import org.apache.tapestry.internal.ioc.IOCMessages;
import org.apache.tapestry.internal.ioc.LogSourceImpl;
import org.apache.tapestry.internal.ioc.RegistryImpl;
+import org.apache.tapestry.internal.util.OneShotLock;
import org.apache.tapestry.ioc.annotations.SubModule;
import org.apache.tapestry.ioc.def.ModuleDef;
import org.apache.tapestry.ioc.services.TapestryIOCModule;
@@ -35,12 +35,11 @@
/**
* Used to construct the IoC {@link org.apache.tapestry.ioc.Registry}. This class is <em>not</em>
* threadsafe. The Registry, once created, <em>is</em> threadsafe.
- *
- *
*/
-@OneShot
public final class RegistryBuilder
{
+ private final OneShotLock _lock = new OneShotLock();
+
/** Module defs, keyed on module id. */
final Map<String, ModuleDef> _modules = newMap();
@@ -71,6 +70,8 @@
public void add(ModuleDef moduleDef)
{
+ _lock.check();
+
String id = moduleDef.getModuleId();
if (_modules.containsKey(id))
@@ -84,6 +85,8 @@
public void add(Class... moduleBuilderClasses)
{
+ _lock.check();
+
List<Class> queue = newList(Arrays.asList(moduleBuilderClasses));
while (!queue.isEmpty())
@@ -105,6 +108,8 @@
public void add(String classname)
{
+ _lock.check();
+
try
{
Class builderClass = Class.forName(classname, true, _classLoader);
@@ -117,19 +122,24 @@
}
}
- @OneShot.Lockdown
public Registry build()
{
+ _lock.lock();
+
return new RegistryImpl(_modules.values(), _classLoader, _logSource);
}
public ClassLoader getClassLoader()
{
+ _lock.check();
+
return _classLoader;
}
public Log getLog()
{
+ _lock.check();
+
return _log;
}
}
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFabUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFabUtils.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFabUtils.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/ClassFabUtils.java Fri Oct 27 11:00:05 2006
@@ -19,18 +19,17 @@
import java.lang.reflect.Method;
import java.util.Map;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* Handy method useful when creating new classes using
* {@link org.apache.tapestry.ioc.services.ClassFab}.
- *
- * @author Howard Lewis Ship
*/
-@Utility
public class ClassFabUtils
{
private static long _uid = System.currentTimeMillis();
+
+ private ClassFabUtils()
+ {
+ }
/**
* Generates a unique class name, which will be in the default package.
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/MethodSignature.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/MethodSignature.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/MethodSignature.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/MethodSignature.java Fri Oct 27 11:00:05 2006
@@ -20,8 +20,6 @@
import java.lang.reflect.Method;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-
/**
* A representation of a {@link java.lang.reflect.Method}, identifying the name, return type,
* parameter types and exception types. Actual Method objects are tied to a particular class, and
@@ -54,7 +52,6 @@
private Class[] _exceptionTypes;
- @SuppressNullCheck
public MethodSignature(Class returnType, String name, Class[] parameterTypes,
Class[] exceptionTypes)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/TapestryIOCModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/TapestryIOCModule.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/TapestryIOCModule.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/ioc/services/TapestryIOCModule.java Fri Oct 27 11:00:05 2006
@@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.ioc.services.ChainBuilderImpl;
import org.apache.tapestry.internal.ioc.services.DefaultImplementationBuilderImpl;
import org.apache.tapestry.internal.ioc.services.ExceptionAnalyzerImpl;
@@ -45,11 +44,8 @@
/**
* Defines the base set of services for the Tapestry IOC container.
- *
- *
*/
@Id("tapestry.ioc")
-@SuppressNullCheck
public final class TapestryIOCModule
{
private final ClassFactory _classFactory;
@@ -209,7 +205,7 @@
*
* @see #buildTypeCoercer(Collection, ComponentInstantiatorSource)
*/
- @SuppressNullCheck
+
public static void contributeTypeCoercer(Configuration<CoercionTuple> configuration)
{
add(configuration, Object.class, String.class, new Coercion<Object, String>()
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/runtime/LifecycleEvent.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/runtime/LifecycleEvent.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/runtime/LifecycleEvent.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/runtime/LifecycleEvent.java Fri Oct 27 11:00:05 2006
@@ -15,7 +15,6 @@
package org.apache.tapestry.runtime;
import org.apache.commons.logging.Log;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
/**
* Event object passed into a lifecycle method. Each component class forms a chain of command around
@@ -71,7 +70,7 @@
* describes the method invoked, the method that returned the value
* @return true if the value was non-null, and the event is now aborted
*/
- @SuppressNullCheck
+
public boolean storeResult(T result, String methodDescription)
{
if (result == null)
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/FormSupport.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/FormSupport.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/FormSupport.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/FormSupport.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.services;
/**
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/MethodSignature.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/MethodSignature.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/MethodSignature.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/MethodSignature.java Fri Oct 27 11:00:05 2006
@@ -18,8 +18,6 @@
import java.lang.reflect.Modifier;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-
/**
* A representation of a method signature, which consists of its name, modifiers (primarily,
* visibility), return type, parameter types, and declared exception types.
@@ -28,10 +26,7 @@
* situations where the actual class has not been loaded yet. When classes are already loaded (such
* as, for use with {@link org.apache.hivemind.service.ClassFab}), then a different implementation
* with the same name, {@link org.apache.tapestry.ioc.services.MethodSignature} is used.
- *
- *
*/
-@SuppressNullCheck
public class MethodSignature implements Comparable<MethodSignature>
{
private int _hashCode = -1;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TapestryModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TapestryModule.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TapestryModule.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TapestryModule.java Fri Oct 27 11:00:05 2006
@@ -32,7 +32,6 @@
import org.apache.tapestry.annotations.CleanupRender;
import org.apache.tapestry.annotations.SetupRender;
import org.apache.tapestry.internal.InternalConstants;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.bindings.LiteralBindingFactory;
import org.apache.tapestry.internal.services.ApplicationGlobalsImpl;
import org.apache.tapestry.internal.services.BindingSourceImpl;
@@ -93,7 +92,6 @@
@Id("tapestry")
@SubModule(
{ InternalModule.class })
-@SuppressNullCheck
public final class TapestryModule
{
private final ChainBuilder _chainBuilder;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformConstants.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformConstants.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformConstants.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformConstants.java Fri Oct 27 11:00:05 2006
@@ -17,7 +17,6 @@
import java.lang.reflect.Modifier;
import org.apache.tapestry.MarkupWriter;
-import org.apache.tapestry.internal.annotations.Utility;
import org.apache.tapestry.runtime.ComponentEvent;
import org.apache.tapestry.runtime.LifecycleEvent;
@@ -25,7 +24,6 @@
* Constants used by implementations of
* {@link org.apache.tapestry.services.ComponentClassTransformWorker}.
*/
-@Utility
public final class TransformConstants
{
// Shared parameters of a whole bunch of lifecycle methods, representing the different
@@ -107,6 +105,10 @@
* @see org.apache.tapestry.annotations.CleanupRender
*/
public static final MethodSignature CLEANUP_RENDER_SIGNATURE = newLifecycleMethodSignature("cleanupRender");
+
+ private TransformConstants()
+ {
+ }
private static MethodSignature newLifecycleMethodSignature(String name)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformUtils.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformUtils.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformUtils.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/services/TransformUtils.java Fri Oct 27 11:00:05 2006
@@ -18,22 +18,15 @@
import java.util.Map;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* Support code for generating code (used when transforming component classes).
- *
- *
*/
-@Utility
public final class TransformUtils
{
private static final Map<String, PrimitiveTypeInfo> _nameToInfo = newMap();
private static final Map<Class, PrimitiveTypeInfo> _classToInfo = newMap();
- @SuppressNullCheck
static class PrimitiveTypeInfo
{
private final Class _wrapperType;
@@ -75,6 +68,10 @@
add(long.class, Long.class, "longValue", "0L");
add(float.class, Float.class, "floatValue", "0.0f");
add(double.class, Double.class, "doubleValue", "0.0d");
+ }
+
+ private TransformUtils()
+ {
}
private static void add(Class primitiveType, Class wrapperType, String unwrapperMethodName,
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/BaseTestCase.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/BaseTestCase.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/BaseTestCase.java Fri Oct 27 11:00:05 2006
@@ -40,7 +40,6 @@
import org.apache.tapestry.MarkupWriter;
import org.apache.tapestry.Resource;
import org.apache.tapestry.annotations.Parameter;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.services.InjectionProvider;
import org.apache.tapestry.ioc.Configuration;
import org.apache.tapestry.ioc.LogSource;
@@ -70,10 +69,8 @@
/**
* Base test case that adds a number of convienience factory and training methods to
* {@link org.apache.tapestry.test.TestBase}.
- *
- *
*/
-@SuppressNullCheck
+
public abstract class BaseTestCase extends TestBase
{
protected final void train_findFieldsWithAnnotation(ClassTransformation transformation,
@@ -553,7 +550,8 @@
return newMock(HttpServletRequest.class);
}
- protected final void train_getSession(HttpServletRequest request, boolean create, HttpSession session)
+ protected final void train_getSession(HttpServletRequest request, boolean create,
+ HttpSession session)
{
request.getSession(create);
setReturnValue(session);
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TestBase.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TestBase.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TestBase.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/test/TestBase.java Fri Oct 27 11:00:05 2006
@@ -15,7 +15,6 @@
package org.apache.tapestry.test;
import org.apache.commons.logging.Log;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.easymock.EasyMock;
import org.easymock.IExpectationSetters;
import org.easymock.IMocksControl;
@@ -101,7 +100,6 @@
* value to be returned from the method call
*/
@SuppressWarnings("unchecked")
- @SuppressNullCheck
protected final <T> IExpectationSetters<T> setReturnValue(Object returnValue)
{
return getMocksControl().andReturn(returnValue);
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/CollectionFactory.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/CollectionFactory.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/CollectionFactory.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/CollectionFactory.java Fri Oct 27 11:00:05 2006
@@ -25,8 +25,6 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* Static factory methods to ease the creation of new collection types (when using generics). Most
* of these method leverage the compiler's ability to match generic types by return value. Typical
@@ -42,12 +40,13 @@
* <pre>
* Map<Foo, Bar> map = new HashMap<Foo, Bar>();
* </pre>
- *
- *
*/
-@Utility
public final class CollectionFactory
{
+ private CollectionFactory()
+ {
+ }
+
/** Constructs and returns a generic {@link HashMap} instance. */
public static <K, V> Map<K, V> newMap()
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/Defense.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/Defense.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/Defense.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/Defense.java Fri Oct 27 11:00:05 2006
@@ -14,18 +14,14 @@
package org.apache.tapestry.util;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* Static utility methods for defensive programming.
- *
- *
*/
-@Utility
-@SuppressNullCheck
public final class Defense
{
+ private Defense()
+ {
+ }
/**
* Checks that a method parameter value is not null, and returns it. This method is used in
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/StrategyRegistry.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/StrategyRegistry.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/StrategyRegistry.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/StrategyRegistry.java Fri Oct 27 11:00:05 2006
@@ -21,7 +21,6 @@
import java.util.List;
import java.util.Map;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.util.InheritanceSearch;
import org.apache.tapestry.internal.util.InternalUtils;
@@ -29,7 +28,6 @@
* A key component in implementing the "Gang of Four" Strategy pattern. A StrategyRegistry will
* match up a given input type with a registered strategy for that type.
*
- *
* @param <A>
* the type of the strategy adapter
*/
@@ -81,7 +79,7 @@
* @throws IllegalArgumentException
* if no matching adapter may be found
*/
- @SuppressNullCheck
+
public A getByInstance(Object value)
{
return get(value == null ? void.class : value.getClass());
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/java/org/apache/tapestry/util/UtilMessages.java Fri Oct 27 11:00:05 2006
@@ -16,17 +16,17 @@
import org.apache.tapestry.Messages;
import org.apache.tapestry.internal.MessagesImpl;
-import org.apache.tapestry.internal.annotations.Utility;
/**
* Static messages
- *
- *
*/
-@Utility
-final class UtilMessages
+class UtilMessages
{
private static final Messages MESSAGES = MessagesImpl.forClass(UtilMessages.class);
+
+ private UtilMessages()
+ {
+ }
static String parameterWasNull(String parameterName)
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/main/resources/org/apache/tapestry/internal/util/UtilStrings.properties Fri Oct 27 11:00:05 2006
@@ -16,3 +16,4 @@
dependency-cycle=Unable to add '%s' as a dependency of '%s', as that forms a dependency cycle ('%<s' depends on itself via '%1$s'). The dependency has been ignored.
duplicate-orderer=Could not add object with duplicate id '%s'. The duplicate object has been ignored.
constraint-format=Could not parse ordering constraint '%s' (for '%s'). The constraint has been ignored.
+one-shot-lock=Method %s may no longer be invoked.
\ No newline at end of file
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/conf/testng.xml
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/conf/testng.xml?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/conf/testng.xml (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/conf/testng.xml Fri Oct 27 11:00:05 2006
@@ -15,7 +15,7 @@
limitations under the License.
-->
-<suite name="Tapestry" parallel="false" thread-count="10" annotations="1.5" verbose="2">
+<suite name="Tapestry" parallel="true" thread-count="10" annotations="1.5" verbose="2">
<test name="Tapestry Core">
<packages>
<!-- Logically we'd like to do the General (unit) testing first, but practically,
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/BaseLocatableTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/BaseLocatableTest.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/BaseLocatableTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/BaseLocatableTest.java Fri Oct 27 11:00:05 2006
@@ -14,7 +14,6 @@
package org.apache.tapestry;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.test.BaseTestCase;
import org.testng.annotations.Test;
@@ -23,7 +22,7 @@
*/
public class BaseLocatableTest extends BaseTestCase
{
- @SuppressNullCheck
+
static class LocatableFixture extends BaseLocatable
{
LocatableFixture(Location location)
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/AbstractTracer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/AbstractTracer.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/AbstractTracer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/AbstractTracer.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.components;
import org.apache.tapestry.MarkupWriter;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Echo.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Echo.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Echo.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Echo.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.components;
import org.apache.tapestry.MarkupWriter;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Tracer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Tracer.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Tracer.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/components/Tracer.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.components;
import org.apache.tapestry.MarkupWriter;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/Emphasis.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/Emphasis.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/Emphasis.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/Emphasis.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.mixins;
import org.apache.tapestry.MarkupWriter;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/TracerMixin.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/TracerMixin.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/TracerMixin.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/mixins/TracerMixin.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.mixins;
import org.apache.tapestry.MarkupWriter;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/InstanceMixin.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/InstanceMixin.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/InstanceMixin.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/InstanceMixin.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.pages;
import java.sql.Date;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/RenderPhaseOrder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/RenderPhaseOrder.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/RenderPhaseOrder.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/integration/app1/pages/RenderPhaseOrder.java Fri Oct 27 11:00:05 2006
@@ -1,3 +1,17 @@
+// Copyright 2006 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
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
package org.apache.tapestry.integration.app1.pages;
import org.apache.tapestry.annotations.ComponentClass;
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/TargetMessages.java Fri Oct 27 11:00:05 2006
@@ -14,14 +14,9 @@
package org.apache.tapestry.internal;
-import org.apache.tapestry.internal.annotations.Utility;
-
/**
* Used with {@link org.apache.tapestry.internal.MessagesImplTest}.
- *
- *
*/
-@Utility
public class TargetMessages
{
Modified: tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java?view=diff&rev=468481&r1=468480&r2=468481
==============================================================================
--- tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java (original)
+++ tapestry/tapestry5/tapestry-core/trunk/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java Fri Oct 27 11:00:05 2006
@@ -18,7 +18,6 @@
import org.apache.tapestry.ComponentResources;
import org.apache.tapestry.Location;
import org.apache.tapestry.internal.TapestryException;
-import org.apache.tapestry.internal.annotations.SuppressNullCheck;
import org.apache.tapestry.internal.test.InternalBaseTestCase;
import org.apache.tapestry.internal.util.InternalUtils;
import org.apache.tapestry.ioc.StringHolder;
@@ -364,7 +363,6 @@
}
@Test(dataProvider = "values")
- @SuppressNullCheck
public void special_prop_binding_values(String expression, Object expected)
{
Location l = newLocation();