Re: [sdljava-users] Bug in SDLEventManager ?
Status: Beta
Brought to you by:
ivan_ganza
From: Ivan Z. G. <iva...@ya...> - 2005-07-14 16:57:42
|
I've applied this patch in CVS. Thanks Stefan for finding this! -Ivan/ Stefan Prelle wrote: >Hi all, > >I just found a typo-bug in the SDLEventManager in the register-Method. > >When checking if the class parameter can be assigned to SDLEvent there >is a negation missing. >Line 108 should read: > if (!SDLEvent.class.isAssignableFrom(eventType)) return false; > >You find the patch attached. > >Regards, > Stefan > > >------------------------------------------------------------------------ > >*** SDLEventManager.java 2005-07-09 00:00:44.000000000 +0200 >--- SDLEventManager_old.java 2005-07-08 23:59:08.000000000 +0200 >*************** >*** 106,110 **** > { > if (listener == null) return false; >! if (!SDLEvent.class.isAssignableFrom(eventType)) return false; > List list = (List)repository.get(eventType); > if (list==null) list = new ArrayList(); >--- 106,110 ---- > { > if (listener == null) return false; >! if (SDLEvent.class.isAssignableFrom(eventType)) return false; > List list = (List)repository.get(eventType); > if (list==null) list = new ArrayList(); >*************** >*** 222,224 **** > } > } >! } >--- 222,224 ---- > } > } >! } >\ Kein Zeilenumbruch am Dateiende. > > |