Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2.12-core
-
None
-
None
Description
OVERVIEW:
The method getBrowserName(int browser) in NameUtils.java is missing
case TrinidadAgent.APPLICATION_EMAIL:
name = _BROWSER_EMAIL;
break;
So if the agent is email, then you will hit the 'assert'
default:
// New or invalid browser id
assert false:"Invalid browser id: " +browser;
STEPS TO REPRODUCE:
1. Get Trinidad workspace
2. Set skin-family to purple (since there is an @agent email definition in the purpleSkin.css file)
3. In goButton.jspx, add this to set it in emailable page mode
<tr:goLink destination="goButton.jspx?org.apache.myfaces.trinidad.agent.email=true" text="EMAIL MODE"/>
4. Run goButton.jspx in debug mode
5. Click goLink
6. The debugger will stop on the line with assert false:"Invalid browser id: " +browser;
This happens while it is creating the stylesheet file name, which is not rendered for emailable page mode anyway. But still there is an obvious bug in this method.
TO FIX:
In NameUtils.java getBrowserName(int browser), add
case TrinidadAgent.APPLICATION_EMAIL:
name = _BROWSER_EMAIL;
break;