[ https://issues.apache.org/jira/browse/WICKET-6550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444727#comment-16444727 ]
ASF GitHub Bot commented on WICKET-6550: ---------------------------------------- GitHub user Jezza opened a pull request: https://github.com/apache/wicket/pull/276 WICKET-6550 : Unify all metadata capable objects. Introduce a IMetadataContext that contains the current metadata implementation. This should allow more generic code to be written for all of the objects currently capable of storing and handling metadata. Ideally, this could be expanded with useful default methods. You can merge this pull request into a Git repository by running: $ git pull https://github.com/Jezza/wicket WICKET-6550 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/wicket/pull/276.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #276 ---- commit e92bffdf596bdf96d88de3bb2fe64616a390719b Author: Jezza <jezzadabomb@...> Date: 2018-04-19T20:16:47Z WICKET-6550 : Unify all metadata capable objects. Introduce a IMetadataContext that contains the current metadata implementation. This should allow more generic code to be written for all of the objects currently capable of storing and handling metadata. Ideally, this could be expanded with useful default methods. ---- > Unify all metadata capable objects. > ----------------------------------- > > Key: WICKET-6550 > URL: https://issues.apache.org/jira/browse/WICKET-6550 > Project: Wicket > Issue Type: Improvement > Components: wicket > Reporter: Jezza > Priority: Minor > Attachments: mock.txt > > > Application, Session, RequestCycle, and Component all have #setMetadata and > #getMetadata methods, but lack some super object to unify them all. > These leads to annoying complex code if you wish to implement some basic > functionality. > Such as a computeIfAbsent, which needs to be implemented 4 times. > I propose that we unify them all with one interface. > I'veĀ attached a mock idea that would solve it, and I'll work on a prototype > and submit a PR so anyone can take a look. > I'll add a comment here with the PR number. -- This message was sent by Atlassian JIRA (v7.6.3#76005)