1. #1
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    33
    Vote Rating
    0
    Adam Ward is on a distinguished road

      0  

    Default [FIXED] [1.2.3] Dispatcher forwardEvent throws NPE

    [FIXED] [1.2.3] Dispatcher forwardEvent throws NPE


    This is a very simple bug that can be seen by simply looking at the following static methods in the Dispatcher class:
    Code:
    /**
       * Forwards an app event to the dispatcher.
       * 
       * @param event the app event
       */
      public static void forwardEvent(AppEvent event) {
        instance.dispatch(event);
      }
    
      /**
       * Creates and forwards an app event to the dispatcher.
       * 
       * @param eventType the app event type
       */
      public static void forwardEvent(int eventType) {
        instance.dispatch(eventType);
      }
    
      /**
       * Creates and fowards an app event to the dispatcher.
       * 
       * @param eventType the app event type
       * @param data the event data
       */
      public static void forwardEvent(int eventType, Object data) {
        instance.dispatch(new AppEvent(eventType, data));
      }
    
      /**
       * Creates and fowards an app event to the dispatcher.
       * 
       * @param eventType the app event type
       * @param data the event data
       * @param historyEvent true to mark event as a history event
       */
      public static void forwardEvent(int eventType, Object data, boolean historyEvent) {
        AppEvent ae = new AppEvent(eventType, data);
        ae.historyEvent = historyEvent;
        instance.dispatch(ae);
      }
    Not one of these methods checks to see if the instance variable is null. forwardEvent is a very handy shorthand method for getting the instance and dispatching an event, but you must call Dispatcher.get() before hand to initialize the singleton instance, which doesn't make sense to me.

    To reproduce this bug, simply insert the following line at the very top of the onModuleLoad method in any application:
    Code:
    Dispatcher.forwardEvent(1);
    Note: the value 1, can be substituted with any AppEvent or integer that maps to a specific AppEvent in your application.

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi