pap.changePortletWindowState(WindowState.NORMAL);
}
cd.setNewWindowState(null);
PortletMode newMode = cd.getNewPortletMode();
if (newMode != null) {
<BUG>pap.changePortletMode(newMode);
}
cd.setNewPortletMode(null);
if (rd.isTargeted() && psm.isAction() && !cd.hasProcessedAction()) {
try {</BUG>
PrintWriter pw = new PrintWriter(new NullOutputStream());

pap.changePortletWindowState(WindowState.NORMAL);
}
cd.setNewWindowState(null);
PortletMode newMode = cd.getNewPortletMode();
if (newMode != null) {
pap.changePortletMode(newMode);
PortletStateManager.setMode(portletWindow, newMode);
}
cd.setNewPortletMode(null);
if (rd.isTargeted() && psm.isAction()) {
