You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2012/01/26 01:51:03 UTC
svn commit: r1236001 - in /tapestry/tapestry5/trunk/tapestry-ioc/src:
main/java/org/apache/tapestry5/ioc/internal/services/
main/java/org/apache/tapestry5/ioc/services/
main/resources/org/apache/tapestry5/ioc/internal/services/
test/java/org/apache/tap...
Author: hlship
Date: Thu Jan 26 00:51:02 2012
New Revision: 1236001
URL: http://svn.apache.org/viewvc?rev=1236001&view=rev
Log:
Refactor some deprecated classes out of public folders
Added:
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodIterator.java
- copied, changed from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodIterator.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodSignature.java
- copied, changed from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodIteratorTest.java
- copied, changed from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodIteratorTest.java
tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodSignatureTest.java
- copied, changed from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodSignatureTest.java
Removed:
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodIterator.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java
tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodIteratorTest.java
tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodSignatureTest.java
Modified:
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/BridgeBuilder.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzer.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/DefaultImplementationBuilder.java
tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties
tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzerTest.java
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/BridgeBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/BridgeBuilder.java?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/BridgeBuilder.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/BridgeBuilder.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2011 The Apache Software Foundation
+// Copyright 2006, 2007, 2011, 2012 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.
@@ -18,8 +18,6 @@ import java.util.Iterator;
import java.util.List;
import org.apache.tapestry5.ioc.internal.util.CollectionFactory;
-import org.apache.tapestry5.ioc.services.MethodIterator;
-import org.apache.tapestry5.ioc.services.MethodSignature;
import org.apache.tapestry5.ioc.services.PlasticProxyFactory;
import org.apache.tapestry5.plastic.ClassInstantiator;
import org.apache.tapestry5.plastic.InstructionBuilder;
@@ -62,11 +60,9 @@ class BridgeBuilder<S, F>
/**
* Instantiates a bridge object.
- *
- * @param nextBridge
- * the next Bridge object in the pipeline, or the terminator service
- * @param filter
- * the filter object for this step of the pipeline
+ *
+ * @param nextBridge the next Bridge object in the pipeline, or the terminator service
+ * @param filter the filter object for this step of the pipeline
*/
public S instantiateBridge(S nextBridge, F filter)
{
@@ -132,7 +128,7 @@ class BridgeBuilder<S, F>
{
MethodSignature ms = (MethodSignature) i.next();
- logger.error(ServiceMessages.extraFilterMethod(ms, filterInterface, serviceInterface));
+ logger.error(String.format("Method %s of filter interface %s does not have a matching method in %s.", ms, filterInterface.getName(), serviceInterface.getName()));
}
}
@@ -144,7 +140,7 @@ class BridgeBuilder<S, F>
* the two methods call each other are added.
*/
private void addBridgeMethod(PlasticClass plasticClass, PlasticField filterField, PlasticField nextField,
- final MethodSignature ms, List filterMethods)
+ final MethodSignature ms, List filterMethods)
{
PlasticMethod method = plasticClass.introduceMethod(ms.getMethod());
@@ -168,7 +164,7 @@ class BridgeBuilder<S, F>
{
public void doBuild(InstructionBuilder builder)
{
- String message = ServiceMessages.unmatchedServiceMethod(ms, filterInterface);
+ String message = String.format("Method %s has no match in filter interface %s.", ms, filterInterface.getName());
logger.error(message);
@@ -178,7 +174,7 @@ class BridgeBuilder<S, F>
}
private void bridgeServiceMethodToFilterMethod(PlasticMethod method, final PlasticField filterField,
- final PlasticField nextField, final int position, MethodSignature ms, final MethodSignature fms)
+ final PlasticField nextField, final int position, MethodSignature ms, final MethodSignature fms)
{
method.changeImplementation(new InstructionBuilderCallback()
{
@@ -193,8 +189,7 @@ class BridgeBuilder<S, F>
if (i == position)
{
builder.loadThis().getField(nextField);
- }
- else
+ } else
{
builder.loadArgument(argumentIndex++);
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzer.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzer.java?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzer.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzer.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007 The Apache Software Foundation
+// Copyright 2006, 2007, 2012 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,13 +14,11 @@
package org.apache.tapestry5.ioc.internal.services;
-import org.apache.tapestry5.ioc.services.MethodSignature;
-
/**
* Used by {@link org.apache.tapestry5.ioc.internal.services.PipelineBuilderImpl} to analyze service interface methods
* against filter interface methods to find the position of the extra service parameter (in the filter method).
*/
-public class FilterMethodAnalyzer
+class FilterMethodAnalyzer
{
private final Class serviceInterface;
Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodIterator.java (from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodIterator.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodIterator.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodIterator.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodIterator.java&r1=1236000&r2=1236001&rev=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodIterator.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodIterator.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2004, 2005, 2006, 2011 The Apache Software Foundation
+// Copyright 2004, 2005, 2006, 2011, 2012 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.
@@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry5.ioc.services;
+package org.apache.tapestry5.ioc.internal.services;
+
+import org.apache.tapestry5.ioc.internal.services.MethodSignature;
import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newList;
import static org.apache.tapestry5.ioc.internal.util.CollectionFactory.newMap;
@@ -25,10 +27,9 @@ import java.util.*;
* some complications that can occur when a class inherits the same method from multiple interfaces and with slightly
* different signatures (due to the fact that declared thrown exceptions can vary slightly for the "same" method).
*
- * @see org.apache.tapestry5.ioc.services.MethodSignature#isOverridingSignatureOf(MethodSignature)
- * @deprecated In 5.3, to be removed in a later release
+ * @see MethodSignature#isOverridingSignatureOf(MethodSignature)
*/
-public class MethodIterator
+class MethodIterator
{
private boolean toString;
Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodSignature.java (from r1236000, 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/internal/services/MethodSignature.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MethodSignature.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MethodSignature.java&r1=1236000&r2=1236001&rev=1236001&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/internal/services/MethodSignature.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2008, 2010, 2011 The Apache Software Foundation
+// Copyright 2006, 2007, 2008, 2010, 2011, 2012 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.
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry5.ioc.services;
+package org.apache.tapestry5.ioc.internal.services;
import java.lang.reflect.Method;
import java.util.Arrays;
@@ -28,14 +28,9 @@ import org.apache.tapestry5.plastic.Plas
* Because the intended purpose is to compare methods from interfaces (which are always public and abstract) we don't
* 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.
- *
- * @deprecated In 5.3, to be removed in a later release
*/
@SuppressWarnings("all")
-public class MethodSignature
+class MethodSignature
{
private int hashCode = -1;
@@ -87,7 +82,7 @@ public class MethodSignature
/**
* If this signature was created from a method, return that method.
- *
+ *
* @since 5.3
*/
public Method getMethod()
@@ -135,7 +130,7 @@ 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
@@ -223,9 +218,9 @@ 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
+ * {@link org.apache.tapestry5.ioc.internal.util.MethodIterator} to identify overlapping methods (methods with the same name and parameter types but with
* different thrown exceptions).
- *
+ *
* @see #isOverridingSignatureOf(MethodSignature)
*/
public String getUniqueId()
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ServiceMessages.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006, 2007, 2011 The Apache Software Foundation
+// Copyright 2006, 2007, 2011, 2012 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.
@@ -17,7 +17,6 @@ package org.apache.tapestry5.ioc.interna
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.internal.util.MessagesImpl;
import org.apache.tapestry5.ioc.services.Coercion;
-import org.apache.tapestry5.ioc.services.MethodSignature;
import org.apache.tapestry5.ioc.services.ThreadCleanupListener;
import org.apache.tapestry5.plastic.PlasticUtils;
@@ -60,22 +59,12 @@ public class ServiceMessages
}
public static String propertyTypeMismatch(String propertyName, Class sourceClass, Class propertyType,
- Class expectedType)
+ Class expectedType)
{
return MESSAGES.format("property-type-mismatch", propertyName, sourceClass.getName(), propertyType.getName(),
expectedType.getName());
}
- public static String extraFilterMethod(MethodSignature sig, Class filterInterface, Class serviceInterface)
- {
- return MESSAGES.format("extra-filter-method", sig, filterInterface.getName(), serviceInterface.getName());
- }
-
- public static String unmatchedServiceMethod(MethodSignature sig, Class filterInterface)
- {
- return MESSAGES.format("unmatched-service-method", sig, filterInterface.getName());
- }
-
public static String shutdownListenerError(Object listener, Throwable cause)
{
return MESSAGES.format("shutdown-listener-error", listener, cause);
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/DefaultImplementationBuilder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/DefaultImplementationBuilder.java?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/DefaultImplementationBuilder.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/DefaultImplementationBuilder.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006, 2011 The Apache Software Foundation
+// Copyright 2006, 2011, 2012 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.
@@ -15,9 +15,8 @@
package org.apache.tapestry5.ioc.services;
/**
- * Creates default implementatons of a class.
+ * Creates default implementations of a class.
*
- * @see org.apache.tapestry5.ioc.services.ClassFab#addNoOpMethod(MethodSignature)
*/
public interface DefaultImplementationBuilder
{
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/main/resources/org/apache/tapestry5/ioc/internal/services/ServiceStrings.properties Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-# Copyright 2006, 2007, 2008, 2011 The Apache Software Foundation
+# Copyright 2006, 2007, 2008, 2011, 2012 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.
@@ -19,8 +19,6 @@ write-not-supported=Class %s does not pr
read-failure=Error reading property '%s' of %s: %s
write-failure=Error updating property '%s' of %s: %s
property-type-mismatch=Property '%s' of class %s is of type %s, which is not assignable to type %s.
-extra-filter-method=Method %s of filter interface %s does not have a matching method in %s.
-unmatched-service-method=Method %s has no match in filter interface %s.
shutdown-listener-error=Error notifying %s of registry shutdown: %s
recursive-symbol=Symbol '%s' is defined in terms of itself (%s).
symbol-undefined=Symbol '%s' is not defined.
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzerTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzerTest.java?rev=1236001&r1=1236000&r2=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzerTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/FilterMethodAnalyzerTest.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006 The Apache Software Foundation
+// Copyright 2006, 2012 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.
@@ -15,7 +15,6 @@
package org.apache.tapestry5.ioc.internal.services;
import org.apache.tapestry5.ioc.internal.IOCInternalTestCase;
-import org.apache.tapestry5.ioc.services.MethodSignature;
import org.testng.annotations.Test;
import java.lang.reflect.Method;
Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodIteratorTest.java (from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodIteratorTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodIteratorTest.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodIteratorTest.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodIteratorTest.java&r1=1236000&r2=1236001&rev=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodIteratorTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodIteratorTest.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006 The Apache Software Foundation
+// Copyright 2006, 2012 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.
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry5.ioc.services;
+package org.apache.tapestry5.ioc.internal.services;
import org.apache.tapestry5.ioc.test.IOCTestCase;
import org.testng.annotations.Test;
@@ -71,8 +71,7 @@ public class MethodIteratorTest extends
try
{
mi.next();
- }
- catch (NoSuchElementException ex)
+ } catch (NoSuchElementException ex)
{
//
}
@@ -139,7 +138,7 @@ public class MethodIteratorTest extends
MethodSignature actual = mi.next();
- assertEquals(new MethodSignature(void.class, "open", null, new Class[] { IOException.class }), actual);
+ assertEquals(new MethodSignature(void.class, "open", null, new Class[]{IOException.class}), actual);
assertEquals(false, mi.hasNext());
}
Copied: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodSignatureTest.java (from r1236000, tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodSignatureTest.java)
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodSignatureTest.java?p2=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodSignatureTest.java&p1=tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodSignatureTest.java&r1=1236000&r2=1236001&rev=1236001&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/services/MethodSignatureTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MethodSignatureTest.java Thu Jan 26 00:51:02 2012
@@ -1,4 +1,4 @@
-// Copyright 2006 The Apache Software Foundation
+// Copyright 2006, 2012 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.
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-package org.apache.tapestry5.ioc.services;
+package org.apache.tapestry5.ioc.internal.services;
import org.apache.tapestry5.ioc.test.IOCTestCase;
import org.testng.annotations.Test;
@@ -86,8 +86,8 @@ public class MethodSignatureTest extends
@Test
public void equals_with_parameters_mismatch()
{
- MethodSignature m1 = new MethodSignature(void.class, "foo", new Class[] { String.class }, null);
- MethodSignature m2 = new MethodSignature(void.class, "foo", new Class[] { Boolean.class }, null);
+ MethodSignature m1 = new MethodSignature(void.class, "foo", new Class[]{String.class}, null);
+ MethodSignature m2 = new MethodSignature(void.class, "foo", new Class[]{Boolean.class}, null);
assertEquals(false, m1.equals(m2));
}
@@ -118,7 +118,7 @@ public class MethodSignatureTest extends
m = find(Class.class, "newInstance");
assertEquals(m.toString(),
- "java.lang.Object newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException");
+ "java.lang.Object newInstance() throws java.lang.IllegalAccessException, java.lang.InstantiationException");
}
@Test
@@ -155,7 +155,7 @@ public class MethodSignatureTest extends
public void overriding_signature_parameters_mismatch()
{
MethodSignature m1 = new MethodSignature(void.class, "foo", null, null);
- MethodSignature m2 = new MethodSignature(void.class, "foo", new Class[] { String.class }, null);
+ MethodSignature m2 = new MethodSignature(void.class, "foo", new Class[]{String.class}, null);
assertEquals(m1.isOverridingSignatureOf(m2), false);
}
@@ -163,8 +163,8 @@ public class MethodSignatureTest extends
@Test
public void overriding_signature()
{
- MethodSignature m1 = new MethodSignature(void.class, "close", null, new Class[] { Exception.class });
- MethodSignature m2 = new MethodSignature(void.class, "close", null, new Class[] { RuntimeException.class });
+ MethodSignature m1 = new MethodSignature(void.class, "close", null, new Class[]{Exception.class});
+ MethodSignature m2 = new MethodSignature(void.class, "close", null, new Class[]{RuntimeException.class});
assertEquals(m1.isOverridingSignatureOf(m2), true);
assertEquals(m2.isOverridingSignatureOf(m1), false);
@@ -177,7 +177,7 @@ public class MethodSignatureTest extends
public void overriding_signature_with_no_exceptions()
{
MethodSignature m1 = new MethodSignature(void.class, "close", null, null);
- MethodSignature m2 = new MethodSignature(void.class, "close", null, new Class[] { RuntimeException.class });
+ MethodSignature m2 = new MethodSignature(void.class, "close", null, new Class[]{RuntimeException.class});
assertEquals(m1.isOverridingSignatureOf(m2), false);
assertEquals(m2.isOverridingSignatureOf(m1), true);
@@ -190,9 +190,9 @@ public class MethodSignatureTest extends
public void overriding_signature_with_multiple_matched_exceptions()
{
MethodSignature m1 = new MethodSignature(void.class, "close", null,
- new Class[] { SQLException.class, NumberFormatException.class });
+ new Class[]{SQLException.class, NumberFormatException.class});
MethodSignature m2 = new MethodSignature(void.class, "close", null,
- new Class[] { SQLException.class, IOException.class });
+ new Class[]{SQLException.class, IOException.class});
assertEquals(m1.isOverridingSignatureOf(m2), false);
assertEquals(m2.isOverridingSignatureOf(m1), false);