[
https://issues.jboss.org/browse/RF-10784?page=com.atlassian.jira.plugin.s...
]
Vladimir Kravchenko commented on RF-10784:
------------------------------------------
What I mean is the following change:
{code}
public void processEvents(FacesContext context,
EventsQueue phaseEventsQueue, boolean havePhaseEvents) {
FacesEvent event;
while (havePhaseEvents) {
try {
event = (FacesEvent) phaseEventsQueue.remove();
} catch (NoSuchElementException e) {
havePhaseEvents = false;
break;
}
UIComponent source = event.getComponent();
try {
source.broadcast(event);
} catch (AbortProcessingException e) {
if (_log.isErrorEnabled()) {
UIComponent component = event.getComponent();
String id = null != component ? component
.getClientId(context) : "";
_log.error(
"Error processing faces event for the component "
+ id, e);
}
}
}
}
{code}
The "processEvents" method may swallow NoSuchElementException thrown by
"phaseEventsQueue.remove()" call, but not ones that are thrown inside the
"source.broadcast(event);" call.
Will it break JSF specification?
AjaxViewRoot swallows NoSuchElementException from by the application
code
-------------------------------------------------------------------------
Key: RF-10784
URL:
https://issues.jboss.org/browse/RF-10784
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.3.2.SR1
Reporter: Vladimir Kravchenko
Assignee: Nick Belaevski
AjaxViewRoot.processEvents() swallows NoSuchElemntException thrown by an apllication
code, due to too wide catch block:
{code}
public void processEvents(FacesContext context,
EventsQueue phaseEventsQueue, boolean havePhaseEvents) {
FacesEvent event;
while (havePhaseEvents) {
try {
event = (FacesEvent) phaseEventsQueue.remove();
UIComponent source = event.getComponent();
try {
source.broadcast(event);
} catch (AbortProcessingException e) {
if (_log.isErrorEnabled()) {
UIComponent component = event.getComponent();
String id = null != component ? component
.getClientId(context) : "";
_log.error(
"Error processing faces event for the component "
+ id, e);
}
}
} catch (NoSuchElementException e) {
havePhaseEvents = false;
}
}
}
{code}
http://anonsvn.jboss.org/repos/richfaces/tags/3.3.3.Final/framework/impl/...
A NoSuchElemtException thrown inside "source.broadcast(event);" will be
swallowed by the catch block.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira