[ https://issues.apache.org/jira/browse/TAP5-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551134#comment-17551134 ]
Hudson commented on TAP5-2728: ------------------------------ FAILURE: Integrated in Jenkins build Tapestry ยป tapestry-trunk-freestyle #147 (See [https://ci-builds.apache.org/job/Tapestry/job/tapestry-trunk-freestyle/147/]) TAP5-2728: EventContext enhancements (ben: rev 44243eb039330bd7df15c5d7f0b1b87a9bd679be) * (edit) tapestry-core/src/main/java/org/apache/tapestry5/EventContext.java * (edit) tapestry-core/build.gradle * (edit) tapestry-core/src/main/java/org/apache/tapestry5/internal/AbstractEventContext.java * (delete) tapestry-core/src/test/java/org/apache/tapestry5/internal/services/EventContextTests.java * (edit) tapestry-core/src/main/java/org/apache/tapestry5/internal/EmptyEventContext.java * (add) tapestry-core/src/test/groovy/org/apache/tapestry5/specs/EventContextSpec.groovy > EventContext enhancements > ------------------------- > > Key: TAP5-2728 > URL: https://issues.apache.org/jira/browse/TAP5-2728 > Project: Tapestry 5 > Issue Type: Improvement > Components: tapestry-core > Affects Versions: 5.8.1 > Reporter: Ben Weidig > Priority: Minor > Fix For: 5.8.2 > > Time Spent: 20m > Remaining Estimate: 0h > > The EventContext is an essential tool for accessing event related data, but > its functionality is quite limited. > The most common use case -- accessing its data -- must be done in a > try-catch-block. > If multiple values are involved, the resulting code isn't that pretty. > Adding Optional<T> tryGet(Class<T> desiredType, int index) would allow to > access the values in a more lenient way and provide a bridge between a > possible null value and the fluent/functional Optional API. > Also, a boolean isEmpty() would cover another common use case with less and > more speaking code. -- This message was sent by Atlassian Jira (v8.20.7#820007)