Summary: | get*Listeners methods from GLWindow throw ClassCast exceptions | ||
---|---|---|---|
Product: | [JogAmp] Newt | Reporter: | Sebastien Schneider <sebastien.schneider> |
Component: | core | Assignee: | Sven Gothel <sgothel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gouessej, sebastien.schneider, sgothel |
Priority: | --- | ||
Version: | 1 | ||
Hardware: | All | ||
OS: | all | ||
Type: | --- | SCM Refs: |
jogl 927521af10162f2bf8c02b12cce75bd7de71dafe
|
Workaround: | --- |
Description
Sebastien Schneider
2011-12-02 11:39:04 CET
change JOGL product to NEWT product Hi For example, getWindowListeners() should not use toArray() because it returns Object[] instead of WindowListener[]. This method: public WindowListener[] getWindowListeners() { return (WindowListener[]) windowListeners.toArray(); } should be replaced by this one: public WindowListener[] getWindowListeners() { return windowListeners.toArray(new WindowListener[windowListeners.size]); } There is the same bug with getKeyListeners(). If you don't want to use <T> T[] toArray(T[] a), just use a simple loop. Best regards. fixed - thx. |