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 2008/05/06 23:52:40 UTC
svn commit: r653936 [6/6] - in /tapestry/tapestry5/trunk/tapestry-ioc/src:
main/java/org/apache/tapestry/ioc/
main/java/org/apache/tapestry/ioc/internal/
main/java/org/apache/tapestry/ioc/internal/services/
main/java/org/apache/tapestry/ioc/internal/ut...
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorImplTest.java Tue May 6 14:52:36 2008
@@ -50,8 +50,8 @@
ServiceResources resources = mockServiceResources();
Logger logger = mockLogger();
- fixture._expectedDelegate = mockFieService();
- fixture._interceptorToReturn = mockFieService();
+ fixture.expectedDelegate = mockFieService();
+ fixture.interceptorToReturn = mockFieService();
ModuleBuilderSource source = newSource(fixture);
trainForConstructor(resources, logger);
@@ -68,9 +68,9 @@
ServiceDecoratorImpl decorator = new ServiceDecoratorImpl(m, source, resources,
getClassFactory());
- Object interceptor = decorator.createInterceptor(fixture._expectedDelegate);
+ Object interceptor = decorator.createInterceptor(fixture.expectedDelegate);
- assertSame(interceptor, fixture._interceptorToReturn);
+ assertSame(interceptor, fixture.interceptorToReturn);
verify();
}
@@ -109,8 +109,8 @@
ModuleBuilderSource source = newSource(fixture);
ServiceResources resources = mockServiceResources();
Logger logger = mockLogger();
- fixture._expectedDelegate = mockFieService();
- fixture._interceptorToReturn = newMock(FoeService.class);
+ fixture.expectedDelegate = mockFieService();
+ fixture.interceptorToReturn = newMock(FoeService.class);
Method m = findMethod(fixture, "decoratorUntyped");
@@ -121,7 +121,7 @@
logger.warn(IOCMessages.decoratorReturnedWrongType(
m,
SERVICE_ID,
- fixture._interceptorToReturn,
+ fixture.interceptorToReturn,
FieService.class));
replay();
@@ -129,7 +129,7 @@
ServiceDecoratorImpl decorator = new ServiceDecoratorImpl(m, source, resources,
getClassFactory());
- Object interceptor = decorator.createInterceptor(fixture._expectedDelegate);
+ Object interceptor = decorator.createInterceptor(fixture.expectedDelegate);
assertNull(interceptor);
@@ -144,7 +144,7 @@
ServiceResources resources = mockServiceResources();
Logger logger = mockLogger();
Object delegate = mockFieService();
- fixture._exception = new RuntimeException("Ouch!");
+ fixture.exception = new RuntimeException("Ouch!");
trainForConstructor(resources, logger);
@@ -169,7 +169,7 @@
Throwable cause = ex.getCause();
- assertSame(cause, fixture._exception);
+ assertSame(cause, fixture.exception);
}
verify();
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ToUpperCaseStringHolder.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ToUpperCaseStringHolder.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ToUpperCaseStringHolder.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ToUpperCaseStringHolder.java Tue May 6 14:52:36 2008
@@ -18,16 +18,16 @@
public class ToUpperCaseStringHolder implements StringHolder
{
- private String _value;
+ private String value;
public String getValue()
{
- return _value;
+ return value;
}
public void setValue(String value)
{
- _value = value.toUpperCase();
+ this.value = value.toUpperCase();
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/AspectInterceptorBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/AspectInterceptorBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/AspectInterceptorBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/AspectInterceptorBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -27,12 +27,12 @@
*/
public class AspectInterceptorBuilderImplTest extends IOCInternalTestCase
{
- private AspectDecorator _decorator;
+ private AspectDecorator decorator;
@BeforeClass
public void setup()
{
- _decorator = getService(AspectDecorator.class);
+ decorator = getService(AspectDecorator.class);
}
public interface Subject
@@ -62,7 +62,7 @@
replay();
- AspectInterceptorBuilder<Subject> builder = _decorator.createBuilder(Subject.class, delegate, "<Subject>");
+ AspectInterceptorBuilder<Subject> builder = decorator.createBuilder(Subject.class, delegate, "<Subject>");
builder.adviseMethod(Subject.class.getMethod("advised"), advice);
@@ -83,7 +83,7 @@
replay();
- AspectInterceptorBuilder<Subject> builder = _decorator.createBuilder(Subject.class, delegate, "<Subject>");
+ AspectInterceptorBuilder<Subject> builder = decorator.createBuilder(Subject.class, delegate, "<Subject>");
// This method doesn't belong.
@@ -112,7 +112,7 @@
replay();
- AspectInterceptorBuilder<Subject> builder = _decorator.createBuilder(Subject.class, delegate, "<Subject>");
+ AspectInterceptorBuilder<Subject> builder = decorator.createBuilder(Subject.class, delegate, "<Subject>");
builder.adviseMethod(Subject.class.getMethod("advised"), advice);
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/BridgeBuilderTest.java Tue May 6 14:52:36 2008
@@ -23,7 +23,7 @@
public class BridgeBuilderTest extends IOCInternalTestCase
{
- private ClassFactory _classFactory = new ClassFactoryImpl();
+ private ClassFactory classFactory = new ClassFactoryImpl();
@Test
public void standard_interface_and_filter()
@@ -33,7 +33,7 @@
replay();
BridgeBuilder<StandardService, StandardFilter> bb = new BridgeBuilder<StandardService, StandardFilter>(
- logger, StandardService.class, StandardFilter.class, _classFactory);
+ logger, StandardService.class, StandardFilter.class, classFactory);
StandardFilter sf = new StandardFilter()
{
@@ -76,7 +76,7 @@
replay();
BridgeBuilder<ToStringService, ToStringFilter> bb = new BridgeBuilder<ToStringService, ToStringFilter>(
- logger, ToStringService.class, ToStringFilter.class, _classFactory);
+ logger, ToStringService.class, ToStringFilter.class, classFactory);
ToStringFilter f = new ToStringFilter()
{
@@ -115,7 +115,7 @@
replay();
BridgeBuilder<ExtraServiceMethod, Serializable> bb = new BridgeBuilder<ExtraServiceMethod, Serializable>(
- logger, ExtraServiceMethod.class, Serializable.class, _classFactory);
+ logger, ExtraServiceMethod.class, Serializable.class, classFactory);
ExtraServiceMethod esm = bb.instantiateBridge(next, filter);
@@ -149,7 +149,7 @@
replay();
BridgeBuilder<Serializable, ExtraFilterMethod> bb = new BridgeBuilder<Serializable, ExtraFilterMethod>(
- logger, Serializable.class, ExtraFilterMethod.class, _classFactory);
+ logger, Serializable.class, ExtraFilterMethod.class, classFactory);
assertNotNull(bb.instantiateBridge(next, filter));
@@ -164,7 +164,7 @@
replay();
BridgeBuilder<MiddleService, MiddleFilter> bb = new BridgeBuilder<MiddleService, MiddleFilter>(
- logger, MiddleService.class, MiddleFilter.class, _classFactory);
+ logger, MiddleService.class, MiddleFilter.class, classFactory);
MiddleFilter mf = new MiddleFilter()
{
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ChainBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ChainBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ChainBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ChainBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -24,7 +24,7 @@
public class ChainBuilderImplTest extends IOCInternalTestCase
{
- private final ChainBuilder _builder = new ChainBuilderImpl(new ClassFactoryImpl());
+ private final ChainBuilder builder = new ChainBuilderImpl(new ClassFactoryImpl());
@Test
public void simple_void_method()
@@ -185,7 +185,7 @@
{
List<T> list = Arrays.asList(commands);
- return _builder.build(commandInterface, list);
+ return builder.build(commandInterface, list);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ClassFabImplTest.java Tue May 6 14:52:36 2008
@@ -33,9 +33,9 @@
public class ClassFabImplTest extends IOCTestCase
{
- private final CtClassSource _source;
+ private final CtClassSource source;
- private final PropertyAccess _access = new PropertyAccessImpl();
+ private final PropertyAccess access = new PropertyAccessImpl();
public interface SampleService
{
@@ -59,14 +59,14 @@
pool.addClassLoaderIfNeeded(threadLoader);
- _source = new CtClassSourceImpl(pool, threadLoader);
+ source = new CtClassSourceImpl(pool, threadLoader);
}
private ClassFab newClassFab(String className, Class superClass)
{
- CtClass ctClass = _source.newClass(className, superClass);
+ CtClass ctClass = source.newClass(className, superClass);
- return new ClassFabImpl(_source, ctClass, LoggerFactory.getLogger("ClassFab"));
+ return new ClassFabImpl(source, ctClass, LoggerFactory.getLogger("ClassFab"));
}
@Test
@@ -89,11 +89,11 @@
Object targetBean = targetClass.newInstance();
- _access.set(targetBean, "stringValue", "Fred");
+ access.set(targetBean, "stringValue", "Fred");
// May keep a test-time dependency on HiveMind, just for PropertyUtils.
- String actual = (String) _access.get(targetBean, "stringValue");
+ String actual = (String) access.get(targetBean, "stringValue");
assertEquals(actual, "Fred");
}
@@ -199,7 +199,7 @@
Object targetBean = c.newInstance(new Object[] { "Buffy" });
- String actual = (String) _access.get(targetBean, "stringValue");
+ String actual = (String) access.get(targetBean, "stringValue");
assertEquals("Buffy", actual);
}
@@ -421,8 +421,8 @@
instance.run();
- assertEquals(_access.get(instance, "int"), 0);
- assertEquals(_access.get(instance, "double"), 0.0d);
+ assertEquals(access.get(instance, "int"), 0);
+ assertEquals(access.get(instance, "double"), 0.0d);
}
private void assertContains(String actual, String expectedSubstring)
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -22,24 +22,24 @@
public class DefaultImplementationBuilderImplTest extends IOCInternalTestCase
{
- private DefaultImplementationBuilder _builder;
+ private DefaultImplementationBuilder builder;
@BeforeClass
public void setup_builder()
{
- _builder = getService("DefaultImplementationBuilder", DefaultImplementationBuilder.class);
+ builder = getService("DefaultImplementationBuilder", DefaultImplementationBuilder.class);
}
@AfterClass
public void cleanup_builder()
{
- _builder = null;
+ builder = null;
}
@Test
public void simple_interface()
{
- Runnable r = _builder.createDefaultImplementation(Runnable.class);
+ Runnable r = builder.createDefaultImplementation(Runnable.class);
r.run();
@@ -54,7 +54,7 @@
@Test
public void interface_has_toString()
{
- ToString ts = _builder.createDefaultImplementation(ToString.class);
+ ToString ts = builder.createDefaultImplementation(ToString.class);
assertNull(ts.toString());
}
@@ -70,8 +70,8 @@
for (int i = 0; i < 2; i++)
{
- r1 = _builder.createDefaultImplementation(Runnable.class);
- r2 = _builder.createDefaultImplementation(Runnable.class);
+ r1 = builder.createDefaultImplementation(Runnable.class);
+ r2 = builder.createDefaultImplementation(Runnable.class);
if (r1 == r2) break;
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java Tue May 6 14:52:36 2008
@@ -1,26 +1,23 @@
-// 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.
-
+// 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.ioc.internal.services;
import org.apache.tapestry.ioc.services.ExceptionTracker;
import org.testng.Assert;
import org.testng.annotations.Test;
-/**
- *
- */
public class ExceptionTrackerImplTest extends Assert
{
@Test
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/LoggingDecoratorImplTest.java Tue May 6 14:52:36 2008
@@ -32,12 +32,12 @@
*/
public class LoggingDecoratorImplTest extends IOCInternalTestCase
{
- private AspectDecorator _aspectDecorator;
+ private AspectDecorator aspectDecorator;
@BeforeClass
public void setup()
{
- _aspectDecorator = getService(AspectDecorator.class);
+ aspectDecorator = getService(AspectDecorator.class);
}
public interface UpcaseService
@@ -89,7 +89,7 @@
private LoggingDecoratorImpl newLoggingDecorator()
{
- return new LoggingDecoratorImpl(_aspectDecorator, new ExceptionTrackerImpl());
+ return new LoggingDecoratorImpl(aspectDecorator, new ExceptionTrackerImpl());
}
@Test
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -32,24 +32,24 @@
public class PipelineBuilderImplTest extends IOCInternalTestCase
{
- private PipelineBuilder _builder;
+ private PipelineBuilder builder;
- private Registry _registry;
+ private Registry registry;
@BeforeClass
public void setup_builder()
{
- _registry = buildRegistry();
- _builder = _registry.getService("PipelineBuilder", PipelineBuilder.class);
+ registry = buildRegistry();
+ builder = registry.getService("PipelineBuilder", PipelineBuilder.class);
}
@AfterClass
public void shutdown_builder()
{
- _registry.shutdown();
+ registry.shutdown();
- _builder = null;
- _registry = null;
+ builder = null;
+ registry = null;
}
@Test
@@ -91,7 +91,7 @@
}
};
- StandardService pipeline = _builder.build(
+ StandardService pipeline = builder.build(
logger,
StandardService.class,
StandardFilter.class,
@@ -115,7 +115,7 @@
List<StandardFilter> filters = newList();
- StandardService pipeline = _builder.build(
+ StandardService pipeline = builder.build(
logger,
StandardService.class,
StandardFilter.class,
@@ -136,7 +136,7 @@
List<StandardFilter> filters = newList();
- StandardService pipeline = _builder.build(
+ StandardService pipeline = builder.build(
logger,
StandardService.class,
StandardFilter.class,
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java Tue May 6 14:52:36 2008
@@ -33,9 +33,9 @@
{
private static final String CLASS_NAME = PropertyAccessImplTest.class.getName();
- private PropertyAccess _access = new PropertyAccessImpl();
+ private PropertyAccess access = new PropertyAccessImpl();
- private Random _random = new Random();
+ private Random random = new Random();
public static class Bean
{
@@ -155,11 +155,11 @@
{
Bean b = new Bean();
- int value = _random.nextInt();
+ int value = random.nextInt();
b.setValue(value);
- assertEquals(_access.get(b, "value"), value);
+ assertEquals(access.get(b, "value"), value);
}
@Test
@@ -167,11 +167,11 @@
{
Bean b = new Bean();
- int value = _random.nextInt();
+ int value = random.nextInt();
b.setValue(value);
- assertEquals(_access.get(b, "VALUE"), value);
+ assertEquals(access.get(b, "VALUE"), value);
}
@Test
@@ -179,9 +179,9 @@
{
Bean b = new Bean();
- int value = _random.nextInt();
+ int value = random.nextInt();
- _access.set(b, "value", value);
+ access.set(b, "value", value);
assertEquals(b.getValue(), value);
}
@@ -191,9 +191,9 @@
{
Bean b = new Bean();
- int value = _random.nextInt();
+ int value = random.nextInt();
- _access.set(b, "VALUE", value);
+ access.set(b, "VALUE", value);
assertEquals(b.getValue(), value);
}
@@ -205,7 +205,7 @@
try
{
- _access.get(b, "zaphod");
+ access.get(b, "zaphod");
unreachable();
}
@@ -223,7 +223,7 @@
try
{
- _access.set(b, "class", null);
+ access.set(b, "class", null);
unreachable();
}
catch (UnsupportedOperationException ex)
@@ -240,7 +240,7 @@
try
{
- _access.get(b, "writeOnly");
+ access.get(b, "writeOnly");
unreachable();
}
catch (UnsupportedOperationException ex)
@@ -257,7 +257,7 @@
try
{
- _access.get(b, "failure");
+ access.get(b, "failure");
unreachable();
}
catch (RuntimeException ex)
@@ -273,7 +273,7 @@
try
{
- _access.set(b, "failure", false);
+ access.set(b, "failure", false);
unreachable();
}
catch (RuntimeException ex)
@@ -290,7 +290,7 @@
try
{
- _access.get(b, "google");
+ access.get(b, "google");
unreachable();
}
catch (RuntimeException ex)
@@ -302,17 +302,17 @@
@Test
public void clear_wipes_internal_cache()
{
- ClassPropertyAdapter cpa1 = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa1 = access.getAdapter(Bean.class);
assertSame(cpa1.getBeanType(), Bean.class);
- ClassPropertyAdapter cpa2 = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa2 = access.getAdapter(Bean.class);
assertSame(cpa2, cpa1);
- _access.clearCache();
+ access.clearCache();
- ClassPropertyAdapter cpa3 = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa3 = access.getAdapter(Bean.class);
assertNotSame(cpa3, cpa1);
}
@@ -320,7 +320,7 @@
@Test
public void class_property_adapter_toString()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
assertEquals(cpa.toString(),
"<ClassPropertyAdaptor " + CLASS_NAME + "$Bean : class, readOnly, value, writeOnly>");
@@ -329,7 +329,7 @@
@Test
public void property_adapter_read_only_property()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
PropertyAdapter pa = cpa.getPropertyAdapter("readOnly");
assertTrue(pa.isRead());
@@ -343,7 +343,7 @@
@Test
public void property_adapter_write_only_property()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
PropertyAdapter pa = cpa.getPropertyAdapter("writeOnly");
assertFalse(pa.isRead());
@@ -356,7 +356,7 @@
@Test
public void class_property_adapter_returns_null_for_unknown_property()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
assertNull(cpa.getPropertyAdapter("google"));
}
@@ -364,7 +364,7 @@
@Test
public void access_to_property_type()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
assertEquals(cpa.getPropertyAdapter("value").getType(), int.class);
assertEquals(cpa.getPropertyAdapter("readOnly").getType(), String.class);
@@ -374,7 +374,7 @@
@Test
public void property_names()
{
- ClassPropertyAdapter cpa = _access.getAdapter(Bean.class);
+ ClassPropertyAdapter cpa = access.getAdapter(Bean.class);
assertEquals(cpa.getPropertyNames(), Arrays.asList("class", "readOnly", "value", "writeOnly"));
}
@@ -388,7 +388,7 @@
Bean b = new Bean();
- int value = _random.nextInt();
+ int value = random.nextInt();
pa.set(b, "value", value);
@@ -400,7 +400,7 @@
@Test
public void super_interface_methods_inherited_by_sub_interface()
{
- ClassPropertyAdapter cpa = _access.getAdapter(SubInterface.class);
+ ClassPropertyAdapter cpa = access.getAdapter(SubInterface.class);
assertEquals(cpa.getPropertyNames(), Arrays.asList("grandParentProperty", "parentProperty", "subProperty"));
}
@@ -408,7 +408,7 @@
@Test
public void indexed_properties_are_ignored()
{
- ClassPropertyAdapter cpa = _access.getAdapter(BeanWithIndexedProperty.class);
+ ClassPropertyAdapter cpa = access.getAdapter(BeanWithIndexedProperty.class);
assertEquals(cpa.getPropertyNames(), Arrays.asList("class", "primitiveProperty"));
}
@@ -416,7 +416,7 @@
@Test
public void get_annotation_when_annotation_not_present()
{
- PropertyAdapter pa = _access.getAdapter(AnnotatedBean.class)
+ PropertyAdapter pa = access.getAdapter(AnnotatedBean.class)
.getPropertyAdapter("readWrite");
assertNull(pa.getAnnotation(Scope.class));
@@ -425,7 +425,7 @@
@Test
public void get_annotation_with_annotation_on_write_method()
{
- PropertyAdapter pa = _access.getAdapter(AnnotatedBean.class).getPropertyAdapter("annotationOnWrite");
+ PropertyAdapter pa = access.getAdapter(AnnotatedBean.class).getPropertyAdapter("annotationOnWrite");
Scope annotation = pa.getAnnotation(Scope.class);
assertNotNull(annotation);
@@ -436,7 +436,7 @@
@Test
public void read_method_annotation_overrides_write_method_annotation()
{
- PropertyAdapter pa = _access.getAdapter(AnnotatedBean.class).getPropertyAdapter("annotationOnRead");
+ PropertyAdapter pa = access.getAdapter(AnnotatedBean.class).getPropertyAdapter("annotationOnRead");
Scope annotation = pa.getAnnotation(Scope.class);
assertNotNull(annotation);
@@ -447,7 +447,7 @@
@Test
public void no_write_method_reading_missing_annotation()
{
- PropertyAdapter pa = _access.getAdapter(AnnotatedBean.class).getPropertyAdapter("readOnly");
+ PropertyAdapter pa = access.getAdapter(AnnotatedBean.class).getPropertyAdapter("readOnly");
assertNull(pa.getAnnotation(Scope.class));
}
@@ -455,7 +455,7 @@
@Test
public void using_generics()
{
- ClassPropertyAdapter cpa1 = _access.getAdapter(StringLongPair.class);
+ ClassPropertyAdapter cpa1 = access.getAdapter(StringLongPair.class);
PropertyAdapter pa1 = cpa1.getPropertyAdapter("key");
assertSame(pa1.getType(), String.class);
@@ -468,7 +468,7 @@
// On the base class, which defines the generic parameter type variables,
// the properties just look like Object.
- ClassPropertyAdapter cpa2 = _access.getAdapter(Pair.class);
+ ClassPropertyAdapter cpa2 = access.getAdapter(Pair.class);
pa1 = cpa2.getPropertyAdapter("key");
assertSame(pa1.getType(), Object.class);
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryStartupTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryStartupTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryStartupTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/RegistryStartupTest.java Tue May 6 14:52:36 2008
@@ -122,11 +122,11 @@
{
Registry r = buildRegistry(StartupModule.class);
- assertFalse(StartupModule._startupInvoked);
+ assertFalse(StartupModule.startupInvoked);
r.performRegistryStartup();
- assertTrue(StartupModule._startupInvoked);
+ assertTrue(StartupModule.startupInvoked);
// Ideally we'd have a way to show that the PerthreadManager was notified after
// RegistryStartup did its thing, but ...
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StartupModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StartupModule.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StartupModule.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StartupModule.java Tue May 6 14:52:36 2008
@@ -18,7 +18,7 @@
public class StartupModule
{
- public static boolean _startupInvoked;
+ public static boolean startupInvoked;
public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration)
{
@@ -26,7 +26,7 @@
{
public void run()
{
- _startupInvoked = true;
+ startupInvoked = true;
}
};
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StrategyBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StrategyBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StrategyBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/StrategyBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -28,16 +28,16 @@
{
private static class KindOfImpl implements KindOf
{
- private final String _value;
+ private final String value;
public KindOfImpl(final String value)
{
- _value = value;
+ this.value = value;
}
public String kindOf(Object value)
{
- return _value;
+ return this.value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TargetBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TargetBean.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TargetBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TargetBean.java Tue May 6 14:52:36 2008
@@ -19,28 +19,28 @@
*/
public class TargetBean
{
- private String _firstName;
+ private String firstName;
- private String _lastName;
+ private String lastName;
public String getFirstName()
{
- return _firstName;
+ return firstName;
}
public String getLastName()
{
- return _lastName;
+ return lastName;
}
public void setFirstName(String firstName)
{
- _firstName = firstName;
+ this.firstName = firstName;
}
public void setLastName(String lastName)
{
- _lastName = lastName;
+ this.lastName = lastName;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadLocaleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadLocaleImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadLocaleImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ThreadLocaleImplTest.java Tue May 6 14:52:36 2008
@@ -23,7 +23,7 @@
public class ThreadLocaleImplTest extends IOCInternalTestCase
{
- private ThreadLocale _threadLocale;
+ private ThreadLocale threadLocale;
private static final Locale FAKE_LOCALE1 = new Locale("klingon");
@@ -32,23 +32,23 @@
@BeforeClass
public void setup()
{
- _threadLocale = getService(ThreadLocale.class);
+ threadLocale = getService(ThreadLocale.class);
}
@Test
public void different_threads_track_different_values() throws InterruptedException
{
- final Locale initial = _threadLocale.getLocale();
+ final Locale initial = threadLocale.getLocale();
- _threadLocale.setLocale(FAKE_LOCALE1);
+ threadLocale.setLocale(FAKE_LOCALE1);
- assertSame(_threadLocale.getLocale(), FAKE_LOCALE1);
+ assertSame(threadLocale.getLocale(), FAKE_LOCALE1);
Runnable r = new Runnable()
{
public void run()
{
- assertSame(_threadLocale.getLocale(), initial);
+ assertSame(threadLocale.getLocale(), initial);
}
};
@@ -62,12 +62,12 @@
public void thread_locale_reverts_after_cleanup()
{
- Locale initial = _threadLocale.getLocale();
+ Locale initial = threadLocale.getLocale();
- _threadLocale.setLocale(FAKE_LOCALE2);
+ threadLocale.setLocale(FAKE_LOCALE2);
cleanupThread();
- assertSame(_threadLocale.getLocale(), initial);
+ assertSame(threadLocale.getLocale(), initial);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TypeCoercerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TypeCoercerImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TypeCoercerImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/TypeCoercerImplTest.java Tue May 6 14:52:36 2008
@@ -30,18 +30,18 @@
public class TypeCoercerImplTest extends IOCInternalTestCase
{
- private TypeCoercer _coercer;
+ private TypeCoercer coercer;
@BeforeClass
public void setup_coercer()
{
- _coercer = getService(TypeCoercer.class);
+ coercer = getService(TypeCoercer.class);
}
@AfterClass
public void cleanup_coercer()
{
- _coercer = null;
+ coercer = null;
}
@Test
@@ -49,17 +49,17 @@
{
// String to Double
- assertEquals(_coercer.coerce("-15", Double.class), new Double(-15));
+ assertEquals(coercer.coerce("-15", Double.class), new Double(-15));
// Now a second pass through, to exercise the internal cache
- assertEquals(_coercer.coerce("2.27", Double.class), new Double(2.27));
+ assertEquals(coercer.coerce("2.27", Double.class), new Double(2.27));
}
@Test
public void primitive_type_as_target()
{
- assertEquals(_coercer.coerce(227l, int.class), new Integer(227));
+ assertEquals(coercer.coerce(227l, int.class), new Integer(227));
}
@Test
@@ -67,7 +67,7 @@
{
Object input = new Integer(-37);
- assertSame(_coercer.coerce(input, Number.class), input);
+ assertSame(coercer.coerce(input, Number.class), input);
}
@Test
@@ -77,11 +77,11 @@
// This should trigger Object -> String, String -> Integer
- assertEquals(_coercer.coerce(builder, int.class), new Integer(12345));
+ assertEquals(coercer.coerce(builder, int.class), new Integer(12345));
// This should trigger String -> Double, Number -> Integer
- assertEquals(_coercer.coerce("52", Integer.class), new Integer(52));
+ assertEquals(coercer.coerce("52", Integer.class), new Integer(52));
}
@Test
@@ -89,7 +89,7 @@
{
try
{
- _coercer.coerce("", Map.class);
+ coercer.coerce("", Map.class);
unreachable();
}
catch (IllegalArgumentException ex)
@@ -104,7 +104,7 @@
{
try
{
- _coercer.coerce(Collections.EMPTY_MAP, Float.class);
+ coercer.coerce(Collections.EMPTY_MAP, Float.class);
unreachable();
}
catch (RuntimeException ex)
@@ -121,7 +121,7 @@
@Test(dataProvider = "coercions_inputs")
public void builtin_coercions(Object input, Class targetType, Object expected)
{
- Object actual = _coercer.coerce(input, targetType);
+ Object actual = coercer.coerce(input, targetType);
assertEquals(actual, expected);
}
@@ -140,117 +140,117 @@
Float floatValue = new Float(31.14);
byte byte1 = 12, byte2 = 56;
short short1 = 34, short2 = 98;
- return new Object[][]{
+ return new Object[][] {
// There's a lot of these!
- {this, String.class, toString()},
+ { this, String.class, toString() },
- {55l, Integer.class, 55},
+ { 55l, Integer.class, 55 },
- {"", Boolean.class, false},
+ { "", Boolean.class, false },
- {" ", Boolean.class, false},
+ { " ", Boolean.class, false },
- {"x", Boolean.class, true},
+ { "x", Boolean.class, true },
- {" z ", Boolean.class, true},
+ { " z ", Boolean.class, true },
- {"false", Boolean.class, false},
+ { "false", Boolean.class, false },
- {" False ", Boolean.class, false},
+ { " False ", Boolean.class, false },
- {null, Boolean.class, false},
+ { null, Boolean.class, false },
- {new Double(256), Integer.class, new Integer(256)},
+ { new Double(256), Integer.class, new Integer(256) },
- {new Double(22.7), Integer.class, new Integer(22)},
+ { new Double(22.7), Integer.class, new Integer(22) },
- {new Integer(0), Boolean.class, false},
+ { new Integer(0), Boolean.class, false },
- {new Long(32838), Boolean.class, true},
+ { new Long(32838), Boolean.class, true },
- {new Integer(127), Byte.class, new Byte("127")},
+ { new Integer(127), Byte.class, new Byte("127") },
- {new Double(58), Short.class, new Short("58")},
+ { new Double(58), Short.class, new Short("58") },
- {new Integer(33), Long.class, new Long(33)},
+ { new Integer(33), Long.class, new Long(33) },
- {new Integer(22), Float.class, new Float(22)},
+ { new Integer(22), Float.class, new Float(22) },
- {new Integer(1234), Double.class, new Double(1234)},
+ { new Integer(1234), Double.class, new Double(1234) },
- {floatValue, Double.class, floatValue.doubleValue()},
+ { floatValue, Double.class, floatValue.doubleValue() },
- {Collections.EMPTY_LIST, Boolean.class, false},
+ { Collections.EMPTY_LIST, Boolean.class, false },
- {Collections.singleton(this), Boolean.class, true},
+ { Collections.singleton(this), Boolean.class, true },
- {bigDecimalValue, BigDecimal.class, new BigDecimal(bigDecimalValue)},
+ { bigDecimalValue, BigDecimal.class, new BigDecimal(bigDecimalValue) },
- {new BigDecimal(bigDecimalValue), Double.class, 1.2345656748352436E49},
+ { new BigDecimal(bigDecimalValue), Double.class, 1.2345656748352436E49 },
- {bigIntegerValue, BigInteger.class, new BigInteger(bigIntegerValue)},
+ { bigIntegerValue, BigInteger.class, new BigInteger(bigIntegerValue) },
- {new BigInteger("12345678"), Long.class, 12345678l},
+ { new BigInteger("12345678"), Long.class, 12345678l },
- {-12345678l, BigInteger.class, new BigInteger("-12345678")},
+ { -12345678l, BigInteger.class, new BigInteger("-12345678") },
- {object, List.class, Collections.singletonList(object)},
+ { object, List.class, Collections.singletonList(object) },
- {null, Iterable.class, null},
+ { null, Iterable.class, null },
- {null, List.class, null},
+ { null, List.class, null },
- {null, Collection.class, null},
+ { null, Collection.class, null },
- {null, String.class, null},
+ { null, String.class, null },
- {new Object[]{"a", 123}, List.class, Arrays.asList("a", 123)},
+ { new Object[] { "a", 123 }, List.class, Arrays.asList("a", 123) },
- {new String[]{"a", "b"}, List.class, Arrays.asList("a", "b")},
+ { new String[] { "a", "b" }, List.class, Arrays.asList("a", "b") },
- {new byte[]{byte1, byte2}, List.class, Arrays.asList(byte1, byte2)},
+ { new byte[] { byte1, byte2 }, List.class, Arrays.asList(byte1, byte2) },
- {new short[]{short1, short2}, List.class, Arrays.asList(short1, short2)},
+ { new short[] { short1, short2 }, List.class, Arrays.asList(short1, short2) },
- {new int[]{1, 2}, List.class, Arrays.asList(1, 2)},
+ { new int[] { 1, 2 }, List.class, Arrays.asList(1, 2) },
- {new long[]{123L, 321L}, List.class, Arrays.asList(123L, 321L)},
+ { new long[] { 123L, 321L }, List.class, Arrays.asList(123L, 321L) },
- {new float[]{3.4f, 7.777f}, List.class, Arrays.asList(3.4f, 7.777f)},
+ { new float[] { 3.4f, 7.777f }, List.class, Arrays.asList(3.4f, 7.777f) },
- {new double[]{3.4, 7.777}, List.class, Arrays.asList(3.4, 7.777)},
+ { new double[] { 3.4, 7.777 }, List.class, Arrays.asList(3.4, 7.777) },
- {new char[]{'a', 'b'}, List.class, Arrays.asList('a', 'b')},
+ { new char[] { 'a', 'b' }, List.class, Arrays.asList('a', 'b') },
- {new boolean[]{true, false}, List.class, Arrays.asList(true, false)},
+ { new boolean[] { true, false }, List.class, Arrays.asList(true, false) },
- {"foo/bar/baz.txt", File.class, new File("foo/bar/baz.txt")},
+ { "foo/bar/baz.txt", File.class, new File("foo/bar/baz.txt") },
- {new TimeInterval("2 h"), Long.class, 2 * 60 * 60 * 1000l},
+ { new TimeInterval("2 h"), Long.class, 2 * 60 * 60 * 1000l },
- {"2 h", TimeInterval.class, new TimeInterval("120 m")},
+ { "2 h", TimeInterval.class, new TimeInterval("120 m") },
// null to arbitrary object is still null
- {null, XMLReader.class, null}};
+ { null, XMLReader.class, null } };
}
@Test(dataProvider = "explain_inputs")
public <S, T> void explain(Class<S> inputType, Class<T> outputType, String expected)
{
- assertEquals(_coercer.explain(inputType, outputType), expected);
+ assertEquals(coercer.explain(inputType, outputType), expected);
}
@DataProvider(name = "explain_inputs")
public Object[][] explain_inputs()
{
- return new Object[][]{
- {StringBuffer.class, Integer.class, "Object --> String, String --> Long, Long --> Integer"},
- {void.class, Map.class, "null --> null"}, {void.class, Boolean.class, "null --> Boolean"},
- {String[].class, List.class, "Object[] --> java.util.List"},
- {Float.class, Double.class, "Float --> Double"},
- {Double.class, BigDecimal.class, "Object --> String, String --> java.math.BigDecimal"},
+ return new Object[][] {
+ { StringBuffer.class, Integer.class, "Object --> String, String --> Long, Long --> Integer" },
+ { void.class, Map.class, "null --> null" }, { void.class, Boolean.class, "null --> Boolean" },
+ { String[].class, List.class, "Object[] --> java.util.List" },
+ { Float.class, Double.class, "Float --> Double" },
+ { Double.class, BigDecimal.class, "Object --> String, String --> java.math.BigDecimal" },
};
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/BaseGenericBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/BaseGenericBean.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/BaseGenericBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/BaseGenericBean.java Tue May 6 14:52:36 2008
@@ -16,15 +16,15 @@
public class BaseGenericBean<T>
{
- private T _value;
+ private T value;
public T getValue()
{
- return _value;
+ return value;
}
public void setValue(T value)
{
- _value = value;
+ this.value = value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java Tue May 6 14:52:36 2008
@@ -21,13 +21,13 @@
import java.util.List;
/**
- * Test is structured a bit oddly, since it evolved from when the Concurrence annotation and aspect
- * evolved into the {@link ConcurrentBarrier} utility class.
+ * Test is structured a bit oddly, since it evolved from when the Concurrence annotation and aspect evolved into the
+ * {@link ConcurrentBarrier} utility class.
*/
@Test(sequential = true)
public class ConcurrentBarrierTest extends TestBase
{
- private ConcurrentTarget _target = new ConcurrentTarget();
+ private ConcurrentTarget target = new ConcurrentTarget();
private static final int THREAD_COUNT = 100;
@@ -40,7 +40,7 @@
{
public void run()
{
- _target.incrementCounter();
+ target.incrementCounter();
}
};
@@ -55,7 +55,7 @@
public void run()
{
// Gets a write lock, then a read lock.
- _target.incrementCounterHard();
+ target.incrementCounterHard();
}
};
@@ -71,7 +71,7 @@
{
// A read lock method that upgrades to a write lock
- _target.incrementIfNonNegative();
+ target.incrementIfNonNegative();
}
};
@@ -88,7 +88,7 @@
// Read lock method invokes other class, that invokes write method.
- _target.incrementViaRunnable();
+ target.incrementViaRunnable();
}
};
@@ -96,13 +96,13 @@
}
/**
- * Test that locking, especially read lock upgrade and downgrade, work properly when there's
- * more than one object involved.
+ * Test that locking, especially read lock upgrade and downgrade, work properly when there's more than one object
+ * involved.
*/
@Test
public void multiple_synchronized_objects() throws Exception
{
- Runnable operation = new ConcurrentTargetWrapper(_target);
+ Runnable operation = new ConcurrentTargetWrapper(target);
runOperationAndCheckCounter(operation);
}
@@ -114,7 +114,7 @@
{
public void run()
{
- _target.tryIncrementCounter();
+ target.tryIncrementCounter();
}
};
@@ -129,7 +129,7 @@
public void run()
{
// Gets a write lock, then a read lock.
- _target.tryIncrementCounterHard();
+ target.tryIncrementCounterHard();
}
};
@@ -145,7 +145,7 @@
{
// A read lock method that upgrades to a write lock
- _target.tryIncrementIfNonNegative();
+ target.tryIncrementIfNonNegative();
}
};
@@ -162,11 +162,11 @@
{
// A read lock method that upgrades to a write lock
- _target.tryIncrementIfNonNegative();
+ target.tryIncrementIfNonNegative();
}
};
- _target.withRead(new Runnable()
+ target.withRead(new Runnable()
{
public void run()
{
@@ -179,7 +179,7 @@
}
}
});
- assertEquals(_target.getCounter(), 0);
+ assertEquals(target.getCounter(), 0);
}
@@ -188,7 +188,7 @@
{
runOperation(operation);
- assertEquals(_target.getCounter(), THREAD_COUNT);
+ assertEquals(target.getCounter(), THREAD_COUNT);
}
private void runOperation(Runnable operation)
@@ -197,7 +197,7 @@
List<Thread> threads = newList();
List<Thread> running = newList();
- _target.setCounter(0);
+ target.setCounter(0);
for (int i = 0; i < THREAD_COUNT; i++)
{
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java Tue May 6 14:52:36 2008
@@ -18,14 +18,14 @@
public class ConcurrentTarget
{
- private final ConcurrentBarrier _barrier = new ConcurrentBarrier();
+ private final ConcurrentBarrier barrier = new ConcurrentBarrier();
- private int _counter;
+ private int counter;
// Used to check if read locks accumulate when a read lock method calls another read lock method
public int readCounter()
{
- return _barrier.withRead(new Invokable<Integer>()
+ return barrier.withRead(new Invokable<Integer>()
{
public Integer invoke()
{
@@ -36,44 +36,44 @@
public int getCounter()
{
- return _barrier.withRead(new Invokable<Integer>()
+ return barrier.withRead(new Invokable<Integer>()
{
public Integer invoke()
{
- return _counter;
+ return counter;
}
});
}
public void incrementCounter()
{
- _barrier.withWrite(new Runnable()
+ barrier.withWrite(new Runnable()
{
public void run()
{
- _counter++;
+ counter++;
}
});
}
public void setCounter(final int counter)
{
- _barrier.withWrite(new Runnable()
+ barrier.withWrite(new Runnable()
{
public void run()
{
- _counter = counter;
+ ConcurrentTarget.this.counter = counter;
}
});
}
public void incrementIfNonNegative()
{
- _barrier.withRead(new Runnable()
+ barrier.withRead(new Runnable()
{
public void run()
{
- if (_counter >= 0)
+ if (counter >= 0)
incrementCounter();
}
});
@@ -81,7 +81,7 @@
public void incrementViaRunnable()
{
- _barrier.withRead(new Runnable()
+ barrier.withRead(new Runnable()
{
public void run()
{
@@ -100,44 +100,44 @@
public void incrementCounterHard()
{
- _barrier.withWrite(new Runnable()
+ barrier.withWrite(new Runnable()
{
public void run()
{
- _counter = getCounter() + 1;
+ counter = getCounter() + 1;
}
});
}
public void tryIncrementCounter()
{
- _barrier.tryWithWrite(new Runnable()
+ barrier.tryWithWrite(new Runnable()
{
public void run()
{
- _counter++;
+ counter++;
}
}, 20, TimeUnit.MILLISECONDS);
}
public void tryIncrementCounterHard()
{
- _barrier.tryWithWrite(new Runnable()
+ barrier.tryWithWrite(new Runnable()
{
public void run()
{
- _counter = getCounter() + 1;
+ counter = getCounter() + 1;
}
}, 20, TimeUnit.MILLISECONDS);
}
public void tryIncrementIfNonNegative()
{
- _barrier.withRead(new Runnable()
+ barrier.withRead(new Runnable()
{
public void run()
{
- if (_counter >= 0)
+ if (counter >= 0)
tryIncrementCounter();
}
});
@@ -146,6 +146,6 @@
public void withRead(Runnable runnable)
{
- _barrier.withRead(runnable);
+ barrier.withRead(runnable);
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java Tue May 6 14:52:36 2008
@@ -1,38 +1,38 @@
-// 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.
-
+// 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.ioc.internal.util;
public class ConcurrentTargetWrapper implements Runnable
{
- private final ConcurrentBarrier _barrier = new ConcurrentBarrier();
+ private final ConcurrentBarrier barrier = new ConcurrentBarrier();
- private final ConcurrentTarget _target;
+ private final ConcurrentTarget target;
public ConcurrentTargetWrapper(ConcurrentTarget target)
{
- _target = target;
+ this.target = target;
}
public void run()
{
- _barrier.withRead(new Runnable()
+ barrier.withRead(new Runnable()
{
public void run()
{
- _target.incrementCounter();
+ target.incrementCounter();
}
});
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InjectoBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InjectoBean.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InjectoBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InjectoBean.java Tue May 6 14:52:36 2008
@@ -18,8 +18,8 @@
public class InjectoBean
{
- private final String _foo;
- private final Runnable _bar;
+ private final String foo;
+ private final Runnable bar;
public InjectoBean()
{
@@ -38,17 +38,17 @@
public InjectoBean(String foo, Runnable bar)
{
- _foo = foo;
- _bar = bar;
+ this.foo = foo;
+ this.bar = bar;
}
public String getFoo()
{
- return _foo;
+ return foo;
}
public Runnable getBar()
{
- return _bar;
+ return bar;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/LocationImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/LocationImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/LocationImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/LocationImplTest.java Tue May 6 14:52:36 2008
@@ -23,60 +23,60 @@
public class LocationImplTest extends IOCTestCase
{
- private final Random _random = new Random();
+ private final Random random = new Random();
- private final Resource _resource = new ClasspathResource("/foo/Bar.xml");
+ private final Resource resource = new ClasspathResource("/foo/Bar.xml");
@Test
public void all_three_parameters()
{
- int line = _random.nextInt();
- int column = _random.nextInt();
+ int line = random.nextInt();
+ int column = random.nextInt();
- Location l = new LocationImpl(_resource, line, column);
+ Location l = new LocationImpl(resource, line, column);
- assertSame(l.getResource(), _resource);
+ assertSame(l.getResource(), resource);
assertEquals(l.getLine(), line);
assertEquals(l.getColumn(), column);
- assertEquals(l.toString(), String.format("%s, line %d, column %d", _resource, line, column));
+ assertEquals(l.toString(), String.format("%s, line %d, column %d", resource, line, column));
}
@Test
public void unknown_column()
{
- int line = _random.nextInt();
+ int line = random.nextInt();
- Location l = new LocationImpl(_resource, line);
+ Location l = new LocationImpl(resource, line);
- assertSame(l.getResource(), _resource);
+ assertSame(l.getResource(), resource);
assertEquals(l.getLine(), line);
assertEquals(l.getColumn(), -1);
- assertEquals(l.toString(), String.format("%s, line %d", _resource, line));
+ assertEquals(l.toString(), String.format("%s, line %d", resource, line));
}
@Test
public void unknown_line_and_column()
{
- Location l = new LocationImpl(_resource);
+ Location l = new LocationImpl(resource);
- assertSame(l.getResource(), _resource);
+ assertSame(l.getResource(), resource);
assertEquals(l.getLine(), -1);
assertEquals(l.getColumn(), -1);
- assertEquals(l.toString(), _resource.toString());
+ assertEquals(l.toString(), resource.toString());
}
@Test
public void equality()
{
- Location l1 = new LocationImpl(_resource, 22, 7);
- Location l2 = new LocationImpl(_resource, 22, 7);
+ Location l1 = new LocationImpl(resource, 22, 7);
+ Location l2 = new LocationImpl(resource, 22, 7);
Location l3 = new LocationImpl(null, 22, 7);
- Location l4 = new LocationImpl(_resource, 99, 7);
- Location l5 = new LocationImpl(_resource, 22, 99);
+ Location l4 = new LocationImpl(resource, 99, 7);
+ Location l5 = new LocationImpl(resource, 22, 99);
Location l6 = new LocationImpl(new ClasspathResource("/baz/Biff.txt"), 22, 7);
assertEquals(l1, l1);
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/MessagesImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/MessagesImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/MessagesImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/MessagesImplTest.java Tue May 6 14:52:36 2008
@@ -21,58 +21,58 @@
public class MessagesImplTest extends IOCTestCase
{
- private final Messages _messages = MessagesImpl.forClass(TargetMessages.class);
+ private final Messages messages = MessagesImpl.forClass(TargetMessages.class);
@Test
public void contains_key()
{
- assertTrue(_messages.contains("no-args"));
- assertFalse(_messages.contains("xyzzyx"));
+ assertTrue(messages.contains("no-args"));
+ assertFalse(messages.contains("xyzzyx"));
}
@Test
public void contains_key_is_case_insensitive()
{
- assertTrue(_messages.contains("No-Args"));
- assertFalse(_messages.contains("Xyzzyx"));
+ assertTrue(messages.contains("No-Args"));
+ assertFalse(messages.contains("Xyzzyx"));
}
@Test
public void get_message_from_catalog()
{
- assertEquals(_messages.get("no-args"), "No arguments.");
- assertEquals(_messages.get("something-failed"), "Something failed: %s");
+ assertEquals(messages.get("no-args"), "No arguments.");
+ assertEquals(messages.get("something-failed"), "Something failed: %s");
}
@Test
public void get_message_from_catalog_is_case_insensitive()
{
- assertEquals(_messages.get("No-args"), "No arguments.");
- assertEquals(_messages.get("Something-Failed"), "Something failed: %s");
+ assertEquals(messages.get("No-args"), "No arguments.");
+ assertEquals(messages.get("Something-Failed"), "Something failed: %s");
}
@Test
public void get_unknown_message_from_catalog()
{
- assertEquals(_messages.get("does-not-exist"), "[[missing key: does-not-exist]]");
+ assertEquals(messages.get("does-not-exist"), "[[missing key: does-not-exist]]");
}
@Test
public void format_message()
{
- assertEquals(_messages.format("result", "good"), "The result is 'good'.");
+ assertEquals(messages.format("result", "good"), "The result is 'good'.");
}
@Test
public void format_message_is_case_insensitive()
{
- assertEquals(_messages.format("Result", "good"), "The result is 'good'.");
+ assertEquals(messages.format("Result", "good"), "The result is 'good'.");
}
@Test
public void get_formatter()
{
- MessageFormatter mf = _messages.getFormatter("result");
+ MessageFormatter mf = messages.getFormatter("result");
assertEquals(mf.format("great"), "The result is 'great'.");
}
@@ -80,9 +80,9 @@
@Test
public void formatters_are_cached()
{
- MessageFormatter mf1 = _messages.getFormatter("result");
+ MessageFormatter mf1 = messages.getFormatter("result");
// Throw in a case-insensitive check:
- MessageFormatter mf2 = _messages.getFormatter("Result");
+ MessageFormatter mf2 = messages.getFormatter("Result");
assertSame(mf2, mf1);
}
@@ -90,6 +90,6 @@
@Test
public void format_unknown_key()
{
- assertEquals(_messages.format("rezult", "good"), "[[missing key: rezult]]");
+ assertEquals(messages.format("rezult", "good"), "[[missing key: rezult]]");
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/NonGenericBean.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/NonGenericBean.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/NonGenericBean.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/NonGenericBean.java Tue May 6 14:52:36 2008
@@ -16,15 +16,15 @@
public class NonGenericBean
{
- private String _value;
+ private String value;
public String getValue()
{
- return _value;
+ return value;
}
public void setValue(String value)
{
- _value = value;
+ this.value = value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java Tue May 6 14:52:36 2008
@@ -1,17 +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.
-
+// 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.
+
/**
*
*/
@@ -19,20 +19,19 @@
/**
- * Evolved from a test for aspects + annotations to a test of a class that utilizeds OneShotLock as
- * a utility.
+ * Evolved from a test for aspects + annotations to a test of a class that utilizeds OneShotLock as a utility.
*/
public class OneShotLockSubject
{
- private final OneShotLock _lock = new OneShotLock();
+ private final OneShotLock lock = new OneShotLock();
public void go()
{
- _lock.check();
+ lock.check();
}
public void done()
{
- _lock.lock();
+ lock.lock();
}
}
\ No newline at end of file
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/Pair.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/Pair.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/Pair.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/Pair.java Tue May 6 14:52:36 2008
@@ -16,27 +16,27 @@
public class Pair<K, V>
{
- private K _key;
+ private K key;
- private V _value;
+ private V value;
public K getKey()
{
- return _key;
+ return key;
}
public void setKey(K key)
{
- _key = key;
+ this.key = key;
}
public V getValue()
{
- return _value;
+ return value;
}
public void setValue(V value)
{
- _value = value;
+ this.value = value;
}
}
Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java?rev=653936&r1=653935&r2=653936&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java (original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java Tue May 6 14:52:36 2008
@@ -24,26 +24,26 @@
public class PropertyShadowBuilderImplTest extends IOCTestCase
{
- private Registry _registry;
- private PropertyShadowBuilder _builder;
+ private Registry registry;
+ private PropertyShadowBuilder builder;
private final String CLASS_NAME = getClass().getName();
@BeforeClass
public void setup_registry()
{
- _registry = buildRegistry();
+ registry = buildRegistry();
- _builder = _registry.getService("PropertyShadowBuilder", PropertyShadowBuilder.class);
+ builder = registry.getService("PropertyShadowBuilder", PropertyShadowBuilder.class);
}
@AfterClass
public void shutdown_registry()
{
- _registry.shutdown();
+ registry.shutdown();
- _registry = null;
- _builder = null;
+ registry = null;
+ builder = null;
}
public class FooHolder
@@ -94,7 +94,7 @@
holder.setFoo(foo);
- Foo shadow = _builder.build(holder, "foo", Foo.class);
+ Foo shadow = builder.build(holder, "foo", Foo.class);
for (int i = 0; i < 3; i++)
{
@@ -119,7 +119,7 @@
try
{
- _builder.build(holder, "bar", Foo.class);
+ builder.build(holder, "bar", Foo.class);
unreachable();
}
catch (RuntimeException ex)
@@ -136,7 +136,7 @@
try
{
- _builder.build(holder, "count", Map.class);
+ builder.build(holder, "count", Map.class);
unreachable();
}
catch (RuntimeException ex)
@@ -153,7 +153,7 @@
try
{
- _builder.build(holder, "writeOnly", Foo.class);
+ builder.build(holder, "writeOnly", Foo.class);
unreachable();
}
catch (RuntimeException ex)