Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005976 [Quercus] minor always 02-11-16 09:13 02-11-16 09:14
Reporter nam View Status public  
Assigned To
Priority normal Resolution open  
Status new   Product Version
Summary 0005976: array out of bounds for WebApp.java ServletListener
Description (rep by zouzhir)

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:635) ~[na:1.7.0_67]
        at java.util.ArrayList.get(ArrayList.java:411) ~[na:1.7.0_67]
        at com.caucho.server.webapp.WebApp.hasListener(WebApp.java:2197) ~[resin.jar:4.0.47]
        at com.caucho.server.webapp.WebApp.addListenerObject(WebApp.java:2148) ~[resin.jar:4.0.47]
        at com.caucho.server.webapp.WebApp.addListener(WebApp.java:2108) ~[resin.jar:4.0.47]

In WebApp.java, hasListener() is using the wrong arraylist (_listeners vs listeners):

  public boolean hasListener(ArrayList<?> listeners, Class<?> listenerClass)
  {
    for (int i = 0; i < listeners.size(); i++) {
      Object listener = _listeners.get(i);

      if (listener.getClass().equals(listenerClass)) {
        return true;
      }
    }

    return false;
  }
Additional Information
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
02-11-16 09:13 nam New Issue
02-11-16 09:14 nam Description Updated


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
27 total queries executed.
24 unique queries executed.
Powered by Mantis Bugtracker