[ https://issues.apache.org/jira/browse/TAP5-2728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ben Weidig resolved TAP5-2728. ------------------------------ Fix Version/s: 5.8.2 Resolution: Fixed > 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)