Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/AspectInterceptorBuilderImpl.java
 Wed Jul 14 15:51:30 2010
@@ -1,10 +1,10 @@
-// Copyright 2008, 2009 The Apache Software Foundation
+// Copyright 2008, 2009, 2010 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,12 +14,6 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import org.apache.tapestry5.ioc.MethodAdvice;
-import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Defense;
-import org.apache.tapestry5.ioc.internal.util.OneShotLock;
-import org.apache.tapestry5.ioc.services.*;
-
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
@@ -27,6 +21,16 @@ import java.util.Arrays;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.tapestry5.ioc.MethodAdvice;
+import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.OneShotLock;
+import org.apache.tapestry5.ioc.services.AspectInterceptorBuilder;
+import org.apache.tapestry5.ioc.services.ClassFab;
+import org.apache.tapestry5.ioc.services.ClassFabUtils;
+import org.apache.tapestry5.ioc.services.ClassFactory;
+import org.apache.tapestry5.ioc.services.MethodSignature;
+
+...@suppresswarnings("all")
 public class AspectInterceptorBuilderImpl<T> implements 
AspectInterceptorBuilder<T>
 {
     private final ClassFactory classFactory;
@@ -54,7 +58,7 @@ public class AspectInterceptorBuilderImp
     private boolean sawToString;
 
     public AspectInterceptorBuilderImpl(ClassFactory classFactory, Class<T> 
serviceInterface, T delegate,
-                                        String description)
+            String description)
     {
         this.classFactory = classFactory;
         this.serviceInterface = serviceInterface;
@@ -71,8 +75,8 @@ public class AspectInterceptorBuilderImp
 
     public void adviseMethod(Method method, MethodAdvice advice)
     {
-        Defense.notNull(method, "method");
-        Defense.notNull(advice, "advice");
+        assert method != null;
+        assert advice != null;
 
         lock.check();
 
@@ -81,8 +85,8 @@ public class AspectInterceptorBuilderImp
         if (builder == null)
         {
             if (!remainingMethods.contains(method))
-                throw new IllegalArgumentException(
-                        String.format("Method %s is not defined for interface 
%s.", method, serviceInterface));
+                throw new IllegalArgumentException(String.format("Method %s is 
not defined for interface %s.", method,
+                        serviceInterface));
 
             // One less method to pass thru to the delegate
 

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFabImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFabImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFabImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFabImpl.java
 Wed Jul 14 15:51:30 2010
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010 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,10 +14,22 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import javassist.*;
+import static java.lang.String.format;
 import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newMap;
 import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newSet;
-import org.apache.tapestry5.ioc.internal.util.Defense;
+
+import java.lang.reflect.Modifier;
+import java.util.Formatter;
+import java.util.Map;
+import java.util.Set;
+
+import javassist.CannotCompileException;
+import javassist.CtClass;
+import javassist.CtConstructor;
+import javassist.CtField;
+import javassist.CtMethod;
+import javassist.NotFoundException;
+
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.ClassFab;
 import org.apache.tapestry5.ioc.services.ClassFabUtils;
@@ -25,16 +37,11 @@ import org.apache.tapestry5.ioc.services
 import org.apache.tapestry5.ioc.services.MethodSignature;
 import org.slf4j.Logger;
 
-import static java.lang.String.format;
-import java.lang.reflect.Modifier;
-import java.util.Formatter;
-import java.util.Map;
-import java.util.Set;
-
 /**
  * Implementation of {...@link org.apache.tapestry5.ioc.services.ClassFab}. 
Hides, as much as possible, the underlying
  * library (Javassist).
  */
+...@suppresswarnings("all")
 public class ClassFabImpl extends AbstractFab implements ClassFab
 {
     private static final Map<Class, String> DEFAULT_RETURN = newMap();
@@ -107,7 +114,8 @@ public class ClassFabImpl extends Abstra
 
             for (int i = 0; i < interfaces.length; i++)
             {
-                if (i > 0) buffer.append(", ");
+                if (i > 0)
+                    buffer.append(", ");
 
                 buffer.append(interfaces[i].getName());
             }
@@ -150,12 +158,10 @@ public class ClassFabImpl extends Abstra
             throw new RuntimeException(ServiceMessages.unableToAddField(name, 
getCtClass(), ex), ex);
         }
 
-        formatter.format("%s %s %s;\n\n", Modifier.toString(modifiers), 
ClassFabUtils
-                .toJavaClassName(type), name);
+        formatter.format("%s %s %s;\n\n", Modifier.toString(modifiers), 
ClassFabUtils.toJavaClassName(type), name);
     }
 
-    public void proxyMethodsToDelegate(Class serviceInterface, String 
delegateExpression,
-                                       String toString)
+    public void proxyMethodsToDelegate(Class serviceInterface, String 
delegateExpression, String toString)
     {
         lock.check();
 
@@ -174,7 +180,8 @@ public class ClassFabImpl extends Abstra
             addMethod(Modifier.PUBLIC, sig, body);
         }
 
-        if (!mi.getToString()) addToString(toString);
+        if (!mi.getToString())
+            addToString(toString);
     }
 
     public void addToString(String toString)
@@ -220,8 +227,8 @@ public class ClassFabImpl extends Abstra
 
         // modifiers, return type, name
 
-        formatter.format("%s %s %s", Modifier.toString(modifiers), 
ClassFabUtils
-                .toJavaClassName(ms.getReturnType()), ms.getName());
+        formatter.format("%s %s %s", Modifier.toString(modifiers), 
ClassFabUtils.toJavaClassName(ms.getReturnType()),
+                ms.getName());
 
         // parameters, exceptions and body from this:
         addMethodDetailsToDescription(ms.getParameterTypes(), 
ms.getExceptionTypes(), body);
@@ -245,7 +252,8 @@ public class ClassFabImpl extends Abstra
         if (returnType.isPrimitive())
         {
             value = DEFAULT_RETURN.get(returnType);
-            if (value == null) value = "0";
+            if (value == null)
+                value = "0";
         }
 
         addMethod(Modifier.PUBLIC, signature, "return " + value + ";");
@@ -253,8 +261,7 @@ public class ClassFabImpl extends Abstra
 
     public void addConstructor(Class[] parameterTypes, Class[] exceptions, 
String body)
     {
-        Defense.notBlank(body, "body");
-
+        assert InternalUtils.isNonBlank(body);
         lock.check();
 
         CtClass[] ctParameters = toCtClasses(parameterTypes);
@@ -288,20 +295,23 @@ public class ClassFabImpl extends Abstra
 
     /**
      * Adds a listing of method (or constructor) parameters and thrown 
exceptions, and the body, to the description
-     *
-     * @param parameterTypes types of method parameters, or null
-     * @param exceptions     types of throw exceptions, or null
-     * @param body           body of method or constructor
+     * 
+     * @param parameterTypes
+     *            types of method parameters, or null
+     * @param exceptions
+     *            types of throw exceptions, or null
+     * @param body
+     *            body of method or constructor
      */
-    private void addMethodDetailsToDescription(Class[] parameterTypes, Class[] 
exceptions,
-                                               String body)
+    private void addMethodDetailsToDescription(Class[] parameterTypes, Class[] 
exceptions, String body)
     {
         description.append("(");
 
         int count = InternalUtils.size(parameterTypes);
         for (int i = 0; i < count; i++)
         {
-            if (i > 0) description.append(", ");
+            if (i > 0)
+                description.append(", ");
 
             
description.append(ClassFabUtils.toJavaClassName(parameterTypes[i]));
 

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassFactoryImpl.java
 Wed Jul 14 15:51:30 2010
@@ -14,14 +14,18 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
+import static java.lang.String.format;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+
 import javassist.CtClass;
 import javassist.CtConstructor;
 import javassist.CtMethod;
+
 import org.apache.tapestry5.ioc.Location;
 import org.apache.tapestry5.ioc.ObjectCreator;
-
-import static java.lang.String.format;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notNull;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.ClassFab;
 import org.apache.tapestry5.ioc.services.ClassFabUtils;
@@ -30,13 +34,10 @@ import org.apache.tapestry5.ioc.services
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-
 /**
  * Implementation of {...@link org.apache.tapestry5.ioc.services.ClassFactory}.
  */
+...@suppresswarnings("all")
 public class ClassFactoryImpl implements ClassFactory
 {
     private final Logger logger;
@@ -133,7 +134,7 @@ public class ClassFactoryImpl implements
 
     public Location getMethodLocation(Method method)
     {
-        notNull(method, "method");
+        assert method != null;
 
         // TODO: Is it worth caching this? Probably not as it usually is only
         // invoked perhaps at startup and in the event of errors.
@@ -173,7 +174,7 @@ public class ClassFactoryImpl implements
 
     public Location getConstructorLocation(Constructor constructor)
     {
-        notNull(constructor, "constructor");
+        assert constructor != null;
 
         StringBuilder builder = new StringBuilder();
 

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ParallelExecutorImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ParallelExecutorImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ParallelExecutorImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ParallelExecutorImpl.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 2010 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.
@@ -14,17 +14,16 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
 import org.apache.tapestry5.ioc.Invokable;
 import org.apache.tapestry5.ioc.ObjectCreator;
-import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.ioc.services.ParallelExecutor;
 import org.apache.tapestry5.ioc.services.PerthreadManager;
 import org.apache.tapestry5.ioc.services.ThunkCreator;
 
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-
 public class ParallelExecutorImpl implements ParallelExecutor
 {
     private final ThunkCreator thunkCreator;
@@ -43,7 +42,7 @@ public class ParallelExecutorImpl implem
 
     public <T> Future<T> invoke(Invokable<T> invocable)
     {
-        Defense.notNull(invocable, "invocable");
+        assert invocable != null;
 
         return executorService.submit(toCallable(invocable));
     }

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThreadLocaleImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThreadLocaleImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThreadLocaleImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThreadLocaleImpl.java
 Wed Jul 14 15:51:30 2010
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010 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,13 +14,12 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
+import java.util.Locale;
+
 import org.apache.tapestry5.ioc.ScopeConstants;
 import org.apache.tapestry5.ioc.annotations.Scope;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notNull;
 import org.apache.tapestry5.ioc.services.ThreadLocale;
 
-import java.util.Locale;
-
 @Scope(ScopeConstants.PERTHREAD)
 public class ThreadLocaleImpl implements ThreadLocale
 {
@@ -33,7 +32,7 @@ public class ThreadLocaleImpl implements
 
     public void setLocale(Locale locale)
     {
-        notNull(locale, "locale");
+        assert locale != null;
 
         this.locale = locale;
     }

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThunkCreatorImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThunkCreatorImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThunkCreatorImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ThunkCreatorImpl.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2009 The Apache Software Foundation
+// Copyright 2009, 2010 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.
@@ -14,16 +14,22 @@
 
 package org.apache.tapestry5.ioc.internal.services;
 
-import org.apache.tapestry5.ioc.ObjectCreator;
-import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Defense;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-import org.apache.tapestry5.ioc.services.*;
-
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Modifier;
 import java.util.Map;
 
+import org.apache.tapestry5.ioc.ObjectCreator;
+import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
+import org.apache.tapestry5.ioc.services.Builtin;
+import org.apache.tapestry5.ioc.services.ClassFab;
+import org.apache.tapestry5.ioc.services.ClassFabUtils;
+import org.apache.tapestry5.ioc.services.ClassFactory;
+import org.apache.tapestry5.ioc.services.MethodIterator;
+import org.apache.tapestry5.ioc.services.MethodSignature;
+import org.apache.tapestry5.ioc.services.ThunkCreator;
+
+...@suppresswarnings("all")
 public class ThunkCreatorImpl implements ThunkCreator
 {
     /**
@@ -48,10 +54,9 @@ public class ThunkCreatorImpl implements
 
     public <T> T createThunk(Class<T> proxyType, ObjectCreator objectCreator, 
String description)
     {
-        Defense.notNull(proxyType, "proxyType");
-        Defense.notNull(objectCreator, "objectCreator");
-        Defense.notBlank(description, "description");
-
+        assert proxyType != null;
+        assert objectCreator != null;
+        assert InternalUtils.isNonBlank(description);
         if (!proxyType.isInterface())
             throw new IllegalArgumentException(
                     String.format("Thunks may only be created for interfaces; 
%s is a class.",

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/TypeCoercerImpl.java
 Wed Jul 14 15:51:30 2010
@@ -22,7 +22,6 @@ import java.util.Set;
 import java.util.WeakHashMap;
 
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.ioc.internal.util.InheritanceSearch;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.apache.tapestry5.ioc.services.ClassFabUtils;
@@ -32,6 +31,7 @@ import org.apache.tapestry5.ioc.services
 import org.apache.tapestry5.ioc.util.AvailableValues;
 import org.apache.tapestry5.ioc.util.UnknownValueException;
 
+...@suppresswarnings("all")
 public class TypeCoercerImpl implements TypeCoercer
 {
     // Constructed from the service's configuration.
@@ -135,8 +135,7 @@ public class TypeCoercerImpl implements 
     @SuppressWarnings("unchecked")
     public Object coerce(Object input, Class targetType)
     {
-        Defense.notNull(targetType, "targetType");
-
+        assert targetType != null;
         Class effectiveTargetType = ClassFabUtils.getWrapperType(targetType);
 
         if (effectiveTargetType.isInstance(input))
@@ -148,9 +147,8 @@ public class TypeCoercerImpl implements 
     @SuppressWarnings("unchecked")
     public <S, T> Coercion<S, T> getCoercion(Class<S> sourceType, Class<T> 
targetType)
     {
-        Defense.notNull(sourceType, "sourceType");
-        Defense.notNull(targetType, "targetType");
-
+        assert sourceType != null;
+        assert targetType != null;
         Class effectiveSourceType = ClassFabUtils.getWrapperType(sourceType);
         Class effectiveTargetType = ClassFabUtils.getWrapperType(targetType);
 
@@ -163,9 +161,8 @@ public class TypeCoercerImpl implements 
     @SuppressWarnings("unchecked")
     public <S, T> String explain(Class<S> sourceType, Class<T> targetType)
     {
-        Defense.notNull(sourceType, "effectiveInputType");
-        Defense.notNull(targetType, "targetType");
-
+        assert sourceType != null;
+        assert targetType != null;
         Class effectiveTargetType = ClassFabUtils.getWrapperType(targetType);
         Class effectiveSourceType = ClassFabUtils.getWrapperType(sourceType);
 

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/UpdateListenerHubImpl.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/UpdateListenerHubImpl.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/UpdateListenerHubImpl.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/UpdateListenerHubImpl.java
 Wed Jul 14 15:51:30 2010
@@ -20,7 +20,6 @@ import java.util.List;
 
 import org.apache.tapestry5.ioc.annotations.PreventServiceDecoration;
 import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.services.UpdateListener;
 import org.apache.tapestry5.services.UpdateListenerHub;
 
@@ -31,8 +30,7 @@ public class UpdateListenerHubImpl imple
 
     public void addUpdateListener(UpdateListener listener)
     {
-        Defense.notNull(listener, "listener");
-
+        assert listener != null;
         listeners.add(new WeakReference<UpdateListener>(listener));
     }
 

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/AbstractResource.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/AbstractResource.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/AbstractResource.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/AbstractResource.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2006, 2008 The Apache Software Foundation
+// Copyright 2006, 2008, 2010 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.
@@ -14,16 +14,14 @@
 
 package org.apache.tapestry5.ioc.internal.util;
 
-import org.apache.tapestry5.ioc.Resource;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notBlank;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notNull;
-
 import java.io.BufferedInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.util.Locale;
 
+import org.apache.tapestry5.ioc.Resource;
+
 /**
  * Abstract implementation of {...@link Resource}. Subclasses must implement 
the abstract methods {...@link Resource#toURL()}
  * and {...@link #newResource(String)} as well as toString(), hashCode() and 
equals().
@@ -34,7 +32,8 @@ public abstract class AbstractResource i
 
     protected AbstractResource(String path)
     {
-        this.path = notNull(path, "path");
+        assert path != null;
+        this.path = path;
     }
 
     public final String getPath()
@@ -58,8 +57,7 @@ public abstract class AbstractResource i
 
     public final Resource forFile(String relativePath)
     {
-        Defense.notNull(relativePath, "relativePath");
-
+        assert relativePath != null;
         StringBuilder builder = new StringBuilder(getFolder());
 
         for (String term : relativePath.split("/"))
@@ -109,8 +107,7 @@ public abstract class AbstractResource i
 
     public final Resource withExtension(String extension)
     {
-        notBlank(extension, "extension");
-
+        assert InternalUtils.isNonBlank(extension);
         int dotx = path.lastIndexOf('.');
 
         if (dotx < 0) return createResource(path + "." + extension);

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ClasspathResource.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ClasspathResource.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ClasspathResource.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/ClasspathResource.java
 Wed Jul 14 15:51:30 2010
@@ -14,11 +14,10 @@
 
 package org.apache.tapestry5.ioc.internal.util;
 
-import org.apache.tapestry5.ioc.Resource;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notNull;
-
 import java.net.URL;
 
+import org.apache.tapestry5.ioc.Resource;
+
 /**
  * Implementation of {...@link Resource} for files on the classpath (as 
defined by a {...@link ClassLoader}).
  */
@@ -40,8 +39,7 @@ public final class ClasspathResource ext
     public ClasspathResource(ClassLoader classLoader, String path)
     {
         super(path);
-
-        notNull(classLoader, "classLoader");
+        assert classLoader != null;
 
         this.classLoader = classLoader;
     }

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java
 Wed Jul 14 15:51:30 2010
@@ -15,7 +15,6 @@
 package org.apache.tapestry5.ioc.internal.util;
 
 import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newList;
-import static org.apache.tapestry5.ioc.internal.util.Defense.notBlank;
 
 import java.io.Closeable;
 import java.io.IOException;
@@ -29,37 +28,13 @@ import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Type;
 import java.net.URL;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 import org.apache.tapestry5.func.Mapper;
 import org.apache.tapestry5.func.Predicate;
-import org.apache.tapestry5.ioc.AdvisorDef;
-import org.apache.tapestry5.ioc.AnnotationProvider;
-import org.apache.tapestry5.ioc.Configuration;
-import org.apache.tapestry5.ioc.Invokable;
-import org.apache.tapestry5.ioc.Locatable;
-import org.apache.tapestry5.ioc.Location;
-import org.apache.tapestry5.ioc.MappedConfiguration;
-import org.apache.tapestry5.ioc.ModuleBuilderSource;
-import org.apache.tapestry5.ioc.ObjectCreator;
-import org.apache.tapestry5.ioc.ObjectLocator;
-import org.apache.tapestry5.ioc.OperationTracker;
-import org.apache.tapestry5.ioc.OrderedConfiguration;
-import org.apache.tapestry5.ioc.ServiceBuilderResources;
-import org.apache.tapestry5.ioc.ServiceLifecycle;
-import org.apache.tapestry5.ioc.ServiceLifecycle2;
-import org.apache.tapestry5.ioc.ServiceResources;
+import org.apache.tapestry5.ioc.*;
 import org.apache.tapestry5.ioc.annotations.Inject;
 import org.apache.tapestry5.ioc.annotations.InjectResource;
 import org.apache.tapestry5.ioc.annotations.InjectService;
@@ -77,11 +52,9 @@ import org.apache.tapestry5.ioc.services
 import org.apache.tapestry5.ioc.services.Coercion;
 
 /**
- * Utilities used within various internal implemenations of Tapestry IOC and 
the rest of the tapestry-core framework.
+ * Utilities used within various internal implementations of Tapestry IOC and 
the rest of the tapestry-core framework.
  */
-
-...@suppresswarnings(
-{ "JavaDoc", "unchecked" })
+...@suppresswarnings("all")
 public class InternalUtils
 {
     /**
@@ -161,8 +134,7 @@ public class InternalUtils
      */
     public static String stripMemberName(String memberName)
     {
-        Defense.notBlank(memberName, "memberName");
-
+        assert InternalUtils.isNonBlank(memberName);
         Matcher matcher = NAME_PATTERN.matcher(memberName);
 
         if (!matcher.matches())
@@ -271,8 +243,8 @@ public class InternalUtils
             InjectionResources resources, OperationTracker tracker)
     {
 
-        return calculateParameters(locator, resources, 
constructor.getParameterTypes(), constructor
-                .getGenericParameterTypes(), 
constructor.getParameterAnnotations(), tracker);
+        return calculateParameters(locator, resources, 
constructor.getParameterTypes(),
+                constructor.getGenericParameterTypes(), 
constructor.getParameterAnnotations(), tracker);
     }
 
     public static Object[] calculateParameters(final ObjectLocator locator, 
final InjectionResources resources,
@@ -670,8 +642,7 @@ public class InternalUtils
      */
     public static String lastTerm(String input)
     {
-        notBlank(input, "input");
-
+        assert InternalUtils.isNonBlank(input);
         int dotx = input.lastIndexOf('.');
 
         if (dotx < 0)
@@ -820,11 +791,10 @@ public class InternalUtils
 
         if (!Modifier.isPublic(constructor.getModifiers()))
             throw new IllegalArgumentException(
-                    String
-                            .format(
-                                    "Constructor %s is not public and may not 
be used for autobuilding an instance of the class. "
-                                            + "You should make the constructor 
public, or mark an alternate public constructor with the @Inject annotation.",
-                                    constructor));
+                    String.format(
+                            "Constructor %s is not public and may not be used 
for autobuilding an instance of the class. "
+                                    + "You should make the constructor public, 
or mark an alternate public constructor with the @Inject annotation.",
+                            constructor));
     }
 
     public static ServiceDef2 toServiceDef2(final ServiceDef sd)
@@ -949,7 +919,7 @@ public class InternalUtils
     public static <T extends Comparable<T>> List<T> matchAndSort(Collection<? 
extends T> collection,
             Predicate<T> predicate)
     {
-        Defense.notNull(predicate, "predicate");
+        assert predicate != null;
 
         List<T> result = CollectionFactory.newList();
 
@@ -1034,13 +1004,18 @@ public class InternalUtils
         return classFileURL != null && 
classFileURL.getProtocol().equals("file");
     }
 
+    /**
+     * Wraps a {...@lihk Coercion} as a {...@link Mapper}.
+     * 
+     * @since 5.2.0
+     */
     public static <S, T> Mapper<S, T> toMapper(final Coercion<S, T> coercion)
     {
-        Defense.notNull(coercion, "coercion");
-    
+        assert coercion != null;
+
         return new Mapper<S, T>()
         {
-    
+
             public T map(S value)
             {
                 return coercion.coerce(value);

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/UtilMessages.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2006, 2008 The Apache Software Foundation
+// Copyright 2006, 2008, 2010 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.
@@ -45,21 +45,6 @@ class UtilMessages
         return MESSAGES.format("one-shot-lock", element);
     }
 
-    static String parameterWasNull(String parameterName)
-    {
-        return MESSAGES.format("parameter-was-null", parameterName);
-    }
-
-    static String parameterWasBlank(String parameterName)
-    {
-        return MESSAGES.format("parameter-was-blank", parameterName);
-    }
-
-    static String badCast(String parameterName, Object parameterValue, Class 
type)
-    {
-        return MESSAGES.format("bad-cast", parameterName, parameterValue, 
type.getName());
-    }
-
     static String badMarkerAnnotation(Class annotationClass)
     {
         return MESSAGES.format("bad-marker-annotation", 
annotationClass.getName());

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFabUtils.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFabUtils.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFabUtils.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/ClassFabUtils.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010 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.
@@ -14,12 +14,8 @@
 
 package org.apache.tapestry5.ioc.services;
 
-import org.apache.tapestry5.ioc.ObjectCreator;
-import org.apache.tapestry5.ioc.internal.util.Defense;
-
-import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newMap;
-
 import static java.lang.String.format;
+import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newMap;
 
 import java.io.File;
 import java.lang.reflect.Method;
@@ -29,9 +25,12 @@ import java.net.URL;
 import java.util.Map;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.tapestry5.ioc.ObjectCreator;
+
 /**
  * Handy method useful when creating new classes using {...@link 
org.apache.tapestry5.ioc.services.ClassFab}.
  */
+...@suppresswarnings("all")
 public final class ClassFabUtils
 {
     private static final AtomicLong UID_GENERATOR = new 
AtomicLong(System.currentTimeMillis());
@@ -307,7 +306,7 @@ public final class ClassFabUtils
      */
     public static String getPathForClass(Class clazz)
     {
-        Defense.notNull(clazz, "clazz");
+        assert clazz != null;
 
         return getPathForClassNamed(clazz.getName());
     }
@@ -329,7 +328,7 @@ public final class ClassFabUtils
      */
     public static File toFileFromFileProtocolURL(URL url)
     {
-        Defense.notNull(url, "url");
+        assert url != null;
 
         if (!url.getProtocol().equals("file"))
             throw new IllegalArgumentException(String.format("URL %s does not 
use the 'file' protocol.", url));

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/CoercionTuple.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/CoercionTuple.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/CoercionTuple.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/CoercionTuple.java
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010 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.
@@ -14,7 +14,6 @@
 
 package org.apache.tapestry5.ioc.services;
 
-import static org.apache.tapestry5.ioc.internal.util.Defense.notNull;
 
 /**
  * An immutable object that represents a mapping from one type to another. 
This is also the contribution type when
@@ -110,10 +109,9 @@ public final class CoercionTuple<S, T>
      */
     public CoercionTuple(Class<S> sourceType, Class<T> targetType, Coercion<S, 
T> coercion, boolean wrap)
     {
-        notNull(sourceType, "sourceType");
-        notNull(targetType, "targetType");
-        notNull(coercion, "coercion");
-
+        assert sourceType != null;
+        assert targetType != null;
+        assert coercion != null;
         this.sourceType = sourceType;
         this.targetType = targetType;
         this.coercion = wrap ? new CoercionWrapper<S, T>(coercion) : coercion;

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
 Wed Jul 14 15:51:30 2010
@@ -1,10 +1,10 @@
-// Copyright 2006, 2007, 2008 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010 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,12 +14,11 @@
 
 package org.apache.tapestry5.ioc.services;
 
-import org.apache.tapestry5.ioc.internal.util.Defense;
-import org.apache.tapestry5.ioc.internal.util.InternalUtils;
-
 import java.lang.reflect.Method;
 import java.util.Arrays;
 
+import org.apache.tapestry5.ioc.internal.util.InternalUtils;
+
 /**
  * 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 
don't compare well with other otherwise
@@ -29,9 +28,10 @@ import java.util.Arrays;
  * bother to actually track the modifiers. In addition, at this time, 
MethodSignature <em>does not distinguish between
  * instance and static methods</em>.
  * <p/>
- * This version of MethodSignature works with <em>loaded</em> classes, and it 
usually used in the context of {...@link
- * org.apache.tapestry5.ioc.services.ClassFab} to create new classes and 
subclasses.
+ * This version of MethodSignature works with <em>loaded</em> classes, and it 
usually used in the context of
+ * {...@link org.apache.tapestry5.ioc.services.ClassFab} to create new classes 
and subclasses.
  */
+...@suppresswarnings("all")
 public class MethodSignature
 {
     private int hashCode = -1;
@@ -46,8 +46,10 @@ public class MethodSignature
 
     public MethodSignature(Class returnType, String name, Class[] 
parameterTypes, Class[] exceptionTypes)
     {
-        this.returnType = Defense.notNull(returnType, "returnType");
-        this.name = Defense.notBlank(name, "name");
+        assert returnType != null;
+        this.returnType = returnType;
+        assert InternalUtils.isNonBlank(name);
+        this.name = name;
 
         // Can be null!
         this.parameterTypes = parameterTypes;
@@ -112,21 +114,25 @@ public class MethodSignature
     /**
      * Returns true if the other object is an instance of MethodSignature with 
<em>identical</em> values for return
      * type, name, parameter types and exception types.
-     *
+     * 
      * @see #isOverridingSignatureOf(MethodSignature)
      */
     @Override
     public boolean equals(Object o)
     {
-        if (o == null || !(o instanceof MethodSignature)) return false;
+        if (o == null || !(o instanceof MethodSignature))
+            return false;
 
         MethodSignature ms = (MethodSignature) o;
 
-        if (returnType != ms.returnType) return false;
+        if (returnType != ms.returnType)
+            return false;
 
-        if (!name.equals(ms.name)) return false;
+        if (!name.equals(ms.name))
+            return false;
 
-        if (mismatch(parameterTypes, ms.parameterTypes)) return false;
+        if (mismatch(parameterTypes, ms.parameterTypes))
+            return false;
 
         return !mismatch(exceptionTypes, ms.exceptionTypes);
     }
@@ -136,14 +142,16 @@ public class MethodSignature
         int a1Count = InternalUtils.size(a1);
         int a2Count = InternalUtils.size(a2);
 
-        if (a1Count != a2Count) return true;
+        if (a1Count != a2Count)
+            return true;
 
         // Hm. What if order is important (for exceptions)? We're really 
saying here that they
         // were derived from the name Method.
 
         for (int i = 0; i < a1Count; i++)
         {
-            if (a1[i] != a2[i]) return true;
+            if (a1[i] != a2[i])
+                return true;
         }
 
         return false;
@@ -161,7 +169,8 @@ public class MethodSignature
 
         for (int i = 0; i < InternalUtils.size(parameterTypes); i++)
         {
-            if (i > 0) buffer.append(", ");
+            if (i > 0)
+                buffer.append(", ");
 
             buffer.append(ClassFabUtils.toJavaClassName(parameterTypes[i]));
         }
@@ -179,8 +188,10 @@ public class MethodSignature
 
         for (int i = 0; i < _exceptionCount; i++)
         {
-            if (i == 0) buffer.append(" throws ");
-            else buffer.append(", ");
+            if (i == 0)
+                buffer.append(" throws ");
+            else
+                buffer.append(", ");
 
             buffer.append(_exceptionNames[i]);
         }
@@ -189,11 +200,11 @@ public class MethodSignature
     }
 
     /**
-     * Returns a string consisting of the name of the method and its parameter 
types. This is similar to {...@link
-     * #toString()}, but omits the return type and information about thrown 
exceptions. A unique id is used by {...@link
-     * MethodIterator} to identify overlapping methods (methods with the same 
name and parameter types but with
+     * Returns a string consisting of the name of the method and its parameter 
types. This is similar to
+     * {...@link #toString()}, but omits the return type and information about 
thrown exceptions. A unique id is used by
+     * {...@link MethodIterator} to identify overlapping methods (methods with 
the same name and parameter types but with
      * different thrown exceptions).
-     *
+     * 
      * @see #isOverridingSignatureOf(MethodSignature)
      */
     public String getUniqueId()
@@ -203,7 +214,8 @@ public class MethodSignature
 
         for (int i = 0; i < InternalUtils.size(parameterTypes); i++)
         {
-            if (i > 0) buffer.append(",");
+            if (i > 0)
+                buffer.append(",");
 
             buffer.append(ClassFabUtils.toJavaClassName(parameterTypes[i]));
         }
@@ -221,11 +233,14 @@ public class MethodSignature
 
     public boolean isOverridingSignatureOf(MethodSignature ms)
     {
-        if (returnType != ms.returnType) return false;
+        if (returnType != ms.returnType)
+            return false;
 
-        if (!name.equals(ms.name)) return false;
+        if (!name.equals(ms.name))
+            return false;
 
-        if (mismatch(parameterTypes, ms.parameterTypes)) return false;
+        if (mismatch(parameterTypes, ms.parameterTypes))
+            return false;
 
         return exceptionsEncompass(ms.exceptionTypes);
     }
@@ -243,7 +258,8 @@ public class MethodSignature
         // If we have no exceptions, then ours encompass theirs only if they
         // have no exceptions, either.
 
-        if (ourCount == 0) return otherCount == 0;
+        if (ourCount == 0)
+            return otherCount == 0;
 
         boolean[] matched = new boolean[otherCount];
         int unmatched = otherCount;
@@ -254,7 +270,8 @@ public class MethodSignature
             {
                 // Ignore exceptions that have already been matched
 
-                if (matched[j]) continue;
+                if (matched[j])
+                    continue;
 
                 // When one of our exceptions is a super-class of one of their 
exceptions,
                 // then their exceptions is matched.

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/test/TestUtils.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/test/TestUtils.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/test/TestUtils.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/test/TestUtils.java
 Wed Jul 14 15:51:30 2010
@@ -19,7 +19,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.tapestry5.ioc.internal.util.Defense;
 import org.apache.tapestry5.ioc.internal.util.InternalUtils;
 import org.testng.Assert;
 
@@ -183,8 +182,7 @@ public class TestUtils extends Assert
      */
     public static <T> T set(T object, Object... fieldValues)
     {
-        Defense.notNull(object, "object");
-
+        assert object != null;
         Class objectClass = object.getClass();
 
         for (int i = 0; i < fieldValues.length; i += 2)
@@ -222,9 +220,8 @@ public class TestUtils extends Assert
      */
     public static Object get(Object object, String fieldName)
     {
-        Defense.notNull(object, "object");
-        Defense.notBlank(fieldName, "fieldName");
-
+        assert object != null;
+        assert InternalUtils.isNonBlank(fieldName);
         try
         {
             Field field = findField(object.getClass(), fieldName);

Modified: 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/util/UtilStrings.properties
 Wed Jul 14 15:51:30 2010
@@ -1,4 +1,4 @@
-# Copyright 2006, 2008 The Apache Software Foundation
+# Copyright 2006, 2008, 2010 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.
@@ -16,8 +16,5 @@ dependency-cycle=Unable to add '%s' as a
 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.
-parameter-was-null=Parameter %s was null.
-parameter-was-blank=Parameter %s was null or contained only whitespace.
-bad-cast=Parameter %s (%s) is not assignable to type %s.
 bad-marker-annotation=Marker annotation class %s is not valid because it is 
not visible at runtime. Add a @Retention(RetentionPolicy.RUNTIME) to the class.
 inject-resource-failure=Unable to determine resource value to inject into 
field '%s' (of type %s).

Modified: 
tapestry/tapestry5/trunk/tapestry-jmx/src/test/java/org/example/testapp/services/AppModule.java
URL: 
http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-jmx/src/test/java/org/example/testapp/services/AppModule.java?rev=964086&r1=964085&r2=964086&view=diff
==============================================================================
--- 
tapestry/tapestry5/trunk/tapestry-jmx/src/test/java/org/example/testapp/services/AppModule.java
 (original)
+++ 
tapestry/tapestry5/trunk/tapestry-jmx/src/test/java/org/example/testapp/services/AppModule.java
 Wed Jul 14 15:51:30 2010
@@ -25,5 +25,6 @@ public class AppModule
     public static void 
contributeApplicationDefaults(MappedConfiguration<String, String> configuration)
     {
         configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
+        configuration.add(SymbolConstants.PAGE_POOL_ENABLED, "true");
     }
 }
\ No newline at end of file


Reply via email to