Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(298)

Issue 2140047: Generics Support - trying out rietveld code reviewer

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by joshcanfield
Modified:
11 years ago
Reviewers:
joshcanfield, T van Dijk, igor.drobiazko
Base URL:
http://svn.apache.org/repos/asf/tapestry/tapestry5/trunk/
Visibility:
Public.

Description

Added support for injected generic services. You can now implement the same service interface multiple times with different type parameters, and inject it using the generic interface. Made Loop generic and added public getters for index and value. No more need to add properties to the page or use the var binding for simple object rendering loops. Updated PropertyWorker, Transform* to copy generic field signature to created getter. Updated GenericsUtils/PropertyConduitSourceImpl to more fully support wildcard and parameterized types. Added tests for everything

Patch Set 1 #

Patch Set 2 : Fixed NPE with interfaces. Fixed support for methods with synthetic versions. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+3112 lines, -575 lines) Patch
tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Loop.java View 9 chunks +11 lines, -11 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultInjectionProvider.java View 1 chunk +1 line, -1 line 1 comment Download
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/InternalClassTransformationImpl.java View 11 chunks +28 lines, -8 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImpl.java View 13 chunks +49 lines, -45 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ServiceInjectionProvider.java View 1 2 chunks +51 lines, -6 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/PropertyWorker.java View 1 chunk +4 lines, -2 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/services/TransformField.java View 8 chunks +14 lines, -8 lines 0 comments Download
tapestry-core/src/main/java/org/apache/tapestry5/services/TransformMethodSignature.java View 1 5 chunks +16 lines, -4 lines 0 comments Download
tapestry-core/src/test/app1/GenericLoopDemo.tml View 1 1 chunk +20 lines, -0 lines 0 comments Download
tapestry-core/src/test/app1/GridGenericSourceDemo.tml View 1 chunk +13 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GenericGridPage.java View 1 chunk +10 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java View 1 chunk +9 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/LoopTests.java View 1 chunk +23 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/base/GenericLister.java View 1 chunk +37 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/ExoticPet.java View 1 chunk +31 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/Person.java View 1 3 chunks +45 lines, -2 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/Pet.java View 2 chunks +45 lines, -2 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/SubscribeData.java View 1 chunk +12 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/data/ToDoItem.java View 1 chunk +2 lines, -1 line 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/BaseGenericLoopDemo.java View 1 1 chunk +25 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GenericLoopDemo.java View 1 1 chunk +74 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridGenericSourceDemo.java View 1 chunk +36 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java View 1 2 chunks +4 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PersonLister.java View 1 chunk +9 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PetLister.java View 1 1 chunk +26 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ToDoList.java View 1 chunk +1 line, -1 line 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/AppModule.java View 1 2 chunks +10 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/GenericDatabase.java View 1 1 chunk +47 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/GenericDatabaseImpl.java View 1 1 chunk +79 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/GenericDatabaseItem.java View 1 1 chunk +11 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/PersonDatabaseImpl.java View 1 chunk +31 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/PetDatabase.java View 1 chunk +12 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/PetDatabaseImpl.java View 1 chunk +64 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ToDoDatabase.java View 1 1 chunk +1 line, -42 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/ToDoDatabaseImpl.java View 1 4 chunks +11 lines, -56 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/services/TypedObjectDatabase.java View 1 1 chunk +6 lines, -0 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/internal/services/PropertyConduitSourceImplTest.java View 5 chunks +240 lines, -157 lines 0 comments Download
tapestry-core/src/test/java/org/apache/tapestry5/internal/test/InternalBaseTestCase.java View 2 chunks +11 lines, -0 lines 0 comments Download
tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/base/GenericLister.tml View 1 chunk +12 lines, -0 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/ObjectLocator.java View 3 chunks +43 lines, -4 lines 1 comment Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/DefaultModuleDefImpl.java View 1 chunk +1 line, -1 line 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCInternalTestCase.java View 2 chunks +11 lines, -0 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/IOCMessages.java View 2 chunks +3 lines, -2 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalRegistry.java View 3 chunks +5 lines, -2 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/InternalServiceDef.java View 2 chunks +9 lines, -0 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/Module.java View 2 chunks +3 lines, -2 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ModuleImpl.java View 3 chunks +6 lines, -12 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ObjectLocatorImpl.java View 2 chunks +13 lines, -1 line 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryImpl.java View 12 chunks +30 lines, -20 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/RegistryWrapper.java View 3 chunks +12 lines, -0 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/ServiceDefImpl.java View 4 chunks +11 lines, -4 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/ClassPropertyAdapterImpl.java View 1 chunk +17 lines, -0 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/services/MasterObjectProviderImpl.java View 3 chunks +3 lines, -2 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/GenericsUtils.java View 1 1 chunk +593 lines, -136 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/internal/util/InternalUtils.java View 10 chunks +36 lines, -13 lines 0 comments Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/services/MasterObjectProvider.java View 3 chunks +4 lines, -1 line 1 comment Download
tapestry-ioc/src/main/java/org/apache/tapestry5/ioc/test/IOCTestCase.java View 2 chunks +6 lines, -0 lines 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/ServiceBuilderMethodInvokerTest.java View 1 2 chunks +2 lines, -2 lines 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/services/MasterObjectProviderImplTest.java View 5 chunks +5 lines, -5 lines 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/BaseGenericBean.java View 1 chunk +1 line, -1 line 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/GenericUtilsTest.java View 1 chunk +1001 lines, -18 lines 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/GenericsAssumptionsTest.java View 1 chunk +163 lines, -0 lines 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/NonGenericBean.java View 1 chunk +1 line, -1 line 0 comments Download
tapestry-ioc/src/test/java/org/apache/tapestry5/ioc/internal/util/Pair.java View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5
joshcanfield
15 years, 3 months ago (2010-09-11 04:52:59 UTC) #1
joshcanfield
Fixed NPE with interfaces. Fixed support for methods with synthetic versions.
15 years, 3 months ago (2010-09-14 06:16:53 UTC) #2
joshcanfield
I'll soon have the power to check this in. There are two places that I'd ...
15 years, 3 months ago (2010-09-16 03:59:05 UTC) #3
igor.drobiazko_gmail.com
Hm, 5.2.0 is an alpha release and we should concentrate on bug fixing. Adding new ...
15 years, 3 months ago (2010-09-16 07:03:10 UTC) #4
T van Dijk
15 years, 1 month ago (2010-11-05 12:24:16 UTC) #5
http://codereview.appspot.com/2140047/diff/17001/tapestry-core/src/main/java/...
File
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultInjectionProvider.java
(right):

http://codereview.appspot.com/2140047/diff/17001/tapestry-core/src/main/java/...
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DefaultInjectionProvider.java:60:
Object injectionValue = masterObjectProvider.provide(fieldType, null, field,
this.locator, false);
I wonder if the object shouldn't be provided by ObjectLocator.getObject instead
of directly from the master object provider. ObjectLocator first checks for
matches of services with markers. The master object provider also includes
service overrides, which doesn't check seem to check markers. (I ran into this
with the multi db patch)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b