Details
- 
        Type: Bug Bug
- 
        Status: Closed
- 
            Priority: Major Major
- 
            Resolution: Fixed
- 
            Affects Version/s: 1.7.1
- 
            Fix Version/s: 1.7.2
- 
            Component/s: Framework
- 
            Labels:None
- 
            Environment:Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
 Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX 5L for PowerPC (64 bit JVM) build
 caix64142-20050609
Description
                    The following method has been thrown in a certain JVM, it is not evident that it is the JVM is the cause but a simple NPE check would solve this issue either way.
Method code:
public Iterator getMessages() {
// Jira #1358 The hashmap contains vectors of FacesMessages, not
FacesMessages
// See following method.
ArrayList buffer = new ArrayList();
Iterator i = faceMessages.values().iterator(); <-- NPE being thrown here.
while (i.hasNext()) {
buffer.addAll((Vector) i.next());
}
return buffer.iterator();
}
            
Method code:
public Iterator getMessages() {
// Jira #1358 The hashmap contains vectors of FacesMessages, not
FacesMessages
// See following method.
ArrayList buffer = new ArrayList();
Iterator i = faceMessages.values().iterator(); <-- NPE being thrown here.
while (i.hasNext()) {
buffer.addAll((Vector) i.next());
}
return buffer.iterator();
}
Looks like a good fix.